Environment (Env-vars)
Last updated
May be stale
This page was last updated ago, on 26 September 2026. Check what it says against the code before relying on it.
The CityRP env.lua (ENV) provides a wrapper for gmsv_environ, giving access to the runtime (Docker) environment variables.
API
Get environment variable
ENV:Get("name")
Returns string or nil when environment variable was not found.
Example:
local password = ENV:Get("MY_PASS")
Deployment variables
The !branch and !deploy commands (core/plugins/github/sv_init.lua) trigger this server's CD workflow on a forge through its workflow-dispatch API.
| Variable | Default | Purpose |
|---|---|---|
FORGE_PROVIDER |
gitea |
Which forge to dispatch to: gitea or github. Empty counts as unset. An unknown value logs an error and falls back to gitea. |
GITHUB_API_BEARER / GITEA_API_BEARER |
none | API token for that forge. Takes precedence over GIT_API_BEARER, so a server can hold a token for each forge and switch with FORGE_PROVIDER alone. |
GIT_API_BEARER |
none | API token for whichever forge is selected, used when its forge-specific variable is unset or empty. There is no built-in token: without one, !branch and !deploy dispatch nothing and tell the caller why. The token only needs permission to dispatch workflows. |
GITHUB_API_URL / GITEA_API_URL |
none | Dispatch URL for that forge. Takes precedence over GIT_API_URL. |
GIT_API_URL |
The provider's cityrp2 dispatch URL |
Overrides the dispatch URL when the forge-specific variable is unset or empty. Must contain one %s for the workflow file name. |
GIT_WORKFLOW_TO_DISPATCH |
cd.development.yml / cd.development2.yml / cd.development3.yml by LLServerBetaType |
Overrides which workflow file is dispatched. |
Gameplay variables
| Variable | Default | Purpose |
|---|---|---|
SCOREBOARD_VERSION |
v5 |
The scoreboard version (v1, v2, v3, v4 or v5) the server starts on. !scoreboard v1|v2|v3|v4|v5 switches it until the next restart (Moderator S2+). An unrecognised value logs an error and falls back to v5. |
HowTo: Setup environment variables (panel)
In order to pass environment variables to the runtime, you will have to register them via the Gamepanel first.
Note
If you are not a panel admin, please ask one to register the variables for you.
- Login to the admin interface: https://panel.limelightgaming.net/admin
- Click on "Nests" on the sidebar at the bottom left
- Select the Egg Group "Limelight"
- Open the Egg "Garrys Mod - CityRP" and click on "Variables"
- Now you can add environment variables and decide whether panel users shall view+edit them etc...
HowTo: Edit exisiting environments variables for a server
-
Just select a server in the panel and click on the "Startup" menu.
-
In the startup menu you can edit environment variables for that server.
Note
This only works when the admin has given view/edit permissions for these environment variables. If not, only an admin can edit them in the admin panel startup menu for that server.