Skip to main content

Environment variables

VariableDefault / exampleMeaning
ENVproductionApp environment (also affects usersync defaults)
CONTAINERWS_INITautoauto / systemd / direct — PID 1 strategy in containers
ROOT_PWD(set your own)Root password at first boot (images)
ROOT_SSH_PUBLIC_KEYemptyOptional authorized key for root SSH
containerdockerHint for container-aware scripts
NVIDIA_VISIBLE_DEVICESallGPU visibility
NVIDIA_DRIVER_CAPABILITIESallNVIDIA driver caps
PORT / ADDRESS9000 / 0.0.0.0Main HTTP(S) listen
ENABLE_HTTPSfalseTLS on the same port; certs under config SSL dir
DATABASE_URLprod: /config/containerws/database/database.sqliteSQLite path
MCP_PORTunsetStandalone MCP HTTP listener
MCP_TOKENunsetOptional bootstrap MCP auth token
MCP_ADDRESS0.0.0.0Standalone MCP bind
SYNC_USERSon when ENV=productionLinux ↔ panel user sync
CWS_VNC_PORT_MAP/config/containerws/vnc-port-map.txtPer-user VNC/noVNC ports
CWS_VNC_SESSION_DIR/config/containerws/vnc-sessionsVNC session files

Daemon installs also write /etc/containerws/environment (ENV=production plus commented optional keys).

Core server values can also live in SQLite os_environments (Settings → Environments). Precedence is generally: flags → environment → config file → database → defaults.