Skip to main content

Environment variables

Nothing here is required: the app works with its defaults and everything is set in the app. These exist for scripted setups and Docker.

VariableDefaultMeaning
SERVER_PORT4600port (also --port)
DATA_MODErealreal or demo (also gridcity demo)
CONFIG_DIROS config folderwhere the config files live (/config in Docker)
DATA_DIROS data folderdatabase, history, encrypted credentials (/data in Docker)
SSH_DIR~/.sshkeys and known_hosts the app manages (/data/ssh in Docker)
KNOWN_HOSTS_FILESSH_DIR/known_hoststhe known_hosts file the app trusts and writes to
SSH_CONFIG_FILESSH_DIR/configread by the importer
SECRETS_KEYgenerated vault.keybase64 32-byte key for stored credentials (openssl rand -base64 32)
ALERT_WEBHOOK_URLnoneadds a read-only webhook alert channel
LOG_LEVELwarn (npm), info (source)fatal … trace
PROJECT_NAMEGRIDCITYdisplay name and folder names
HOST127.0.0.1bind address; anything but loopback is refused (outside Docker)
OPENAI_API_KEY, GEMINI_API_KEY, ANTHROPIC_API_KEYnoneAPI-key sign-in for agents started in the app

Variables used by a resource entry (passwordEnv: ORDERS_DB_PASSWORD, AWS keys) are read from the environment the app runs in.

When installed from npm, the app does not read .env files from the folder it is started in. From a source checkout, .env.example and .env at the repository root are read (real environment variables win).