Skip to main content

Configuration

All configuration for a self-hosted install lives in one file:

/opt/factorythread/current/.env.deploy

It's generated on first install with all secrets and sensible defaults. Every key is documented in the shipped .env.deploy.example.

Changing config after install

Edit .env.deploy, then run sudo ./ftctl restart. It does a full recreate so new values (including network-level settings like NETWORK_MTU) take effect, but keeps all volumes — the database and uploads are safe.

Defaulted endpoints

These are pre-set to the FactoryThread values — a standard install needs no input for them (override with the matching install flags if you must):

KeyDefault
AUTH0_DOMAINfactorythread.us.auth0.com
AUTH0_AUDIENCEapi.factorythread
AUTH0_REDIRECT_URLhttps://app.factorythread.com/auth/login
CONTROL_SERVICE_URLhttps://control.factorythread.com
FRONTEND_URLhttps://app.factorythread.com

Optional capabilities (the install prompts)

On a fresh install you're asked yes/no about each of these. Answering No keeps defaults; Yes walks the keys, and blank keeps the current value.

File storage

Where uploads and local (flat) files live, on the host and inside the container.

KeyPurpose
UPLOAD_STORAGE_TYPElocal or azure
UPLOAD_LOCAL_BASE_PATH / UPLOAD_HOST_PATHupload paths (container / host)
LOCALFILE_BASE_PATH / LOCALFILE_HOST_PATHflat-file paths (container / host)
LOCALFILE_FOLDERScomma-separated folder names

Folder lists are comma-separated and tolerate spaces in names, e.g. LOCALFILE_FOLDERS=dataFiles,Monthly Reports,Q1 Exports.

Worker memory

Protects the host from a runaway worker.

KeyDefaultMeaning
WORKER_MEMORY8ghard container memory cap
WORKER_NODE_HEAP_MB6656Node.js old-space heap (≈ 80% of the cap)

Keep the heap below the container cap so Node stays within the limit rather than being OOM-killed.

FactoryThread Assistant (AI)

Enables the in-editor Assistant.

KeyPurpose
MASTRA_PLATFORM_ACCESS_TOKENAssistant platform token
MASTRA_PROJECT_IDAssistant project id

Leave off unless your account team provided these.

Grafana / Prometheus monitoring

Ships metrics and logs to your own Grafana Cloud. Setting any of these credentials auto-enables the telemetry overlay (Alloy) on deploy.

Keys
GRAFANA_CLOUD_LOKI_USERNAME / GRAFANA_CLOUD_LOKI_PASSWORD
GRAFANA_CLOUD_LOKI_URL
GRAFANA_CLOUD_PROMETHEUS_USERNAME / GRAFANA_CLOUD_PROMETHEUS_PASSWORD
GRAFANA_CLOUD_PROMETHEUS_URL

TLS / HTTPS

Chosen at install time (--tls), or set later in .env.deploy + ftctl restart:

ModeUse case
noneHTTP only — development / internal network
self-signedtesting / internal with browser trust
existingproduction — provide your own --cert and --key

Email (ACS)

Outbound email via Azure Communication Services is on by default:

KeyDefault
ACS_EMAIL_ENABLEDtrue

Networking

KeyDefaultMeaning
NETWORK_MTU1431Docker network MTU — lower than 1500 to survive VPN/overlay encapsulation

If flows to on-network databases hang or time out on a VPN'd host, an MTU mismatch is the usual cause; 1431 is a safe default. Change it and ftctl restart to re-create the network.

Execution capacity

KeyMeaning
RABBITMQ_PREFETCHexecutions one worker runs at once
MSSQL_POOL_MAXconnection-pool ceiling (keep ≥ RABBITMQ_PREFETCH)
INSIGHTS_RETENTION_DAYShow long execution telemetry is kept

Size RABBITMQ_PREFETCH so it is ≥ your licensed concurrent-execution cap, so the software licence — not a hardware shortfall — is what limits work. The pool must cover it (RABBITMQ_PREFETCH ≤ MSSQL_POOL_MAX).

Secrets

Generated on the box and never transmitted. The critical one is ENCRYPTION_KEY, which decrypts stored connection credentials. Back the secrets up right after install — see Disaster Recovery. Never change POSTGRES_PASSWORD / RABBITMQ_PASS / REDIS_PASSWORD after first init — those services bake the password into their volume on first start.