Skip to main content

This page lists essential environment variables used by Daployi services.

Core

  • API_PORT: Port exposed by the API container (server)
  • WEB_PORT: Port exposed by the Web UI container (web)
  • NODE_ENV: development or production
  • LOG_LEVEL: info, warn, error, debug

MongoDB

  • MONGO_INITDB_ROOT_USERNAME (mongodb container)
  • MONGO_INITDB_ROOT_PASSWORD_FILE (mongodb container, when using Compose secrets)
  • MONGODB_URI (server, worker)
  • MONGODB_DB_NAME (server, worker) — default: daployi
  • MONGO_USER (Compose .env helper variable)
  • MONGO_PASSWORD_ENC: URL-encoded password for use in MongoDB connection string

Redis

  • REDIS_HOST (server, worker)
  • REDIS_PORT (server, worker) — default: 6379 inside the network
  • REDIS_PASSWORD (server, worker)
  • REDIS_DATABASE (server, worker) — default: 0

Auth

  • JWT_SECRET (server)
  • JWT_EXPIRES_IN (server) — e.g., 7d

WebAuthn (Passkeys)

  • WEBAUTHN_RP_ID (server) — Relying Party ID used for WebAuthn. Usually your effective domain (e.g., example.com). In development you can use localhost. Must be a registrable domain or localhost.
  • WEBAUTHN_RP_NAME (server) — Human‑readable application name shown by the browser when registering or using a passkey (e.g., Daployi).
  • WEBAUTHN_ORIGIN (server) — The exact origin (scheme + host + port) of the web client that initiates WebAuthn, for example http://localhost:3000 or https://app.example.com. This must match the URL users load in the browser.

Web UI

  • NUXT_PUBLIC_API_BASE (web)
  • NUXT_PUBLIC_WS_BASE (web)
  • NUXT_PUBLIC_AGENT_VERSION (web) — optional

Example .env (used by docker compose)

API_PORT=4000 WEB_PORT=3000 LOG_LEVEL=info MONGO_USER=admin MONGO_PASSWORD_ENC= REDIS_PASSWORD=change-me JWT_SECRET=change-me PUBLIC_API_BASE=http://localhost:4000 PUBLIC_WS_BASE=ws://localhost:4000

WebAuthn (Passkeys)

WEBAUTHN_RP_ID=localhost WEBAUTHN_RP_NAME=Daployi WEBAUTHN_ORIGIN=http://localhost:3000

Set MONGO_PASSWORD_ENC to the URL-encoded form of your Mongo root password. See the Install with Docker Compose guide for a command to generate it.