Operations

Configuration

Configure durable backends, security, sidecars, capacity, and feature switches.

Deeplinq reads process environment variables. It does not auto-load .env files. Use your deployment platform's secret manager and environment injection.

Configuration is fail-closed: malformed values, incomplete credential pairs, unknown DSN parameters, unsafe production switches, and invalid numeric ranges refuse startup.

Production mode

Set:

ENVIRONMENT=production

Production rejects in-memory fallback and development fixtures. ENVIRONMENT, ENV, and GO_ENV are aliases; the first set value wins.

Durable backends

VariablePurpose
DATABASE_MIGRATION_URLSchema-owner DSN used only for startup migrations
DATABASE_APP_URLengine_app DSN for tenant requests under forced RLS
DATABASE_SYSTEM_URLengine_system DSN for workers and control plane
S3_URLSource and derived object storage
VECTOR_URLWeaviate retrieval storage
REDIS_URLDurable admin-session validity

The three PostgreSQL URLs are all-or-nothing and must name distinct roles. DATABASE_URL is a shared development/test fallback and is not a production substitute.

DSN examples:

postgres://engine_app:pass@db:5432/deeplinq?sslmode=require
s3://ACCESS:SECRET@storage.example.com/deeplinq?region=us-east-1
weaviates://:API_KEY@weaviate.example.com:443?hybrid_alpha=0.75
rediss://:PASSWORD@redis.example.com:6379/0

Percent-encode reserved characters in DSN credentials. URL fragments and unknown query parameters are rejected.

Root security

VariablePurposeDefault
SECRETS_KEYVersioned AES-256-GCM keyring for sealed credentials and admin-cookie key derivationrequired in production
AUDIT_ANCHOR_KEYHMAC key for signed audit-chain anchorsrequired in production
JWT_AUDIENCERequired tenant JWT audiencedeeplinq
JWT_MAX_TTLMaximum accepted JWT lifetime15m
ADMIN_USERNAME, ADMIN_PASSWORDBreak-glass browser and Basic-auth admindisabled unless both set
ADMIN_UIEmbedded console switch; 0 disableson when admin credentials exist
ADMIN_SESSION_TTLBrowser session lifetime12h
TRUSTED_PROXY_CIDRSProxies trusted to supply client IP for login throttlingunset
BILLING_TOKENReserved billing-service credentialdisabled
MEMORY_TOKENMemory-sidecar credential toward the enginedisabled

SECRETS_KEY accepts one base64 32-byte key or a rotation keyring such as:

2:<new-base64-key>,1:<old-base64-key>

The highest version seals new values; all listed versions may decrypt.

Optional sidecars

VariableCapability when set
DOCLING_URLReal document extraction and chunking
CRAWLER_URLJavaScript-capable website crawling
CRAWLER_ALLOWED_HOSTSProduction hostname allowlist for crawling
DUCKDB_URLCSV/XLSX ingestion and Text-to-SQL
MEMORY_URLSemantic memory distillation and retrieval
MEMORY_SIDECAR_TOKENDistinct engine-to-memory credential
GUARDRAIL_URL, GUARDRAIL_TOKENEnvironment-provisioned safety classifier

Do not reuse MEMORY_TOKEN as MEMORY_SIDECAR_TOKEN; they protect opposite trust directions.

Product and capacity controls

VariableDefaultPurpose
MAX_INFLIGHT_PER_ORG16Concurrent model calls before immediate 429
INGEST_WORKERS4Durable ingestion worker concurrency
JOB_MAX_EXECUTION_TIME10mOne worker-attempt ceiling
JOB_RESCUE_STUCK_AFTER11mAbandoned-work recovery horizon
KNOWLEDGE_AGENT_ENABLED0Exact 1 enables knowledge-agent runtime
SCHEDULE_ORG_CAP1000Active schedule ceiling
PROJECTS_ORG_CAP1000Project ceiling
DATASETS_ORG_CAP1000Standalone dataset ceiling
TEAMS_ORG_CAP200Team ceiling
TEAM_MEMBERS_CAP1000Members per team
AGENTS_ORG_CAP500Agent ceiling
CONNECTIONS_INVOKE_CONCURRENCY4Concurrent connection tools per org
AGENT_RUN_MAX_TURNS16Default durable-run turn bound
AGENT_RUN_WALL_CLOCK_MINUTES10Default run deadline
AGENT_RUN_APPROVAL_TIMEOUT_HOURS24Approval parking limit
AGENT_RUN_DEFAULT_BUDGET_MICRO_USD0Default run budget; 0 means no dedicated cap
AGENT_RUN_TOOL_RESULT_MAX_BYTES262144Maximum result passed back to a model

Capacity values have validated inclusive ranges. Tune from observed production load, not by disabling the ceilings.

Conversations and memory

VariableDefault
CONVERSATION_COMPACT_TRIGGER_TOKENS24000
CONVERSATION_KEEP_VERBATIM_TURNS20
CONVERSATION_COMPACT_MODELauto
MEMORY_BLOCK_TOKEN_BUDGET1000
MEMORY_TIMEOUT120s

Networking and telemetry

VariablePurpose
ADDRHTTP listen address, default :8080
HTTP_BODY_READ_TIMEOUTRequest-body deadline without cutting off SSE
PUBLIC_URLHTTPS base used to build OAuth callbacks
LOG_LEVELdebug, info, warn, or error
OTEL_EXPORTER_OTLP_ENDPOINTEnables OpenTelemetry export
OTEL_EXPORTER_OTLP_PROTOCOLOTLP transport, default http
OTEL_SERVICE_NAMETrace service, default deeplinq-engine

Development-only switches

SEED, FAKE_LLM, FAKE_KNOWLEDGE_AGENT_SCENARIO, FAKE_LLM_RECORDER_URL, CRAWLER_ALLOW_PRIVATE, WEBHOOK_ALLOW_HTTP, WEBHOOK_ALLOW_PRIVATE, CONNECT_ALLOW_HTTP, and provider endpoint overrides are rejected in production.

Never commit environment files, credentials, or generated secret values.

On this page