Skip to content

Environment Variables

Runtime environment variables read by norsk-ctl. The daemon picks these up at startup; the CLI honours the port and store-dir ones for daemon discovery.

These are variables for the daemon process itself. To set environment inside an instance’s containers — cloud credentials, a proxy, a CA bundle — see Instance Environment.

VariableDefaultDescription
NORSK_CTL_STORE_DIR~/.norsk-ctlTop-level state directory. Holds config.yaml, norsk-ctl.db, certs/, logs
NORSK_CTL_CONFIG_DIRderived from STORE_DIROverride just the config-file location
NORSK_CTL_STATE_DIRderived from STORE_DIROverride just the SQLite-database location
NORSK_CTL_LOG_DIR<STORE_DIR>/logOverride the daemon’s log directory
NORSK_CTL_PORT8333Port the daemon listens on (API + web UI + /mcp). Honoured by both daemon and CLI
NORSK_DISCOVERY_TOKEN—Shared secret for the node’s norsk-discovery service. When set, the daemon starts the discovery container with it, presents it when registering launched instances, and hands it to each instance (as NORSK_LINK_DISCOVERY_TOKEN) so their links can resolve through the service
NORSK_CTL_PROXY_CONTAINERnorsk-proxyDocker container name for the nginx proxy
NORSK_CTL_CPU_MONITOR_CONTAINERnorsk-ctl-cpu-monitorDocker container name for the host CPU sampler sidecar
NORSK_CTL_UPGRADE_CHECK1Set to 0 to disable the upgrade-check poll against the S3 channel pointer
NORSK_CTL_DOWNLOAD_URLS3 production URLOverride the base URL for binary downloads (used by upgrade + install scripts)
NORSK_CTL_SIDELOAD_INDEX_URLS3 production URLOverride the published GPU sideload bundle index (sideload-index.json) — point at a staging bucket or an air-gap mirror
NORSK_CTL_SIDELOAD_USAGE_URLS3 production URLOverride the published GPU sideload usage map (sideload-usage.json), which maps a media image ref to its bundle content hashes so the cache can be warmed before the image is pulled. Point it alongside the index when using a staging bucket or mirror
PROXY_PORTderived (proxyPort field, else 443)Override the nginx proxy host port
NORSK_ADMIN_PASSWORD—Read by install.sh (and friends) to set the initial proxy user password without putting it on the command line. Must be exported — a bare NORSK_ADMIN_PASSWORD=… assignment is not inherited by the script, which then prompts as if the value were never supplied. Must be at least 8 characters and contain a digit

Read by install.sh and the product bootstraps (install/studio.sh, install/probe.sh). Each has an equivalent flag; the flag wins.

VariableDefaultDescription
NORSK_CTL_VERSIONchannel latestInstall a specific CLI version instead of the channel head. Same as --version
NORSK_CTL_BIN—Install from a local binary rather than downloading. Same as --bin
NORSK_CTL_CHANNELlatestRelease channel to resolve when no explicit version is given
NORSK_CTL_BASE_URLS3 production URLBase URL the installer downloads binaries and bootstraps from. Point at a mirror or staging bucket
NORSK_CTL_INSTALL_DIR~/.norsk-ctl/versions (local)Where versioned binaries are kept
NORSK_CTL_SHIM_DIR~/.local/bin (local)Where the PATH-visible norsk-ctl symlink is written
NORSK_KEEP_VERSIONS3How many previously installed binaries to retain when upgrading
NORSK_PUBLIC_HOST—Host or IP clients use to reach the box, read by the installer and the GCP image bake. Equivalent to install.sh --public-host
NORSK_PROXY_PORT443Host port the proxy listens on, for the same installers
NORSK_KEY_PATH—Path to your TLS private key. Required when NORSK_CERT_SOURCE=user
NORSK_CTL_SKIP_PORT_CHECK—Set to 1 to install even when a port we need (8333, the proxy port, the HTTP redirect port) is already in use. The check normally refuses before anything is installed and names what holds each port; override it when you are about to stop that service yourself

Set automatically by the daemon for its own subprocesses, or used by the test suite. Not for normal operator use.

VariablePurpose
NORSK_CTL_ENVproduction / development — affects log formatting and a few feature toggles
NORSK_CTL_SKIP_PROXY_BOOTSkip launching the nginx proxy at daemon startup (test seam)
  • Configuration — config.yaml fields (the canonical settings surface)
  • Ports — proxy port, daemon port, ingest ports