Vexon Commerce

Configuration settings

Every setting in your .env file, what it does and which ones the app won't start without. Plus the shop file that provision:site reads.

ConfigurationLast checked

How settings work

The app reads its settings from environment variables, usually an .env file passed to docker run --env-file. They're checked when it starts. If a required one is missing or malformed, it stops and names it. An empty value counts as not set. Change a setting, then restart the container.

Write each value without quotes, as KEY=value. docker run --env-file keeps quote marks as part of the value, so KEY="value" fails validation.

NEXT_PUBLIC_IMAGE_PROXY_PATH is the exception: it's set when you build the image, not when you start it.

Required

The app won't start in production without these.

NameWhat it doesExample
DATABASE_URL

Your PostgreSQL database.

postgres://shop:…@db:5432/shop
DIRECT_URL

The same as DATABASE_URL, unless you put a connection pooler in front of PostgreSQL. Needed to prepare the database.

postgres://shop:…@db:5432/shop
AUTH_SECRET

Signs sign-in sessions.

a long random string
AUTH_SECRETS_KEY

Encrypts two-factor and webhook secrets. Keep a copy: without it, staff two-factor can't be read.

at least 32 characters
EMAIL_WORKER_SECRET

The password your scheduler sends to run the email queue.

at least 16 characters
CRON_SECRET

The password your scheduler sends to run every other job.

at least 16 characters
SES_SNS_WEBHOOK_SECRET

Checks delivery and bounce reports from Amazon SES.

at least 16 characters
SES_SNS_ALLOWED_TOPIC_ARN

The SNS topic those reports come from.

arn:aws:sns:…

Your shop and sign-in

NameWhat it doesExample
SINGLE_STORE_SLUG

Ties this server to your shop. provision:site tells you the value.

your-shop
AUTH_URL

Your shop's address. Needed in production.

https://shop.example.com
AUTH_TRUST_HOST

Set to true behind a reverse proxy.

true
APP_ENV

Only production lets search engines index the shop. Use staging for a test copy.

production
NameWhat it doesExample
MEILISEARCH_HOST

Your Meilisearch server. Without it, search falls back to the database.

http://search:7700
MEILISEARCH_API_KEY

A key that can manage documents and settings. Leave the line out rather than empty.

a long random string
MEILISEARCH_INDEX_PREFIX

Put in front of index names, if several shops share one Meilisearch.

shop_

Storage and images

NameWhat it doesExample
S3_ENDPOINT

Your S3-compatible storage.

https://s3.example.com
S3_BUCKET

The bucket for photos and uploads. Created on first start if it's missing.

shop-media
S3_ACCESS_KEY, S3_SECRET_KEY

Keys for that bucket.

from your storage provider
MEDIA_CDN_BASE_URL

The public address photos are read from, ending in the bucket name. imgproxy is reached at /img on the same host.

https://media.example.com/shop-media
S3_REGION

The bucket's region. Defaults to us-east-1.

us-east-1
S3_FORCE_PATH_STYLE

Path-style bucket addresses. On by default.

true
MEDIA_MAX_UPLOAD_BYTES

Largest upload, in bytes. Defaults to 10 MB.

10485760
NEXT_PUBLIC_IMAGE_PROXY_PATH

Set when you build the image. Defaults to imgproxy at /img. Build with it empty to serve photos as they are.

/img/insecure

Email

NameWhat it doesExample
EMAIL_FROM

Who emails come from, unless you set a sender in Settings › Email. Just the address: emails use your shop's name as the sender name.

[email protected]
AWS_REGION

The Amazon SES region. A new shop sends through SES.

eu-west-2
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY

Keys that can send with SES. Not needed if the server has an IAM role.

from AWS
EMAIL_SERVER

An SMTP server, used once you choose SMTP in Settings › Email.

smtp://user:…@mail.example.com:587
MARKETING_EMAIL_SERVER, MARKETING_EMAIL_FROM

A separate account for newsletters and other marketing emails. Without it, marketing emails are refused. The FROM is just an address, like EMAIL_FROM.

smtp://…

Payments

NameWhat it doesExample
STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY

Your Stripe keys.

sk_live_…, pk_live_…
STRIPE_WEBHOOK_SECRET

Checks the payment updates Stripe sends.

whsec_…
APPLE_PAY_DOMAIN_ASSOCIATION

The domain file Apple Pay needs.

from Stripe
PAYMENTS_ALLOW_TEST_KEYS

Leave at 0 in production. Set 1 only on a test copy, to try checkout with test keys.

0

Optional extras

NameWhat it doesExample
OPENAI_API_KEY

For the AI helper.

sk-…
ANTHROPIC_API_KEY

Optional, for AI-drafted descriptions.

sk-ant-…
WORLDPRICE_API_KEY

Live exchange rates, for multiple currencies.

from the provider
SHIPPING_CREDENTIALS_KEY

Encrypts carrier account details. Needed before you save a carrier account.

at least 32 characters
VEXON_UPDATE_MANIFEST_URL

Where Settings › Updates checks for new versions. Unset means no checks.

https://…
APP_VERSION

The version shown in the admin. Set it when you build from a release.

1.2.0
SENTRY_DSN

Sends errors to Sentry, if you use it.

https://…

Leave the SEED_* and DEFAULT_STORE_SLUG settings out in production. They're for development.

Your shop's file

npm run provision:site -- your-shop.json creates your shop from a JSON file. Unknown keys are refused, and every problem is listed at once.

KeyWhat it doesExample
name

Your shop's name.

Your Shop
slug

A short name in lowercase with hyphens.

your-shop
ownerEmail

The owner account. Its password is set through Forgotten your password?.

[email protected]
defaultLocale

The shop's language and region.

en-GB
baseCurrency

Prices are stored in this currency.

GBP
countryCode

Where the shop is based.

GB
timezone

The shop's time zone.

Europe/London
taxMode

Whether prices include tax: INCLUSIVE or EXCLUSIVE.

INCLUSIVE
domains

Your shop's addresses, without https://. Exactly one is primary.

[{"host": "shop.example.com", "isPrimary": true}]
settings.legalName

Shown on invoices and legal pages.

Your Shop Ltd
shipping.flatRateMinor

A first flat shipping rate, in pence or cents.

499
tax.domesticRateBps

Your tax rate in hundredths of a percent: 2000 is 20%. Write 0 if you don't charge tax.

2000
featureFlags

Switches to set when the shop is created. The only place to set the seven deployment-only ones.

{"checkout": false}

Optional keys include ownerName, enabledLocales, enabledCurrencies, more settings (such as supportEmail, vatNumber, registeredAddress and lowStockThreshold, which defaults to 5), shipping (freeOverMinor, delivery days, cutoffTime), tax.appliesToShipping and theme. The example file in the code's config/sites folder shows them all.

Was this helpful?