Configuration
Environment variables read from the root .env.
.env keeps infrastructure only. Shop name, currency, shipping, payments and storefront keys are changed in the admin under Settings.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | yes | PostgreSQL connection string. |
BETTER_AUTH_SECRET | yes | Long random string. Also used to encrypt provider keys at rest. |
BETTER_AUTH_URL | yes | Public origin of the app, e.g. https://shop.example.com. |
APP_URL | yes | Public origin used in hosted checkout links. |
TENANCY_MODE | no | single (default) or multi. See Tenancy. |
DEFAULT_SHOP_NAME | no | Name of the default shop. |
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET | no | Enables Google sign-in. |
GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET | no | Enables GitHub sign-in. |
MARKETPLACE_URL | no | App Marketplace instances connect to. |
STRIPE_APP_URL | no | Public URL of the bundled Stripe app. |
STRIPE_APP_KEY | no | The Stripe app's private key, from pnpm app:keygen. |
apps/admin-ui/.env is a symlink to the root .env; Vite loads it for the admin app.
Migrations
pnpm db:generate # generate a migration after changing schema
pnpm db:migrate # apply migrationsMigrations are idempotent. The container entrypoint runs them on every start, which also covers upgrades.