fargone / docs / environment-variables
Environment variables configure your app at runtime. They are set per-app and injected into the container on every deploy.
CLI
fargone env my-app # list env vars
fargone env set my-app NODE_ENV=production # set one
fargone env set my-app KEY1=val1 KEY2=val2 # set multiple
fargone env unset my-app KEY # remove one
Web
Open your app's detail page and navigate to the Environment section. Add, edit, or remove variables from the UI.
How they are injected
Environment variables are assembled in this order on every deploy:
PORT={internalPort}(default3000)- Your custom env vars
- Database connection strings (for all
RUNNINGdatabases) - CDN vars (
FARGONE_CDN_*)
The full set is passed to the Docker container at creation time.
When changes take effect
Env var changes do not restart your app. They take effect on the next deploy. Trigger a redeploy after changing variables:
fargone env set my-app NEW_VAR=value
fargone apps deploy my-app
Masked display
Env var values are masked as ********** in the CLI and truncated in the web UI. Values are stored as plain text server-side.
Built-in variables
These are injected automatically — you do not need to set them:
| Variable | Source | Description |
|---|---|---|
PORT |
Platform | Internal port your app should listen on (default 3000) |
DATABASE_URL |
PostgreSQL | Database connection string |
REDIS_URL |
Redis | Redis connection string |
MARIADB_URL |
MariaDB | MariaDB connection string |
MONGODB_URL |
MongoDB | MongoDB connection string |
FARGONE_CDN_URL |
CDN | Upload endpoint |
FARGONE_CDN_PUBLIC_URL |
CDN | Public file serving base URL |
FARGONE_CDN_TOKEN |
CDN | Auth token for uploads |
FARGONE_CDN_PREFIX |
CDN | Namespace prefix |