Environment Variables Guide

A complete guide on how to obtain and configure every environment variable for your project. Browse all services with Custom, or choose your template for its exact requirements.

Recommended

Interactive .env Builder

Prepare variables for the four supported templates, choose optional features, and generate secrets locally. For Custom, follow your project’s variable list and the service instructions below.

Open Builder

Custom is the complete service reference, not a list of mandatory variables. Use your purchase email and repository instructions to identify the services and names your project actually uses. Add values to the correct hosting environment. Never place server-only secrets in NEXT_PUBLIC_*, source control, screenshots, or chat.

License

Purchase activation values supplied with the template.

LICENSE_KEY

Buyer license key supplied after purchase.

Project-dependent
Server-onlyFeature: coreSecret
LICENSE_SERVER_URL

License validation service origin supplied with the template.

Project-dependent
Server-onlyFeature: core
LICENSE_SERVER_SECRET

Separate secret used to verify license and grace tokens locally.

Project-dependent
Server-onlyFeature: coreSecret
LICENSE_PRODUCT

License product identifier for this template.

Project-dependent
Server-onlyFeature: core
View setup instructions & screenshots
  1. Open the email you received from Own Your Website after purchase. Check your spam folder if it has not arrived.
  2. Copy the license values supplied with your project, using the exact names listed above. LICENSE_KEY is your purchased key; LICENSE_PRODUCT identifies your product. Use the supplied server URL and server secret only where your project requires them.
  3. Open your hosting project's environment-variable settings. Paste each supplied value without surrounding quotes. Select the intended environment, save, and redeploy.
  4. Do not invent a license-server secret or reuse an authentication secret for it. Contact support if required delivery values are missing or you need to move your license to another production domain.
license — screenshot 1
Open full-size screenshot

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Database

Pooled runtime and direct migration connections.

DATABASE_URL

Pooled PostgreSQL connection used by the application runtime.

Project-dependent
Server-onlyFeature: coreSecretProvider docs
DATABASE_URL_UNPOOLED

Direct connection to the same database, branch, and schema for Prisma migrations.

Project-dependent
Server-onlyFeature: coreSecretProvider docs
DIRECT_URL

Direct connection to the same database, branch, and schema for Prisma migrations.

Project-dependent
Server-onlyFeature: coreSecretProvider docs
View setup instructions & screenshots
  1. Go to neon.tech and sign up. Click Create Project and enter your website name.
  2. Postgres version: select a version supported by your project. Keep the provider default if your project does not specify one.
  3. Region: choose the region closest to your application servers or functions. For example, US East (N. Virginia) for a US deployment, or Frankfurt for a nearby European deployment. Keeping the database and server close reduces latency.
  4. Backend Services / Authentication: the released Prisma templates have their own authentication, so you do not need to enable Neon Auth. For a custom website, follow its project instructions.
  5. Click Create Project, then open Connect (or Connect your app manually). Select the database, role, and branch you intend to use.
  6. Turn Connection pooling ON. Copy the provider-issued connection string into DATABASE_URL.
  7. For the same database, branch, role, and schema, turn Connection pooling OFF and copy the direct string into DIRECT_URL or DATABASE_URL_UNPOOLED, according to your project. E-commerce uses the latter; Taxi and Business Landing use the former. Do not put a pooled URL in the direct field or create the direct URL by editing its hostname.
  8. Create a separate branch or database for previews/testing. Copy its own pooled and direct URLs into that hosting environment, not Production.
  9. Cold-start troubleshooting: a sleeping database can delay the first connection. Check your provider's current Prisma guidance for connection timeouts and pooling parameters; preserve its SSL settings. Do not append duplicate query separators or assume a URL rewrite will fix every connection error.
  10. The three released Prisma templates apply migrations and create missing baseline CMS data during the build. No manual seed or database reset is needed. Custom projects use their own documented build and migration commands.
database — screenshot 1
Open full-size screenshot
1 / 2

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Authentication

Session and application authentication secrets.

NEXTAUTH_SECRET

NextAuth session signing secret; also the fallback guest-order token secret.

Project-dependent
Server-onlyFeature: coreSecretProvider docs
GUEST_ORDER_TOKEN_SECRET

Optional independently rotatable guest-order access-token secret; falls back to NEXTAUTH_SECRET.

Project-dependent
Server-onlyFeature: guest-ordersSecret
JWT_SECRET

Secret used to sign admin session tokens.

Project-dependent
Server-onlyFeature: coreSecret
View setup instructions & screenshots
  1. Generate a separate cryptographically random secret for each authentication boundary listed above. Use the Env Builder's local Generate button for supported template fields, or run openssl rand -base64 32 in your own terminal.
  2. Copy the result into the matching server-only variable: NEXTAUTH_SECRET, JWT_SECRET, or another name explicitly used by your project. Do not ask a chatbot to create secrets, use a memorable phrase, or reuse the license-server secret.
  3. Save the value in your hosting project's environment settings. Use different values for testing and Production, then redeploy. Changing a session secret can sign existing users out.
  4. If your project uses NEXTAUTH_URL, set it to the exact application origin as described in Site URLs, not to an API callback path.
nextauth — screenshot 1
Open full-size screenshot

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Site URLs

Canonical HTTPS origins for links, callbacks, and cookies.

NEXTAUTH_URL

Auth framework origin generated from the buyer's canonical application origin.

Project-dependent
Server-onlyFeature: coreProvider docs
NEXT_PUBLIC_APP_URL

Canonical application origin used for Checkout and password-reset links.

Project-dependent
Browser-visibleFeature: core
NEXT_PUBLIC_SITE_URL

Temporary compatibility alias used by SEO metadata; generate from NEXT_PUBLIC_APP_URL.

Project-dependent
Browser-visibleFeature: legacy-origin-alias
NEXT_PUBLIC_STORE_URL

Temporary compatibility alias used by email links; generate from NEXT_PUBLIC_APP_URL.

Project-dependent
Browser-visibleFeature: legacy-origin-alias
View setup instructions & screenshots
  1. For local testing, use your actual local origin, such as http://localhost:3000. For a deployed site, copy its HTTPS address from your hosting project's domain settings.
  2. Choose the exact hostname you will use, including www if applicable. Set only the URL variables shown for your project. Several names may currently require the same origin; do not delete an existing variable just because its value is repeated.
  3. After adding a custom domain, update the application URLs, enabled OAuth callbacks, Maps restrictions, and payment endpoints to match it. Save the variables and redeploy.
  4. Keep Preview URLs separate from Production. Never put API keys, passwords, or database credentials into a public URL variable.
urls — screenshot 1
Open full-size screenshot

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Admin Credentials

Template-specific administrator identity or access values.

ADMIN_EMAIL

Admin identity and fallback recipient for operational store messages.

Project-dependent
Server-onlyFeature: core
ADMIN_PASSWORD

Password protecting the landing-page admin panel.

Project-dependent
Server-onlyFeature: coreSecret
View setup instructions & screenshots
  1. Set ADMIN_EMAIL to the email you control and will use for your administrator account. For E-commerce, E-commerce Lite and Taxi, register or sign in with that exact address to receive administrator access; the setting identifies the admin but does not itself create a user or password.
  2. For a password-based admin such as Business Landing, generate a strong unique ADMIN_PASSWORD using a password manager or the local Env Builder. Store it securely, then add it to your hosting environment. Do not add this variable to templates that do not consume it.
  3. After deployment, sign in and check admin access. In a separate private browser session, confirm that an ordinary visitor cannot open protected admin features.
admin — screenshot 1
Open full-size screenshot

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Email (Resend)

Optional transactional email delivery.

RESEND_API_KEY

Resend API key for order notifications and password reset messages.

Project-dependent
Server-onlyFeature: emailSecretProvider docs
EMAIL_FROM

Verified sender used when Resend delivery is enabled.

Project-dependent
Server-onlyFeature: emailProvider docs
View setup instructions & screenshots
  1. Create an account at resend.com.
  2. Open API Keys → Create API Key (or Add API Key). Create a sending key with the minimum required scope, copy it immediately, and save it as RESEND_API_KEY.
  3. To send from your own address, open Domains → Add Domain and enter your sending domain.
  4. Resend shows the DNS records required for verification. Open the DNS dashboard at your domain registrar, add the records exactly as shown, then return to Resend and click Verify. Wait until the domain is verified.
  5. Set EMAIL_FROM to an address on that verified domain, for example Website <no-reply@yourdomain.com>. Copy the value without outer quotes into your hosting environment.
  6. Redeploy, submit a test booking or order, and check the Resend delivery log and recipient inbox. The default testing sender is restricted; it is not a replacement for a verified customer-facing sender.
  7. Resend is optional for the released templates that support it. Without it, the documented fallback does not prove real email delivery. Custom sites that rely on email for sign-in may require it.
email — screenshot 1
Open full-size screenshot
1 / 3

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Payments (Stripe)

Signed payment events and reconciliation.

STRIPE_SECRET_KEY

Stripe server API key for one test or live mode.

Project-dependent
Server-onlyFeature: stripe-checkoutSecretProvider docs
STRIPE_WEBHOOK_SECRET

Signing secret for this deployment's exact Stripe webhook destination.

Project-dependent
Server-onlyFeature: stripe-checkoutSecretProvider docs
STRIPE_DEPLOYMENT_ID

Stable unique marker isolating this site when a Stripe account serves multiple deployments.

Project-dependent
Server-onlyFeature: stripe-checkout
CRON_SECRET

Bearer secret required by the included order-reconciliation cron route.

Project-dependent
Server-onlyFeature: stripe-reconciliationSecretProvider docs
STRIPE_PUBLIC_KEY

Publishable Stripe key name used by some custom projects. Not a secret key; use the exact public-key variable consumed by your integration, not every naming variant.

Project-dependent
Server-onlyFeature: stripe-checkoutProvider docs
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY

Public Stripe key for custom client-side integrations that explicitly require it. Not required by the four released template manifests.

Project-dependent
Browser-visibleFeature: stripe-checkoutProvider docs
View setup instructions & screenshots
  1. Sign up at Stripe Dashboard. Start in a sandbox or test mode; use live mode only after you have verified the whole payment flow.
  2. Business setup: to activate live payments, provide your business name, country, website, services, and the identity/bank details Stripe requests. For a website taking payment for its own goods or services, choose the option for accepting payments for your own business, not a platform or marketplace distributing payments to other sellers. A custom Connect integration must follow its own onboarding flow.
  3. Open Developers → API keys (the dashboard may show this under Workbench). Reveal the test secret key and save it as STRIPE_SECRET_KEY. Copy a publishable key only if your project's client-side Stripe integration requires one; the four-template catalog is not a universal contract for custom sites.
  4. For E-commerce or Taxi card payments, set a unique STRIPE_DEPLOYMENT_ID for this site and environment. Do not share it between Preview and Production. Configure the separate CRON_SECRET for the reconciliation job.
  5. Deploy your application with the required configuration. For the signed webhook, open Developers / Workbench → Webhooks → Add destination, select Your account, and follow the API-version requirements of your integration.
  6. Events to send: select every event handled by your selected template, not just the checkout success event.

    For a custom project, use its webhook handler and delivery instructions as the authority. The following lists are the released template examples, not a required combined subscription.

    E-commerce: subscribe to all these events

    • checkout.session.completed
    • payment_intent.succeeded
    • payment_intent.payment_failed
    • checkout.session.expired
    • refund.created
    • refund.updated

    Taxi: subscribe to all these events

    • checkout.session.completed
    • checkout.session.async_payment_succeeded
    • checkout.session.expired
    • checkout.session.async_payment_failed
    • payment_intent.succeeded
    • payment_intent.payment_failed
    • charge.refunded
  7. Choose Webhook endpoint, give it a recognizable destination name such as "Preview Website", and enter the endpoint URL. E-commerce and Taxi use /api/stripe/webhooks. Custom projects may have a different route: use their documented path instead of blindly copying this template example.

    The hostname is preserved, including www. Use your deployed HTTPS origin for Stripe Dashboard delivery.

  8. Save the destination → open Destination details → reveal the Signing secret. Copy the whsec_… value into STRIPE_WEBHOOK_SECRET for that exact deployment and redeploy. A local Stripe CLI signing secret is different from a Dashboard destination secret.
  9. Configure the authenticated reconciliation schedule from your repository's Stripe guide. A browser return page is not proof of payment. Test successful checkout, failure/expiry, duplicate delivery, refunds, and recovery without the customer returning to the site.
  10. Use separate test and live keys, destinations, signing secrets, and deployment IDs. Never put the secret key or signing secret in a browser-visible variable. Taxi can omit Stripe entirely for cash-only operation; E-commerce requires it.
stripe — screenshot 1
Open full-size screenshot
1 / 3

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Media (Cloudinary)

Template-specific image upload architecture.

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME

Public Cloudinary cloud name used by image components and the unsigned upload widget.

Project-dependent
Browser-visibleFeature: cloudinary-widgetProvider docs
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET

Unsigned upload preset restricted for buyer-managed CMS uploads.

Project-dependent
Browser-visibleFeature: cloudinary-widgetProvider docs
CLOUDINARY_CLOUD_NAME

Cloudinary cloud name used by the server-side admin upload route.

Project-dependent
Server-onlyFeature: cloudinary-uploadProvider docs
CLOUDINARY_API_KEY

Private Cloudinary API key used only by the server-side admin upload route.

Project-dependent
Server-onlyFeature: cloudinary-uploadSecretProvider docs
CLOUDINARY_API_SECRET

Private Cloudinary API secret used only by the server-side admin upload route.

Project-dependent
Server-onlyFeature: cloudinary-uploadSecretProvider docs
CLOUDINARY_URL

Server-only Cloudinary connection URL, only for custom integrations that consume this combined credential.

Project-dependent
Server-onlyFeature: cloudinary-uploadSecretProvider docs
View setup instructions & screenshots
  1. Sign up at cloudinary.com and choose a plan appropriate for your intended use.
  2. Open your Dashboard / Product Environment and note the Cloud name. The Settings → API Keys page contains the API credentials.
  3. Server-side upload (for example, Business Landing): copy the Cloud name, API key, and API secret into the server-only fields CLOUDINARY_CLOUD_NAME, CLOUDINARY_API_KEY, and CLOUDINARY_API_SECRET. Never prefix the API secret with NEXT_PUBLIC_. Some custom integrations consume CLOUDINARY_URL instead; use it only if your project reads that variable.
  4. Browser upload widget (E-commerce / Taxi): copy the Cloud name into NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME. These templates do not need Cloudinary's private API key or secret for their widget.
  5. Open Settings → Upload → Upload presets → Add upload preset. Set the signing mode to Unsigned, choose an upload folder, and restrict file formats, size, transformations, and quotas.
  6. Save the preset and copy its exact name into NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET. An unsigned preset is public: its upload restrictions matter.
  7. Save the values, redeploy, and upload a small supported test image. Confirm that the image appears in Cloudinary and on your site. Use only the upload method your project implements; do not configure both methods by default.
cloudinary — screenshot 1
Open full-size screenshot

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Rate Limiting (Upstash)

Optional distributed serverless rate limiting.

UPSTASH_REDIS_REST_URL

Optional Upstash REST URL; configure with the token or provide equivalent external WAF protection.

Project-dependent
Server-onlyFeature: upstash-rate-limitProvider docs
UPSTASH_REDIS_REST_TOKEN

Optional Upstash REST token paired with UPSTASH_REDIS_REST_URL.

Project-dependent
Server-onlyFeature: upstash-rate-limitSecretProvider docs
View setup instructions & screenshots
  1. Go to upstash.com and sign in with Google or GitHub.
  2. Click Create Database, enter a name for this environment, and select an appropriate region near your server deployment.
  3. Open the new database and find the REST API section on its details page.
  4. Copy the HTTPS REST URL into UPSTASH_REDIS_REST_URL and the REST token into UPSTASH_REDIS_REST_TOKEN. Use REST credentials, not a Redis TCP connection URL or a read-only token.
  5. Add both server-only values in your hosting environment and redeploy. Use a separate database or an appropriately isolated setup for Preview.
  6. Test a protected endpoint with a small, controlled number of requests and verify the configured rate limit. If your project relies on external WAF protection instead, configure and test that rule: merely having a Cloudflare or Vercel account does not protect a specific endpoint automatically.
upstash — screenshot 1
Open full-size screenshot
1 / 2

Screenshots restored from the original guide. Provider interfaces may change; use the written instructions and your selected project's variable names if an older screenshot differs. Never share real credentials in screenshots.

Social Login

Optional Google OAuth credentials.

GOOGLE_ID

Google OAuth client ID; credentials authentication remains available without it.

Project-dependent
Server-onlyFeature: google-oauthProvider docs
GOOGLE_SECRET

Google OAuth client secret paired with GOOGLE_ID.

Project-dependent
Server-onlyFeature: google-oauthSecretProvider docs
GITHUB_ID

GitHub OAuth Client ID, only when the custom project implements GitHub sign-in.

Project-dependent
Server-onlyFeature: github-oauthProvider docs
GITHUB_SECRET

GitHub OAuth Client Secret. This is not a GitHub CMS personal access token.

Project-dependent
Server-onlyFeature: github-oauthSecretProvider docs
GOOGLE_CLIENT_ID

Alternative Google OAuth Client ID name used by some custom sites. E-commerce and Taxi use GOOGLE_ID instead; do not add both unless your project requires both.

Project-dependent
Server-onlyFeature: google-oauthProvider docs
View setup instructions

GitHub OAuth — only for custom sites that implement it

  1. Go to GitHub → Settings → Developer settings → OAuth Apps → New OAuth App.
  2. Enter an application name and your website's Homepage URL. Set the Authorization callback URL from your project's auth configuration; for a standard Auth.js GitHub provider it is https://yourdomain.com/api/auth/callback/github.
  3. Click Register application. Copy the Client ID and generate a Client Secret. Store them as GITHUB_ID and GITHUB_SECRET only if these are the names your project consumes.
  4. Use a separate app for local/Preview callbacks when needed. This is an OAuth application, not the GitHub PAT used by Agency Lite's CMS.

Google OAuth

  1. Open Google Cloud Console. Create or select your project; you may use the same project as Maps if that fits your setup.
  2. Open Google Auth Platform (or APIs & Services → OAuth consent screen). Configure the app name, support email, audience, and contact details. Choose External for a public-facing app and add test users while it is in testing.
  3. Open Clients → Create client (or Credentials → Create Credentials → OAuth client ID). Set Application type to Web application.
  4. Under Authorized redirect URIs → Add URI, enter the exact callback: https://yourdomain.com/api/auth/callback/google. Add http://localhost:3000/api/auth/callback/google to a development client when testing locally. Do not silently add or remove www.
  5. Click Create. Copy Client ID into GOOGLE_ID and Client Secret into GOOGLE_SECRET for E-commerce and Taxi. A custom project may instead consume GOOGLE_CLIENT_ID; use its exact documented names, not both by default.
  6. Save the server-only credentials, redeploy, and test sign-in. Before public launch, complete Google's publishing or verification steps required for your chosen scopes and audience.

Google Maps

Separate browser and server credentials for Taxi.

NEXT_PUBLIC_GOOGLE_MAPS_API_KEY

Browser-restricted Google Maps key used by the booking interface.

Project-dependent
Browser-visibleFeature: google-mapsProvider docs
GOOGLE_MAPS_SERVER_API_KEY

Separate server-restricted key with the Routes API enabled; never expose it to the browser.

Project-dependent
Server-onlyFeature: google-mapsSecretProvider docs
View setup instructions
  1. Go to Google Cloud Console → project selector → New Project. Name it after your site and connect a billing account for Maps usage.
  2. Open APIs & Services → Library. Enable Maps JavaScript API and the Places API variant your browser integration uses. Enable Routes API for Taxi's server-side route calculation. Enable Directions or Geocoding only if your custom integration actually uses them.
  3. Open APIs & Services → Credentials → Create Credentials → API key. Create a browser key and copy it into NEXT_PUBLIC_GOOGLE_MAPS_API_KEY.
  4. Open that key's settings. Under Application restrictions, choose Websites / HTTP referrers. Add your exact allowed sites, such as https://yourdomain.com/* and, for a development key, http://localhost:3000/*. Under API restrictions, allow only the browser APIs your app uses.
  5. Create a second key for the server and save it as GOOGLE_MAPS_SERVER_API_KEY. Restrict its APIs to Routes API for Taxi. Do not apply browser-referrer restrictions to this server key. Apply IP restrictions only when your server has known stable egress IPs.
  6. Save both values, redeploy, and test address search, route calculation, distance, and fare calculation. Monitor usage and configure billing alerts. Never reuse one unrestricted key across browser and server.

Advanced and Presentation

Optional overrides, analytics, and presentation defaults.

NEXT_PUBLIC_STORE_NAME

Optional store-name fallback when CMS settings are unavailable.

Project-dependent
Browser-visibleFeature: presentation-fallbacks
STORE_SUPPORT_EMAIL

Optional support-address fallback used in order emails.

Project-dependent
Server-onlyFeature: presentation-fallbacks
NEXT_PUBLIC_SUPPORT_EMAIL

Optional support address displayed on the license-required page.

Project-dependent
Browser-visibleFeature: presentation-fallbacks
NEXT_PUBLIC_CURRENCY_SYMBOL

Optional email and UI currency-symbol fallback; payment currency remains server controlled.

Project-dependent
Browser-visibleFeature: presentation-fallbacks
NEXT_PUBLIC_GA_ID

Optional Google Analytics measurement ID.

Project-dependent
Browser-visibleFeature: google-analyticsProvider docs
View setup instructions
  1. Configure only the analytics, presentation, support-contact, or security overrides listed for your project. Use the provider-issued identifier for analytics, not an API secret.
  2. Public presentation settings are visible to visitors. Keep signing keys and scheduler secrets server-only and generate separate values locally.
  3. Do not put a GitHub personal access token or other provider secret in public environment variables. Follow your repository's instructions for additional CMS integrations.

Need deployment help?

Our support team can help you deploy your website or even do it for you.

Include your project or template name and a redacted error message. Never send passwords, API keys, or other secret values.