Skip to content

Configuration

archmax is configured through environment variables. Set them in your shell, .env file, or Docker Compose config.

VariableDescriptionExample
BETTER_AUTH_SECRETSession encryption secret (min 32 chars). Save this value and reuse it across restarts.Generate with openssl rand -base64 32
UI_PASSWORDInitial admin passwordchangeme
VariableDefaultDescription
MONGODB_URI(embedded)MongoDB connection string. Optional in Docker: when omitted, the container starts an embedded MongoDB instance at /data/mongodb. Set this to use an external MongoDB (e.g. mongodb://localhost:27017/archmax).
VariableDefaultDescription
APP_BASE_URL-Public URL of this instance (e.g. https://archmax.example.com). Set this when running behind a reverse proxy. Automatically configures CORS allowed origins and auth callback URL.
PORT3000API server port
CORS_ORIGINS(derived)Comma-separated allowed origins. Defaults to APP_BASE_URL when set, otherwise http://localhost:5173. Override to allow additional origins.
AUTH_BASE_URL(derived)Public URL for auth callbacks. Defaults to APP_BASE_URL when set, otherwise http://localhost:PORT.
VariableDefaultDescription
UI_USERNAMEadminInitial admin username (used to seed on first run)
UI_PASSWORD-Initial admin password

Log in at http://your-server:8080 with these credentials after deployment.

VariableDefaultDescription
ENCRYPTION_KEY-Encrypts database connection passwords and API keys at rest using AES-256-GCM. Generate with openssl rand -base64 32. Without this, credentials are stored in plaintext.
VariableDefaultDescription
ARCHMAX_DATA_DIR/data (Docker) or data (local)Root data directory. All persistent data lives under this path: projects/ (semantic models), mongodb/ (embedded DB), .duckdb/ (extension cache).

Inside the Docker image, persistent application data lives under /data/:

PathContentsPersistent?
/data/projects/Semantic model YAML filesYes
/data/mongodb/Embedded MongoDB data (when using embedded mode)Yes
/data/.duckdb/DuckDB extension cacheYes
/tmp/redis/Embedded Redis dataNo (ephemeral)

A single bind mount (-v ~/.archmax:/data) maps the data directory to ~/.archmax on the host, including project files, the DuckDB extension cache, and embedded MongoDB data. When using an external MongoDB via MONGODB_URI, the mongodb/ directory is unused. See the Docker Reference for details.

VariableDefaultDescription
MCP_RATE_LIMIT_MAX120Max requests per IP per 60-second window
VariableDefaultDescription
AGENT_API_BASE_URLhttps://openrouter.ai/api/v1OpenAI-compatible API endpoint. Change this when using a provider other than OpenRouter.
AGENT_API_KEY-Required for agent features. API key for your chosen provider.
AGENT_MODELanthropic/claude-sonnet-4Model identifier (must match your provider’s naming convention)
AGENT_TITLE_MODEL-Cheap/fast model for conversation title generation

Supported providers: OpenRouter (default), OpenAI, Azure OpenAI, Ollama, or any OpenAI-compatible endpoint. To get started quickly, create an account at openrouter.ai, generate an API key, and set AGENT_API_KEY to that value.

VariableDefaultDescription
REDIS_URL(embedded)Redis connection URL for BullMQ worker queue. Optional in Docker: when omitted, the container starts an embedded Redis instance. Without Redis (local dev), the agent runs in-process.
WORKER_CONCURRENCY5Number of concurrent agent jobs per worker
VariableDefaultDescription
TEST_AGENT_MAX_ITERATIONS100Max tool call iterations for playground and batch test agents