Skip to content

Environment variables

hal0 reads its configuration primarily from TOML under /etc/hal0, but a set of environment variables (mostly written into the API systemd unit’s env file) control the server, override paths, and tune install/update behaviour. The most useful ones are below.

VariableWhat it doesDefault
HAL0_PORTAPI listen port — hal0-api.service’s ExecStart binds --port ${HAL0_PORT}. The API binds 0.0.0.0 unconditionally.8080
HAL0_SELF_BASE_URLBase URL hal0 uses to re-enter its own /v1 surface (omni router).http://127.0.0.1:8080
HAL0_API_URLBase URL the hal0 CLI (and bundled agents) talk to. Point it at a remote box instead of the local API.http://127.0.0.1:8080
HAL0_UI_DISTOverride path to the built dashboard bundle (ui/dist).unset (FHS/editable autodetect)
HAL0_ALLOWED_ORIGINSComma-separated browser Origin allowlist for the agent-chat WebSocket upgrade (/agents/* chat proxy) — not general API CORS; there is no CORS middleware on /api//v1.http://hal0.local, http://localhost:5173, http://127.0.0.1:8080
HAL0_ACTIVITY_RETENTION_DAYSOverride the activity/audit store retention window.from hal0.toml ([activity].retention_days, 30)
VariableWhat it doesDefault
HAL0_HOMERelocate all four roots (code/config/state/log) under one prefix.unset (use FHS)
HAL0_MODEL_STOREModel-store directory slot containers bind-mount (highest precedence).[models].store, then the conventional mount
VariableWhat it doesDefault
HAL0_CONTAINER_RUNTIMEContainer runtime binary for slots./usr/bin/podman, falling back to /usr/bin/docker
HAL0_TOOLBOX_IMAGE_FLMOverride the FLM (NPU) toolbox image ref.from manifest.json
HAL0_TOOLBOX_IMAGE_KOKOROOverride the Kokoro TTS toolbox image ref.from manifest.json
HAL0_TOOLBOX_IMAGE_QWEN3TTSOverride the Qwen3-TTS toolbox image ref.from manifest.json
HAL0_TOOLBOX_IMAGE_COMFYUIOverride the ComfyUI toolbox image ref.from manifest.json

Companion services (Open WebUI, ComfyUI, Hermes, Hindsight, n8n) can be given a browser-facing URL that differs from their loopback port — useful behind a reverse proxy, or when a service binds loopback-only. See Companion services for the full picture.

VariableWhat it doesDefault
HAL0_HOSTNAMEHostname used to build the <host>.local mDNS name (set by the install wizard). Wins over socket.gethostname().detected hostname
HAL0_OPENWEBUI_PUBLIC_URLPublic/proxy URL shown for Open WebUI instead of the LAN host:3001 guess.unset
HAL0_OPENWEBUI_PROBE_URLHealth-probe URL override for Open WebUI’s /api/services status.unset
HAL0_COMFYUI_PUBLIC_URLPublic/proxy URL for ComfyUI — also avoids the mixed-content block a plain http://host:8188 link hits from an HTTPS dashboard.unset
HAL0_HERMES_PUBLIC_URLPublic URL for Hermes. Hermes binds loopback-only (:9119); this is the only way a browser link is shown for it.unset (no link shown)
HAL0_N8N_PUBLIC_URLPublic URL for an operator-run n8n instance (n8n is external/unmanaged).unset
HAL0_N8N_PROBE_URLHealth-probe URL for n8n. n8n’s status is unmonitored unless this is set.unset
VariableWhat it doesDefault
HAL0_MEMORY_ENABLEDEnable the memory subsystem (Hindsight-backed, /mcp/memory, /api/memory/*).0 (disabled) if unset
HAL0_MCP_ALLOWED_HOSTSComma-separated Host headers (or host:port / host:*) added to the MCP mounts’ localhost allowlist. * disables the DNS-rebinding check entirely.unset (localhost only)
HAL0_MCP_ALLOWED_ORIGINSComma-separated browser origins for MCP transport requests. When unset, http/https origins are derived from HAL0_MCP_ALLOWED_HOSTS.unset (derived from hosts)
VariableWhat it doesDefault
HF_TOKENHugging Face token used when pulling gated/private models. HUGGING_FACE_HUB_TOKEN is accepted as a fallback name.unset
HF_HOMEHugging Face cache root used by the Kokoro TTS toolbox for its downloaded voice assets./var/lib/hal0/.cache/huggingface

These are honoured by the installer / bootstrap scripts.

VariableWhat it doesDefault
HAL0_PREFIXInstallation root./usr/lib/hal0 (system) / $PWD/.hal0ai (no-sudo)
HAL0_CHANNELRelease channel for the default download URL.stable
HAL0_INSTALL_SKIP_VERIFYInstall from an unverified source (skip the cosign check). Not recommended.0
HAL0_UPDATE_SKIP_COSIGNSkip cosign signature verify on updates. Only honoured on pre-release/dev builds — silently ignored on stable v1+. Not recommended.0
HAL0_NO_PROBESkip the hardware probe during install.unset