Skip to main content

Configuration

architxt reads all settings from server/.env. The file is copied from server/.env.example during npm run setup. Each section below maps to a block in server/src/config.js and lists the supported variables, their defaults, and what they control.

Server​

VariableDefaultPurpose
ARCHITXT_PORT3000Backend HTTP port.
ARCHITXT_HOST0.0.0.0Backend bind host.
ARCHITXT_NODE_ENVdevelopmentRuntime environment label. Can be any string; the backend does not enforce a fixed set.

UI dev server​

These only apply when running npm run dev. In production the UI is served from ui/dist/.

VariableDefaultPurpose
ARCHITXT_UI_PORT3001Frontend dev-server port.
ARCHITXT_UI_HOST0.0.0.0Frontend dev-server bind host.
ARCHITXT_UI_API_BASE_URLhttp://localhost:3000URL the UI uses to reach the backend API.

Database​

VariableDefaultPurpose
ARCHITXT_DB_PATH./database/architxt.dbPath to the SQLite database file.
ARCHITXT_DB_TIMEOUT_MS10000SQLite busy-timeout in milliseconds.

SQLite is used via better-sqlite3. The schema is created automatically on first start.

Logging​

VariableDefaultPurpose
ARCHITXT_LOG_LEVELdebugWinston log level (debug, info, warn, error).
ARCHITXT_LOG_DIR./logsDirectory for rotating log files.

File storage​

VariableDefaultPurpose
ARCHITXT_STORAGE_PATH./documentsDirectory where uploaded document files are stored.
ARCHITXT_TEMP_DIR./tmpTemporary directory used during extraction.
ARCHITXT_MAX_FILE_SIZE104857600Maximum upload size in bytes (default is 100 MB).

Docling​

VariableDefaultPurpose
DOCLING_SERVICE_URLhttp://localhost:5001URL of the Docling docling serve instance.
ARCHITXT_DOCLING_FORCE_OCRfalseForce OCR on every page. Use this when PDFs contain subsetted fonts without ToUnicode CMaps, which produce /g###/ glyph artifacts.

See Prerequisites for Docling setup.

Using an external Docling host (for example a GPU machine)​

The default Docker Compose stack builds a local Docling image that runs on CPU. If you have another machine with a GPU and the Docling server running there, you can point architxt at it instead of the local docling container.

  1. Make sure the remote Docling server is reachable from the architxt host.
  2. Override DOCLING_SERVICE_URL at Docker Compose interpolation time when you start the stack:
DOCLING_SERVICE_URL=http://192.168.1.205:5001 \
docker compose --profile hindsight up -d

When you use sudo, the exported variable is not forwarded by default. Either run without sudo (if your user is in the docker group) or preserve the environment:

DOCLING_SERVICE_URL=http://192.168.1.205:5001 sudo -E docker compose --profile hindsight up -d

Note: The local docling container will still start because it is part of the hindsight profile, but architxt will send conversion requests to the external host instead. If you want to avoid the unused local container, start only the services you need:

DOCLING_SERVICE_URL=http://192.168.1.205:5001 \
docker compose --profile hindsight up -d architxt hindsight

Verify the override was applied:

docker compose exec architxt printenv DOCLING_SERVICE_URL

Expected output:

http://192.168.1.205:5001

LLM providers​

All provider settings are read from server/.env. The backend registers four named providers and each pipeline stage references one of them by name. At least one provider must be usable. There are no silent fallbacks: missing required values cause the server to exit with a clear error.

Ollama Local​

VariableDefaultPurpose
ARCHITXT_OLLAMA_LOCAL_URLhttp://localhost:11434Base URL of your local Ollama instance.
ARCHITXT_OLLAMA_LOCAL_API_KEYollamaapikeyAPI key. Ollama Local usually does not require a real key. Set in .env if you use one.
ARCHITXT_OLLAMA_LOCAL_DEFAULT_MODELqwen3.5:4bDefault model when this provider is selected.
ARCHITXT_OLLAMA_LOCAL_TIMEOUT_MS300000Request timeout in milliseconds (5 minutes).
ARCHITXT_OLLAMA_LOCAL_CHAT_STYLEollama_localChat adapter style (ollama_local or openai).

Ollama Cloud​

VariableDefaultPurpose
ARCHITXT_OLLAMA_CLOUD_URLhttps://ollama.com/v1Managed Ollama endpoint URL.
ARCHITXT_OLLAMA_CLOUD_API_KEY(empty)Your Ollama Cloud API key. Set in .env.
ARCHITXT_OLLAMA_CLOUD_DEFAULT_MODELkimi-k2.7-code:cloudDefault model when this provider is selected.
ARCHITXT_OLLAMA_CLOUD_TIMEOUT_MS300000Request timeout in milliseconds.
ARCHITXT_OLLAMA_CLOUD_CHAT_STYLEopenaiChat adapter style.

OpenAI Compatible​

VariableDefaultPurpose
ARCHITXT_OPENAI_URLhttps://api.openai.com/v1OpenAI or OpenAI-compatible base URL.
ARCHITXT_OPENAI_API_KEY(empty)Your API key. Set in .env.
ARCHITXT_OPENAI_DEFAULT_MODELgpt-4oDefault model when this provider is selected.
ARCHITXT_OPENAI_TIMEOUT_MS60000Request timeout in milliseconds.
ARCHITXT_OPENAI_CHAT_STYLEopenaiChat adapter style.

Anthropic​

VariableDefaultPurpose
ARCHITXT_ANTHROPIC_URLhttps://api.anthropic.com/v1Anthropic API base URL.
ARCHITXT_ANTHROPIC_API_KEY(empty)Your Anthropic API key. Set in .env.
ARCHITXT_ANTHROPIC_DEFAULT_MODELclaude-3-sonnet-20240229Default model when this provider is selected.
ARCHITXT_ANTHROPIC_TIMEOUT_MS180000Request timeout in milliseconds.
ARCHITXT_ANTHROPIC_CHAT_STYLEopenaiChat adapter style.

Vision / diagram description​

VariableDefaultPurpose
ARCHITXT_VISION_ENABLEDtrueRun diagram and image analysis during extraction.
ARCHITXT_VISION_PROVIDERollama_cloudProvider name for vision calls.
ARCHITXT_VISION_MODELgemma4:31b-cloudModel used for diagram/image description.
ARCHITXT_VISION_TIMEOUT_MS300000Request timeout in milliseconds.
ARCHITXT_VISION_PROMPT(built-in)Custom task prompt override.
ARCHITXT_VISION_SYSTEM_PROMPT(built-in)Custom system prompt override.
ARCHITXT_DIAGRAM_TEMPERATURE0.0Sampling temperature for diagram description.
ARCHITXT_DIAGRAM_BATCH_SIZE2Images per batch.
ARCHITXT_DIAGRAM_MAX_BATCHES-1Maximum batches to process (-1 for unlimited).
ARCHITXT_DIAGRAM_CONCURRENCY3Concurrent batches.

Diagram description prompts​

You can override the built-in diagram-description prompts that are sent to the vision model. If a variable is left empty, architxt uses the default prompt.

VariableDefaultPurpose
ARCHITXT_VISION_PROMPT(built-in)Task prompt that describes how to extract systems, connections, and tables from diagrams.
ARCHITXT_VISION_SYSTEM_PROMPT(built-in)System prompt that sets the assistant role for image analysis.

Document denoise (LLM)​

VariableDefaultPurpose
ARCHITXT_DENOISE_LLM_ENABLEDtrueUse an LLM to clean spacing and glyph artifacts in extracted text.
ARCHITXT_DENOISE_LLM_PROVIDERollama_cloudProvider name for denoise calls.
ARCHITXT_DENOISE_LLM_MODELgpt-oss:20b-cloudModel used for LLM denoising.
ARCHITXT_DENOISE_LLM_TIMEOUT_MS600000Request timeout in milliseconds (10 minutes).
ARCHITXT_DENOISE_LLM_PROMPT(built-in)Custom task prompt override.
ARCHITXT_DENOISE_LLM_SYSTEM_PROMPT(built-in)Custom system prompt override.
ARCHITXT_DENOISE_LLM_TEMPERATURE0.1Sampling temperature.

Document denoise prompts​

You can override the built-in LLM denoising prompts. If a variable is left empty, architxt uses the default prompt.

VariableDefaultPurpose
ARCHITXT_DENOISE_LLM_PROMPT(built-in)Task prompt that tells the model how to fix intra-word spacing and copy tables/images verbatim.
ARCHITXT_DENOISE_LLM_SYSTEM_PROMPT(built-in)System prompt that sets the assistant role for text cleanup.

Document denoise (basic cleanup)​

These toggles are independent of the LLM denoiser and run rule-based cleanup on every extraction.

VariableDefaultPurpose
ARCHITXT_DENOISE_ENABLEDtrueRun basic text cleanup.
ARCHITXT_DENOISE_REMOVE_PAGE_NUMBERStrueStrip page numbers.
ARCHITXT_DENOISE_REMOVE_CONFIDENTIALtrueStrip confidential headers.
ARCHITXT_DENOISE_REMOVE_DOC_IDStrueStrip internal document IDs.
ARCHITXT_DENOISE_UNESCAPE_HTMLtrueUnescape HTML entities.
ARCHITXT_DENOISE_UNESCAPE_MARKDOWN_PUNCTtrueUnescape Markdown punctuation.
ARCHITXT_DENOISE_NORMALIZE_WStrueCollapse excessive whitespace.
ARCHITXT_DENOISE_REMOVE_NON_ASCIItrueRemove non-ASCII characters.
ARCHITXT_DENOISE_MAX_NEWLINES3Maximum consecutive newlines to keep.

Daemons​

VariableDefaultPurpose
SPAWN_EXTRACT_DAEMONtrueStart the background document extraction worker.
SPAWN_HINDSIGHT_POLL_DAEMONtrueStart the background Hindsight operation poller.
ARCHITXT_EXTRACT_DAEMON_POLL_INTERVAL_MS5000How often the extract daemon polls for new uploads.
ARCHITXT_EXTRACT_DAEMON_ORPHAN_THRESHOLD_MINUTES600Minutes before a stuck extraction is considered orphaned.
ARCHITXT_HINDSIGHT_POLL_INTERVAL_MS5000How often the Hindsight poller checks pending operations.
ARCHITXT_HINDSIGHT_STALE_THRESHOLD_MS300000Milliseconds before a pending Hindsight operation is marked stale.

Workspace agent chat​

These settings control the LLM used by the Workspace Chat panel when it classifies intent, recalls memories, and synthesizes answers.

VariableDefaultPurpose
ARCHITXT_AGENT_PROVIDERollama_cloudProvider name for chat agent calls.
ARCHITXT_AGENT_API_KEY(empty)API key. Only needed if the selected provider requires one.
ARCHITXT_AGENT_BASE_URL(empty)Override the provider's base URL.
ARCHITXT_AGENT_MODEL(provider default)Model used for chat intent classification and synthesis.
ARCHITXT_AGENT_TEMPERATURE0.7Sampling temperature.
ARCHITXT_AGENT_TIMEOUT_MS300000Request timeout in milliseconds (5 minutes).
ARCHITXT_AGENT_CLASSIFY_INTENT_MAX_TOKENS2048Maximum tokens when the agent classifies the intent of a chat message. Reasoning models consume tokens before emitting JSON, so low limits can cause empty responses.

Contextual graph sync daemon​

VariableDefaultPurpose
ARCHITXT_CONTEXTUAL_GRAPH_SYNC_DAEMON_ENABLEDfalseStart the background contextual-graph sync daemon.
ARCHITXT_CONTEXTUAL_GRAPH_SYNC_DAEMON_POLL_INTERVAL_MS60000Poll interval for managed bank sync jobs.

Hindsight servers​

In production or local development, Hindsight connections are added after starting architxt via Settings → Servers or the /api/v1/servers API:

  • base_url — the Hindsight server URL.
  • api_key — your API token.
  • name — a readable label.

See Prerequisites for Hindsight setup and recommended bank models.

Docker Compose auto-seeding​

When using the hindsight profile, architxt can automatically register a Hindsight server and create a memory bank on first boot. Set these variables in server/.env:

VariableDefaultPurpose
ARCHITXT_HINDSIGHT_DEFAULT_URL(empty)URL of the default Hindsight server to register. In the hindsight profile this is typically http://hindsight:8888.
ARCHITXT_HINDSIGHT_DEFAULT_BANK(empty)Name of the memory bank to create in the default Hindsight server, e.g. architxt.

When both are set:

  1. architxt inserts a server record for ARCHITXT_HINDSIGHT_DEFAULT_URL if one does not already exist.
  2. architxt calls PUT /v1/default/banks/{ARCHITXT_HINDSIGHT_DEFAULT_BANK} to create the bank.
  3. The server and bank appear in the Hindsight page selectors.

This removes the manual server/bank setup step in Docker Compose. You still need to add Hindsight credentials in server/.env (see the Hindsight section in .env.example).

Next steps​