Skip to content

Environment Variables

Environment variables are managed per-service in .env files. The ./jarvis init command generates these files with appropriate defaults and auto-generated credentials.

Cross-Service Variables

These variables are used by multiple services:

Variable Used By Description
DATABASE_URL auth, command-center, recipes, config-service, notifications PostgreSQL connection string (e.g., postgresql://user:pass@host:5432/dbname)
SECRET_KEY auth JWT signing key (HS256). Must be the same across all services that validate JWTs.
ADMIN_API_KEY command-center Protects admin endpoints (node management, training jobs). Sent as a header or query parameter.
JARVIS_AUTH_BASE_URL ocr, command-center, logs, others URL of the auth service for validating app-to-app and node credentials.
JARVIS_CONFIG_URL all services URL of jarvis-config-service for service discovery.
JARVIS_CONFIG_URL_STYLE config-service URL format returned by config-service: dockerized (container names) or host (localhost/host.docker.internal).
DOCKER_HOST_ALIAS config-service Override the hostname Docker containers use to reach the host. Default: host.docker.internal.
JARVIS_NETWORK_MODE jarvis CLI Network mode: bridge (default), host, or standalone.

App-to-App Credentials

Every service that calls another service needs app-to-app credentials:

Variable Description
JARVIS_APP_ID This service's app ID (registered in jarvis-auth)
JARVIS_APP_KEY This service's app key (secret, registered in jarvis-auth)

These are generated by ./jarvis init and written to each service's .env file. Services send them as X-Jarvis-App-Id and X-Jarvis-App-Key headers when calling other services.

Infrastructure

Variable Default Description
POSTGRES_USER postgres PostgreSQL superuser name
POSTGRES_PASSWORD (generated) PostgreSQL superuser password
POSTGRES_HOST jarvis-postgres PostgreSQL hostname (container name in bridge mode)
POSTGRES_PORT 5432 PostgreSQL port
REDIS_URL redis://jarvis-redis:6379 Redis connection string
MINIO_ENDPOINT jarvis-minio:9000 MinIO object storage endpoint
MINIO_ACCESS_KEY (generated) MinIO access key
MINIO_SECRET_KEY (generated) MinIO secret key
MQTT_ALLOW_ANON false (fresh install) / true (upgrading a pre-existing .env) Mosquitto allow_anonymous toggle. The admin and installer generators lock fresh installs (false); regenerating .env for an install that predates this setting forces true (the transition window) unless the key is already present, in which case the existing value is preserved. An explicit operator override always wins. Compose's own fallback if the key is ever missing is ${MQTT_ALLOW_ANON:-true}. See Command Center: MQTT Broker Auth.

Admin / Installer

Variable Default Description
DOCKER_SOCKET /var/run/docker.sock Docker socket path. Override for TrueNAS or non-standard setups where the socket is in a different location.

Per-Service Variables

jarvis-command-center

Variable Description
ADMIN_API_KEY Admin endpoint protection
LLM_PROXY_URL URL of jarvis-llm-proxy-api
WHISPER_API_URL URL of jarvis-whisper-api
TTS_BASE_URL URL of jarvis-tts
NOTIFICATIONS_URL URL of jarvis-notifications

jarvis-llm-proxy-api

Variable Description
MODEL_PATH Path to the model file or directory
MODELS_DIR Directory for LLM model files. Default: ./.models relative to the compose directory. Used by the admin dashboard to list and download models.
BACKEND Inference backend: mlx, gguf, vllm
CONTEXT_LENGTH Maximum context window size

jarvis-tts

Variable Description
TTS_PORT API port (default: 7707)
TTS_PROVIDER Initial provider (piper or kokoro); see tts.provider setting for runtime switching
TTS_DEFAULT_VOICE Piper ONNX voice name (default: en_GB-alan-low)
TTS_KOKORO_VOICE Kokoro voice ID (default: bm_george)
TTS_KOKORO_SPEED Kokoro speech speed multiplier (default: 1.0)
HF_HOME Cache dir for Kokoro voice weights (default: /app/models/hf_cache)

jarvis-notifications

Variable Description
RELAY_URL URL of jarvis-notifications-relay for push delivery

jarvis-ocr-service

Variable Description
OCR_BACKEND OCR provider: apple_vision (macOS), tesseract, easyocr

jarvis-node-mobile (Mobile App)

Expo public variables are baked into the app bundle at build time via EAS profiles (eas.json).

Variable Default Description
EXPO_PUBLIC_MANUAL_CONFIG_URL "" (unset) DEV_MODE only. Baked config-service URL used as a Tier-0 fallback in config discovery when AsyncStorage has no manually-pinned URL (e.g. a fresh clearState e2e build in CI that can't mDNS-sweep the stack). Set to http://localhost:7700 in the development-e2e EAS profile. A UI-pinned URL always takes precedence. Inert in production builds (DEV_MODE is false and production profiles never set this variable).
EXPO_PUBLIC_DEV_MODE "false" Enables developer-only UI features (Simulator Mode panel, baked config URL fallback). Set to "true" in development and development-e2e EAS profiles.
EXPO_PUBLIC_PANTRY_URL "" Override URL for the pantry store service. Falls back to config-service discovery if unset.
EXPO_PUBLIC_SIMULATED_NODE_IP "127.0.0.1" IP address of the simulated node in Simulator Mode (DEV_MODE only).
EXPO_PUBLIC_NODE_PORT "8080" Port for communicating with the node in Simulator Mode (DEV_MODE only).

Network Egress & Offline Mode

Jarvis is offline by default; every outbound-internet capability is opt-in. These variables enable specific external traffic. Full guide: Network Egress & Offline Mode.

Variable Service Default Enables
JARVIS_ALLOW_UPDATES jarvis-admin false GitHub update check on the dashboard + self-update /apply. Also honored via ~/.jarvis/admin.json (allowUpdates).
JARVIS_ALLOW_UPDATES jarvis-node-setup false Node OTA self-update (download + apply a release). Also settable as allow_updates in the node's config.json.
JARVIS_WAKE_WORD_MODEL_AUTODOWNLOAD_ENABLED jarvis-node-setup false Downloading the openWakeWord model from GitHub on boot. Also wake_word_model_autodownload_enabled in config.json.
WHISPER_ALLOW_MODEL_AUTODOWNLOAD jarvis-whisper-api false Auto-downloading a Whisper model from HuggingFace when none exists locally. DB setting: whisper.allow_model_autodownload.
TTS_PROVIDER jarvis-tts piper Selecting the TTS backend. piper is local (no egress); kokoro downloads weights from HuggingFace. DB setting: tts.provider.

DB-backed egress toggles

Some egress controls are runtime settings (not env vars): web_search.enabled and web_scraping.allow_external (household), and updates.allow_check (command-center, gates the node-update GitHub check). Manage these via the mobile app / settings server. See the offline-mode guide.

Environment Files

  • .env files are gitignored and never committed
  • .env.example files show required variables with placeholder values
  • ./jarvis init generates .env files from templates with real credentials
  • Use ./jarvis init --force to regenerate all .env files

Settings Service vs Environment Variables

Runtime-configurable settings (like LLM model selection, prompt provider) are managed through jarvis-settings-server and stored in PostgreSQL, not in environment variables. Environment variables are for infrastructure configuration that requires a service restart to change.