Manage environment variables
Use this guide to add or change environment variables in Fiveonefour Hosting. Choose the right scope first, then update the matching settings page so the correct project or branch deployment picks up the new value.
Before you start, make sure you know:
- whether the value should apply to an entire org, one project, or one branch
- which project or branch you want to affect
- that a new deployment is required before the change takes effect
1. Choose the right settings page
| Settings page | Use it when you want to | What it shows |
|---|---|---|
| Organization settings | Set a default inherited across the org | Only org-scoped vars |
| Project settings | Set a project default or verify the effective project value | The resolved org + project set for that project |
| Branch settings | Override one branch or inspect override state | The org + project + branch variants together |
The UI labels these rows as Org setting, Project setting, and Branch setting.
2. Pick the right scope
Hosting has three scopes:
orgapplies across the organizationprojectapplies to one project and all of its branch deploymentsbranchapplies to one branch and overrides the same key for that branch only
Precedence is branch > project > org.
Use org when most projects should share the same value.
Use project when one project needs a different default than the org value.
Use branch when one preview branch needs a temporary override without changing the rest of the project.
Example:
- Set
CLICKHOUSE_HOSTatorgif most projects should share the same default. - Set
CLICKHOUSE_HOSTatprojectif one project needs a different value than the org default. - Set
CLICKHOUSE_HOSTatbranchif one preview branch needs a temporary override without changing the rest of the project.
3. Enter a valid key and value
- Keys must match
^[A-Z][A-Z0-9_]*$ - Keys must start with a letter
- Keys can contain only uppercase letters, numbers, and underscores
- Keys are capped at 255 characters
- Values are required
- Values are capped at 10 KB encoded size
Examples:
API_URLis validapiUrlis invalid1PASSWORD_KEYis invalid because it starts with a number
4. Manage overrides deliberately
- The same key can exist at
org,project, andbranchscope at the same time. - A project-scoped variable is inherited by every branch deployment for that project unless a branch-scoped variable with the same key overrides it.
- Org-scoped variables are inherited everywhere unless a project or branch override replaces them.
- Updates keep the variable in its existing scope. To move a key between scopes, create it at the new scope and delete it from the old one.
If the same key exists at multiple scopes, the project page shows the effective value after org and project inheritance are resolved. The branch page shows all three scoped variants together so you can see which row is overriding another.
5. Redeploy to apply the change
Fiveonefour resolves environment variables at deploy start, not when you open the settings page.
For a branch deployment, Fiveonefour resolves the final env-var set for that branch and sends the resolved {name, value} list downstream. That means:
- branch-scoped vars are stored as branch settings and apply to future deployments for that branch
- project-scoped vars keep flowing into branch deployments unless overridden
- changing a value affects new deployments, not historical ones
Changed-since-deploy checks are project-wide
When Hosting says environment variables changed since a deployment, that check includes org-scoped vars, project-scoped vars, and all branch-scoped vars under the same project. It is not limited to the current branch.
Recommended workflow
- Put shared defaults at
org. - Put project-specific values at
project. - Use
branchfor preview-only or temporary branch-specific overrides. - After changing environment variables, start a new deployment for the project or branch that should pick them up.