Skip to main content

Documentation Index

Fetch the complete documentation index at: https://86d.app/docs/llms.txt

Use this file to discover all available pages before exploring further.

86d reads configuration from environment variables at startup. To get started, copy .env.example to .env in the repository root and fill in the required values. Variables that are commented out in .env.example are optional. Uncomment and set only the ones you need for the integrations you want to enable.
cp .env.example .env

Required variables

These three variables must be set before your store will start. The application fails validation on boot if any are missing.
VariableDescription
DATABASE_URLPostgreSQL connection string used for all runtime queries. Example: postgresql://postgres:postgres@localhost:5432/86d
DATABASE_URL_UNPOOLEDThe same connection string, without connection pooling. Used for database migrations. Set to the same value as DATABASE_URL unless you are using a pooler such as PgBouncer.
BETTER_AUTH_SECRETSecret key used to sign session tokens and auth cookies. Generate a secure value with openssl rand -base64 32 and never commit it to source control.
Change BETTER_AUTH_SECRET before going to production. Any value other than the placeholder in .env.example is fine for local development, but you must use a cryptographically random string in production.

Application URLs

VariableDefaultDescription
APP_URLhttp://localhost:3000The public URL of your store. Used to build absolute URLs in emails, webhooks, and redirects. Set this to your domain in production.
BETTER_AUTH_URLhttp://localhost:3000The base URL Better Auth uses when constructing auth callback URLs. Should match APP_URL.
NODE_ENVdevelopmentSet to production when deploying. Affects logging verbosity, error handling, and build optimizations.

Store identity and API

VariableDescription
STORE_IDUUID identifying this store. Populated automatically when you run 86d init. When set, the store fetches its configuration from the 86d API instead of reading templates/<template>/config.json.
86D_API_URLBase URL for the 86d hosted API. Defaults to https://api.86d.app. Only relevant when STORE_ID is set.
86D_API_KEYAPI key for the 86d hosted API. When set, enables 86d.app SSO for admin authentication. See Authentication for details.

Email

VariableDescription
RESEND_API_KEYAPI key for Resend. When set, the store sends transactional emails (order confirmations, password resets, and so on) using Resend. If not set, email sending is disabled.

Auth providers

Enable social login by setting the corresponding variables. Any provider whose credentials are absent is disabled automatically. See Authentication for setup details.
ProviderVariables
GoogleAUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET, NEXT_PUBLIC_AUTH_GOOGLE_ID
Twitter / XAUTH_TWITTER_ID, AUTH_TWITTER_SECRET
SlackAUTH_SLACK_ID, AUTH_SLACK_SECRET
ShopifyAUTH_SHOPIFY_ID, AUTH_SHOPIFY_SECRET
AppleAUTH_APPLE_ID, AUTH_APPLE_SECRET, AUTH_APPLE_BUNDLE_IDENTIFIER
FacebookAUTH_FACEBOOK_ID, AUTH_FACEBOOK_SECRET

Payment providers

The first configured payment provider is wired to the payments module automatically. Priority order when multiple providers are configured: Stripe, PayPal, Square, Braintree.
VariableDescription
STRIPE_SECRET_KEYStripe secret API key (starts with sk_).
STRIPE_WEBHOOK_SECRETWebhook signing secret for verifying Stripe events (starts with whsec_).
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYPublishable key used in the browser to initialize Stripe Elements.
STRIPE_ACCOUNT_IDOptional connected account ID for Stripe Connect.
VariableDescription
PAYPAL_CLIENT_IDPayPal app client ID.
PAYPAL_CLIENT_SECRETPayPal app client secret.
PAYPAL_WEBHOOK_IDWebhook ID from your PayPal app configuration.
PAYPAL_SANDBOXSet to "true" to use the PayPal sandbox environment.
VariableDescription
SQUARE_ACCESS_TOKENSquare access token.
NEXT_PUBLIC_SQUARE_APPLICATION_IDSquare application ID (client-side).
NEXT_PUBLIC_SQUARE_LOCATION_IDSquare location ID (client-side).
SQUARE_WEBHOOK_SIGNATURE_KEYSignature key for verifying Square webhook events.
SQUARE_WEBHOOK_NOTIFICATION_URLPublicly reachable URL Square sends webhook events to.
VariableDescription
BRAINTREE_MERCHANT_IDBraintree merchant ID.
BRAINTREE_PUBLIC_KEYBraintree public key.
BRAINTREE_PRIVATE_KEYBraintree private key.
BRAINTREE_SANDBOXSet to "true" to use the Braintree sandbox environment.

Storage

Control where uploaded files are stored. See Storage configuration for the full setup guide.
VariableDescription
STORAGE_PROVIDERStorage backend: local (default), vercel, or s3.
STORAGE_PUBLIC_URL_MODEHow upload URLs are returned: direct (raw bucket URL) or proxy (same-origin /uploads/... path).
STORAGE_LOCAL_DIRDirectory for local file storage. Defaults to ./uploads.
STORAGE_LOCAL_BASE_URLPublic base URL for files served from STORAGE_LOCAL_DIR. Defaults to /uploads.
S3_ENDPOINTS3-compatible endpoint URL (MinIO, Cloudflare R2, Railway Bucket, AWS S3).
S3_BUCKETS3 bucket name.
S3_REGIONS3 region. Defaults to us-east-1.
S3_ACCESS_KEYS3 access key ID.
S3_SECRET_KEYS3 secret access key.
S3_VIRTUAL_HOSTED_STYLESet to "true" when using Railway object storage or any provider that requires virtual-hosted-style URLs.
BLOB_READ_WRITE_TOKENVercel Blob read and write token. Set automatically by Vercel when you add a Blob store to your project.
VERCEL_BLOB_STORAGE_HOSTNAMEPublic hostname of your Vercel Blob store.

Docker Compose MinIO

When you run docker compose up, the MinIO container is configured with these defaults. Override them in .env for production:
VariableDefaultDescription
MINIO_ROOT_USERminioadminMinIO root username.
MINIO_ROOT_PASSWORDminioadminMinIO root password.
MINIO_API_PUBLISH_PORT9000Host port for the MinIO S3 API.
MINIO_CONSOLE_PUBLISH_PORT9001Host port for the MinIO web console.

Railway

These variables are populated by Railway at runtime. Reference them when constructing absolute URLs.
VariableDescription
RAILWAY_PUBLIC_DOMAINHostname assigned by Railway. Use it as APP_URL=https://$RAILWAY_PUBLIC_DOMAIN.
RAILWAY_PROJECT_IDProject ID.
RAILWAY_SERVICE_IDService ID.
RAILWAY_ENVIRONMENT_IDEnvironment ID.

SMS

VariableDescription
TWILIO_ACCOUNT_SIDTwilio account SID for SMS notifications.
TWILIO_AUTH_TOKENTwilio auth token.
TWILIO_SERVICE_SIDTwilio Messaging Service SID.
TWILIO_PHONE_NUMBERTwilio phone number to send SMS from.

AI and LLM

VariableDescription
OPENAI_API_KEYOpenAI API key for AI-powered features (product descriptions, search, recommendations).
GEMINI_API_KEYGoogle Gemini API key.
OPENROUTER_API_KEYOpenRouter API key for routing to multiple LLM providers.

Maps

VariableDescription
GOOGLE_MAPS_API_KEYGoogle Maps API key, used for address autocomplete and delivery zones.

Analytics and monitoring

VariableDescription
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_IDGoogle Tag Manager container ID (for example GTM-XXXXXXX).
SENTRY_DSNSentry DSN for error tracking and performance monitoring.

Point of sale

VariableDescription
TOAST_API_KEYToast POS API key.
TOAST_RESTAURANT_GUIDToast restaurant GUID.
TOAST_SANDBOXSet to "true" to use the Toast sandbox environment.