Skip to Content
DocumentationReferenceEnvironment Variables

Environment variables

Environment variables configure the Hub stack. Most are set in .env (generated by the installer or cihub wizard) and are not intended to be edited manually. Use custom settings or custom environment variables for user-facing changes.

The variables below are internal to the Hub stack. Editing them incorrectly can break your installation. Always stop the stack before editing and restart with cihub up prod --detached.

Core

VariableDescriptionDefault
CI_HUB_VERSIONHub version string. Set automatically at build time — do not override.(build-time)
CI_HUB_ENVIRONMENTRuntime environment: production, staging, or development.production
INTERNAL_IPLAN IP of the host machine. Used to generate local dashboard links.(auto-detected)
ARCHITECTUREHost CPU architecture: amd64 or arm64.amd64
ROOT_FOLDER_HOSTAbsolute path on the host used for Docker volume mounts.(required)
JWT_SECRETSecret used to sign authentication tokens.(required)
NODE_ENVNode.js environment: production, development, or staging.production
LOG_LEVELLog verbosity: debug, info, warn, or error.info
TZTimezone passed to apps that respect it.UTC
DEVICE_IDDevice identifier assigned during CI Account pairing. Set automatically.(set on pairing)

Docker

VariableDescriptionDefault
DOCKER_SOCKET_PATHHost path to the Docker socket that Hub mounts to manage app containers. Set this when running Docker Desktop on Linux or a rootless daemon, where the socket is not at the default location. Give the path only — no unix:// prefix./var/run/docker.sock
DOCKER_GIDGroup ID of the host docker group, so the Hub container can read the mounted socket. Detected automatically at startup.(auto-detected)

Hub resolves the socket automatically: it honours DOCKER_HOST, then checks Docker Desktop’s Linux locations ($XDG_RUNTIME_DIR/docker.sock, ~/.docker/run/docker.sock), then falls back to /var/run/docker.sock. Set DOCKER_SOCKET_PATH only if that detection picks the wrong one — see Install Docker.

Networking

VariableDescriptionDefault
DOMAINPublic domain used for Traefik routing and exposed apps.(required)
LOCAL_DOMAINLAN domain for locally-accessible app URLs. Apps are served at <app-name>.<LOCAL_DOMAIN>. When unset, Hub falls back to DOMAIN, then to localhost. See Finding Your App’s URL.(falls back to DOMAIN, then localhost)
HTTP_PORTHost port Traefik listens on for HTTP traffic.80
HTTPS_PORTHost port Traefik listens on for HTTPS traffic.443
API_PORTPort the Hub backend API is exposed on.5002
ACME_EMAILEmail address for Let’s Encrypt certificate notifications.(optional)
LOCALSet to true to skip HTTPS requirements in dev setups.false

Database (PostgreSQL)

VariableDescriptionDefault
POSTGRES_HOSTDatabase hostname inside the Docker network.ci-hub-db
POSTGRES_DBNAMEDatabase name.companiondb
POSTGRES_USERNAMEDatabase user.companion
POSTGRES_PASSWORDDatabase password.(required)
POSTGRES_PORTDatabase port.6543

Message queue (RabbitMQ)

VariableDescriptionDefault
RABBITMQ_HOSTRabbitMQ hostname inside the Docker network.ci-os-hub-queue
RABBITMQ_USERNAMERabbitMQ user.companion
RABBITMQ_PASSWORDRabbitMQ password.admin
RABBITMQ_PORTRabbitMQ AMQP port.5672
QUEUE_TIMEOUT_IN_MINUTESMinutes before a queued action (install, update) times out.5

Inference

VariableDescriptionDefault
OLLAMA_URLURL Hub uses to reach a running Ollama instance.http://host.docker.internal:11434
VLLM_URLURL for a vLLM inference server (when available).http://ci-hub-vllm:8000
LEMONADE_URLURL for Lemonade cloud-fallback inference.http://ci-hub-lemonade:13305

Cloud & CI Account

VariableDescriptionDefault
CI_CLOUD_URLURL of the hub.ci.computer backend. Used for device registration, app store, and sync.(required)

Tailscale (private VPN)

VariableDescriptionDefault
TAILSCALE_AUTHKEYPre-authentication key from tailscale.com  for unattended login. Optional; interactive setups can sign in from Hub instead.(optional)
HUB_TAILSCALE_EXTRA_ARGSOverrides the arguments passed to tailscale up. The default accepts routes and advertises 172.18.0.0/16.(optional)
PRIVATE_VPN_USER_DISABLEDSet to true to opt out of the default private-vpn sidecar profile.false

Feature flags

VariableDescriptionDefault
DEMO_MODEEnables demo mode with a limited, read-only feature set.false
GUEST_DASHBOARDAllows unauthenticated access to the dashboard.false
DISABLE_PASSWORD_RESETDisables password reset flows.true
ALLOW_ERROR_MONITORINGSends anonymous crash reports to the CI team.true
ALLOW_AUTO_THEMESEnables seasonal theme changes based on time of year.true
PERSIST_TRAEFIK_CONFIGPrevents Hub from overwriting Traefik config on restart.false
ADVANCED_SETTINGSExposes advanced settings in the dashboard UI.false
EXPERIMENTAL_INSECURE_COOKIEUses insecure cookies. Only for HTTP-only dev setups.false
MAX_BACKUPSMaximum number of backups to retain. 0 = unlimited.0

Error monitoring (Sentry)

All Sentry variables are optional. Leave unset to disable error reporting.

VariableDescription
SENTRY_DSNBackend Sentry DSN.
SENTRY_ENVSentry environment tag (e.g. production).
SENTRY_RELEASEBackend release identifier (e.g. ci-hub-backend@4.5.0).
VITE_SENTRY_DSNFrontend Sentry DSN.
VITE_SENTRY_RELEASEFrontend release identifier (e.g. ci-hub-frontend@4.5.0).
SENTRY_DESKTOP_DSNDesktop app Sentry DSN.

Legacy variables

These variables are still accepted for backward compatibility but should not be used in new installations.

VariableReplaced byNotes
DNS_IP(removed)Legacy DNS override, no longer used by the stack.
NGINX_PORTHTTP_PORTHub uses Traefik, not nginx. Variable still read by the config schema.
NGINX_PORT_SSLHTTPS_PORTHub uses Traefik, not nginx. Variable still read by the config schema.
HEADSCALE_PREAUTH_KEYTAILSCALE_AUTHKEYOld VPN naming from an earlier release.

App-specific variables

Every installed app receives the system variables above plus these app-scoped ones, resolved at install time:

VariableDescription
APP_PORTThe port the app listens on.
APP_IDThe app’s unique identifier.
APP_DATA_DIRPath where the app’s persistent data is stored.
APP_EXPOSEDtrue if the app is exposed via Traefik.
APP_DOMAINApp’s FQDN if exposed, otherwise ip:port.
APP_EXPOSED_DOMAINDomain the user configured for public exposure, if set.
APP_LOCAL_DOMAINLocal domain the app is reachable on.
APP_HOSTSame as APP_DOMAIN but without the port in non-exposed scenarios.
APP_PROTOCOLhttp or https.
Last updated on