Variables
Set your app's environment variables, see the ones we add, and apply changes with a redeploy.
Variables are how your app gets its settings and secrets: API keys, FRONTEND_URL, APP_ENV… They're stored encrypted and given to your app as environment variables.
Set variables
Open your project, then the Variables tab. Add a key and a value, or paste a whole .env file: we split it into variables.

Changes need a redeploy
A running app keeps the variables it started with. After a change, the page offers Redeploy so the app picks it up.
From the terminal:
dock env set API_KEY=abc123 FRONTEND_URL=https://my-app.dockhosting.cloud
dock env set STRIPE_SECRET # no value: type or pipe it, so it stays out of your shell history
dock env unset OLD_KEY
dock env # the names (never the values)The variables we add
We add these when your app doesn't set them itself. Your own value always wins.
| Variable | What it is | Example |
|---|---|---|
| PORT | The port your app must listen on | 3000 (Node), 5000 (Python), 8080 (PHP, Go) |
| HOST | Listen on all interfaces | 0.0.0.0 |
| APP_URL | Your app's public address | https://my-app.dockhosting.cloud |
| HTTPS | The app is served over HTTPS | on |
| TRUSTED_PROXIES | Trust our edge's forwarded headers | * |
| DATABASE_URL | Linked database's connection URL | postgresql://user:pass@host:5432/db |
| DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD, DB_CONNECTION | Linked SQL database, Laravel-style | pgsql or mysql |
| MONGODB_URI, MONGO_URI, MONGO_URL | Linked MongoDB | mongodb://… |
| REDIS_URL | Linked Redis or Valkey | redis://… |
One exception: Laravel with SQLite
If your Laravel .env says DB_CONNECTION=sqlite and you link a SQL database, the database's settings replace the SQLite ones. Otherwise writes would go to a read-only file and fail.
Laravel defaults
For Laravel apps we also set APP_ENV=production, APP_DEBUG=false, SESSION_DRIVER=file, CACHE_STORE=file and QUEUE_CONNECTION=sync when they're missing, and generate an APP_KEY if you have none. Set your own APP_KEY so sessions survive redeploys.
