Skip to main content

Environment Variables

Environment variables override corresponding settings from settings.json and are useful for container and CI/CD deployments.

Runtime Variables

VariableDefaultDescription
ROUTERLY_HOME~/.routerlyRoot directory for the service config and data (set automatically by the installer in the daemon unit). CLI auth tokens are always stored in ~/.routerly/cli/ regardless of this value.
ROUTERLY_PORT3000 (or from settings.json)TCP port the service listens on. Overrides port in settings
ROUTERLY_HOST0.0.0.0 (or from settings.json)Bind address. Overrides host in settings
ROUTERLY_PUBLIC_URLhttp://localhost:3000Externally reachable URL. Overrides publicUrl in settings
ROUTERLY_LOG_LEVELinfoLog verbosity. Overrides logLevel in settings. Values: error, warn, info, debug
NODE_ENVdevelopmentSet to production for production deployments (affects error verbosity and logging format)

Installer Variables

These variables are only used during the install/update process (install.sh, install.ps1, install.mjs) and have no effect at runtime.

VariableValuesDescription
ROUTERLY_SCOPEuser (default), systemInstall scope. user keeps all service config in ~/.routerly/; system moves service config and data to the platform system directory (/var/lib/routerly/ on Linux, /Library/Application Support/Routerly/ on macOS, C:\ProgramData\Routerly\ on Windows) and requires root/sudo. CLI auth tokens remain per-user in both cases.
ROUTERLY_DAEMONtrue, falseRegister as a background service after installation. Defaults to true
ROUTERLY_INSTALL_DIR(path)Override the installation directory

Docker / Container Usage

In Docker deployments, set ROUTERLY_HOME to the path of your mounted volume:

environment:
- ROUTERLY_HOME=/data
- NODE_ENV=production
- ROUTERLY_PORT=3000

Precedence

Environment variables always take precedence over values in settings.json. The lookup order is:

  1. Environment variable (highest priority)
  2. settings.json value
  3. Built-in default (lowest priority)