Skip to Content

Environment

One set of keys feeds every app.

Locally the values come from the Infisical dev environment, loaded by the root scripts (see secrets). A .env at the repo root is optional and git-ignored. packages/env validates every value with zod, so a bad one fails at start with a clear message. .env.example lists every key with its default.

Urls

KeyWhat it is
API_URLhow the Next servers reach the api, an internal address on docker
API_PUBLIC_URLthe api url the browser can reach
WEB_URLthe landing page
WHATSAPP_CONTACT_NUMBERthe landing page WhatsApp button: country code and number, a leading + and spaces are ignored. Empty hides the button
DASHBOARD_URLthe dashboard
DOCS_URLthis site; apps/web reads it through packages/env for the Docs links on the landing page

Database and auth

KeyWhat it is
DATABASE_URLpostgres connection string
POSTGRES_PORThost port of the local docker postgres
POSTGRES_USER, POSTGRES_DBrole and database of the docker postgres, default ritorno (staging and production keep le_hoetel, see deploy runbook)
SEEDdemo fills an empty database with demo data, none never seeds. Defaults to demo in the api (local, previews, staging deploys set it), none in the compose files. Ignored with a warning when DEPLOY_ENV=production, or when DEPLOY_ENV is unset or local and the database is on another machine
DEMO_PASSWORDpassword of the seeded demo accounts, default demo-ritorno-2026. The default is public: previews and docker-compose.deploy.yml (staging) get their own value. Read only while seeding an empty database
DEMO_VIEWER_PASSWORDpassword of the view only sales viewer, its own and never DEMO_PASSWORD. Unset on a deployed env (DEPLOY_ENV other than local) means the account is not created; locally it defaults to demo-ritorno-2026. Read only while seeding an empty database
BETTER_AUTH_SECRETopenssl rand -base64 32
ADMIN_EMAIL, ADMIN_PASSWORDthe first admin, created or reset on every api start
LEADS_NOTIFY_EMAILwho is emailed when a hotel requests a demo on the landing page, defaults to ADMIN_EMAIL
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECREToptional github sign-in
GITHUB_REPO, GITHUB_TOKENrepo for the landing page stars and the feedback widget, and a token with Issues: write on it

Messaging

KeyWhat it is
MESSAGING_LIVEtrue lets email and whatsapp really send, default false
RESEND_API_KEY, EMAIL_FROM, RESEND_WEBHOOK_SECRETemail through Resend, and its bounce and complaint webhook
KAPSO_API_KEY, WHATSAPP_PHONE_NUMBER_ID, KAPSO_WEBHOOK_SECRETwhatsapp through Kapso, and its status webhook
WHATSAPP_BUSINESS_NUMBERthe shared number behind that phone id, digits only: the QR page's Continue on WhatsApp button. Empty hides it

Messages only leave the server when NODE_ENV=production and MESSAGING_LIVE=true. Everywhere else (local, tests, previews, staging) every channel logs message not sent, log-only provider with the channel and template name, never the recipient or the text. Only the production deploy sets MESSAGING_LIVE=true, so a preview can never message a real guest even with real keys in its env.

Keys for modules you left out of the project are not in .env.example. Adding a key means adding it to the zod schema in packages/env first.

On this page