Apps & databases

How do environment variables work?

Environment variables are the settings and secrets your app reads, such as API keys and database addresses. You set them for each site in the dashboard, and your app can read them both while it builds and while it runs.

Add them one at a time or paste a whole .env file. Saving one variable never touches the others.

Choose Save & Redeploy to apply a change. This matters for Next.js: values whose names start with NEXT_PUBLIC_ are written into the app when it builds, so changing one needs a fresh build.

If you deploy with your own Dockerfile, values the build itself needs go in the build arguments setting, and environment variables reach the running app.

Attach a managed database to the site and the dashboard offers to fill in DATABASE_URL, REDIS_URL or CLICKHOUSE_URL for you. You can export all your variables as a .env file at any time.

Still unsure? Ask us

Open a ticket and it lands with the UK engineers who run the platform.

Open a ticket
Free plan forever · no card required

See it for yourself

Let the AI Website Builder build you a site. It costs nothing and takes minutes.