Skip to main content
Fetcher’s Manager and Worker are configured entirely through environment variables — each component reads its own .env file (components/manager/.env, components/worker/.env). This page covers the variables that matter for an MVP deployment; the .env.example files in the repository are the exhaustive reference.

Encryption keys


VariableComponentDescription
APP_ENC_KEYManager + WorkerRequired. Base64-encoded 32-byte master key. Generate with make generate-master-key. Both services must share the same value.
APP_ENC_KEY_VERSIONManager + WorkerKey rotation counter (default 1). Increment when rotating; Fetcher tracks which version encrypted each credential.
From this single master key, Fetcher derives three independent keys via HKDF: credential encryption (AES-256-GCM), internal message signing between Manager and Worker (HMAC-SHA256), and external document signing so consumers can verify extracted data. Consumers derive the verification key with make derive-key KEY="<master-key>".

Manager API


VariableDescriptionDefault
SERVER_PORTHTTP port for the Manager API4006
SCHEMA_CACHE_TTL_SECONDSHow long discovered schemas stay cached300
PLUGIN_AUTH_ENABLEDDelegate authentication/authorization to Access Managerfalse
PLUGIN_AUTH_ADDRESSAccess Manager address when auth is enabled
LOG_LEVELLog verbositydebug (local)

Infrastructure


Both services connect to MongoDB (metadata) and RabbitMQ (job queue); the Manager also uses Valkey/Redis for caching, and the Worker writes results to object storage.
VariableComponentDescription
MONGO_HOST, MONGO_PORT, MONGO_NAME, MONGO_USER, MONGO_PASSWORDManager + WorkerMongoDB metadata store
RABBITMQ_HOST, RABBITMQ_PORT_AMQP, RABBITMQ_DEFAULT_USER, RABBITMQ_DEFAULT_PASSManager + WorkerRabbitMQ broker
RABBITMQ_FETCHER_WORK_QUEUEManager + WorkerExtraction work queue (default fetcher.extract-external-data.queue)
RABBITMQ_NUMBERS_OF_WORKERSWorkerConcurrent extraction workers (default 5)
REDIS_HOST, REDIS_PORT, REDIS_PASSWORDManagerValkey/Redis cache
OBJECT_STORAGE_ENDPOINT, OBJECT_STORAGE_REGION, OBJECT_STORAGE_BUCKET, OBJECT_STORAGE_ACCESS_KEY_ID, OBJECT_STORAGE_SECRET_KEYWorkerS3-compatible result storage (SeaweedFS by default; AWS S3 and MinIO work the same way)
ENGINE_MAX_RESULT_BYTESWorkerCap on the serialized result artifact per job (default 256 MiB)
TLS-related options (MONGO_TLS_CA_CERT, REDIS_TLS, RABBITMQ_TLS) are available per dependency.

Job event streaming


The Worker publishes mandatory job.completed and job.failed notifications and fails closed at startup if streaming is not enabled:
VariableDescriptionDefault
STREAMING_ENABLEDMust be true for the Worker to startfalse
STREAMING_BROKERSKafka/Redpanda bootstrap serverslocalhost:9092
STREAMING_CLOUDEVENTS_SOURCECloudEvents source for Worker events
RABBITMQ_JOB_EVENTS_EXCHANGERabbitMQ exchange for job eventsfetcher.job.events
Single-tenant deployments emit events with the stable tenant ID single-tenant.

Multi-tenancy


VariableDescriptionDefault
MULTI_TENANT_ENABLEDEnable multi-tenant modefalse
MULTI_TENANT_URLTenant Manager service URL
MULTI_TENANT_MAX_TENANT_POOLSMax concurrent tenant connection pools100
MULTI_TENANT_IDLE_TIMEOUT_SECIdle tenant connection timeout300
MULTI_TENANT_CIRCUIT_BREAKER_THRESHOLDCircuit breaker failure threshold5
MULTI_TENANT_CIRCUIT_BREAKER_TIMEOUT_SECCircuit breaker reset timeout30
Enabling multi-tenant mode also activates the SSRF host-safety guard: tenant-supplied connection hosts are checked against loopback, private (RFC 1918), and cloud-metadata address ranges before Fetcher connects. With MULTI_TENANT_ENABLED=false (the default), all multi-tenant code paths are bypassed with zero performance impact.

Readiness and TLS posture


VariableDescriptionDefault
DEPLOYMENT_MODEsaas, byoc, or local — tags /readyz and drives SaaS TLS enforcementlocal
ALLOW_INSECURE_TLSPermit plaintext connections to MongoDB, Redis, and RabbitMQ. Fetcher fails closed on insecure connection URIs by default — set this only for local development.unset (fail closed)
READYZ_DRAIN_DELAY_SECGraceful-drain window after SIGTERM, during which /readyz reports unhealthy before connections tear down12
Both services expose GET /health (liveness), GET /readyz (readiness with parallel dependency probes), and GET /version.

Internal datasources


Fixed, operator-owned databases can be declared as env vars instead of API-registered connections, using the DATASOURCE_{NAME}_* family:
VariableRequiredExample
DATASOURCE_{N}_CONFIG_NAMEyesbilling_db
DATASOURCE_{N}_TYPEyespostgresql / mysql / oracle / mongodb / sql_server
DATASOURCE_{N}_HOSTyesdb.internal.example.com
DATASOURCE_{N}_PORTyes5432
DATASOURCE_{N}_DATABASEyesbilling
DATASOURCE_{N}_USERyesfetcher_ro
DATASOURCE_{N}_PASSWORDyesfrom your secret manager
DATASOURCE_{N}_OPTIONSnoauthSource=admin (MongoDB only)
DATASOURCE_{N}_SSLMODEnorequire (PostgreSQL)
For TLS to a managed database on this path, _SSLMODE is the validated option; custom CA or client-certificate plumbing for internal datasources is not available.

Observability


Fetcher emits OpenTelemetry traces and metrics when telemetry is enabled:
VariableDescriptionDefault
ENABLE_TELEMETRYTurn OTel emission on/offfalse
OTEL_EXPORTER_OTLP_ENDPOINTOTLP collector endpoint
OTEL_RESOURCE_SERVICE_NAMEService name in telemetry (fetcher / fetcher-worker)per component