Administration

Configuration reference

Every setting in the gateway's settings file - databases, ports and HTTPS, secrets, redundancy, resource limits, Node-RED, email and SMS fallbacks.

Most of Nexus is configured in the web app. A few settings belong to the machine and live in the gateway’s settings file:

InstallSettings file
WindowsC:\ProgramData\Nexus\nexus.env
Linux/etc/nexus/nexus.env
Docker<install dir>/.env
Mac~/Library/Application Support/Nexus/nexus.env

Edit it as an administrator, then restart the gateway (Windows: Restart-Service nexus; Linux: systemctl restart nexus; Docker: nexusctl restart; Mac: quit and reopen). Real environment variables override the file, and an empty value counts as unset. Invalid settings stop the gateway with a list of what is wrong.

Databases

Variable
DATABASE_URLRequired. PostgreSQL connection string; the database needs TimescaleDB
QUESTDB_PG_URLRequired. QuestDB’s PostgreSQL-wire URL for reads, e.g. postgres://admin:quest@host:8812/qdb
QUESTDB_HTTP_URLRequired. QuestDB’s HTTP URL, e.g. http://host:9000
QUESTDB_ILP_CONFRequired. QuestDB’s ingest settings for writes, e.g. http::addr=host:9000;

Network and HTTPS

VariableDefault
PORT / HOST4000 / 0.0.0.0Where the gateway listens. With HTTPS on, PORT only redirects
NEXUS_HTTPStrue for installersServe over HTTPS on NEXUS_HTTPS_PORT
NEXUS_HTTPS_PORT4443The HTTPS port
NEXUS_TLS_CERT_FILE / NEXUS_TLS_KEY_FILEPEM files managed outside Nexus. Unset: Nexus keeps the certificate itself
NEXUS_HTTP_REDIRECTtrueWith HTTPS: PORT redirects and answers health checks. false: nothing listens on PORT
NEXUS_PUBLIC_URLWhere people reach this gateway. System Health → This gateway takes precedence
NEXUS_TRUST_PROXYoffBehind a reverse proxy: true, a hop count, or the proxy’s addresses, so client addresses are real

Secrets and accounts

VariableDefault
JWT_SECRETRequired. 16+ random characters. Changing it signs everyone out
NEXUS_SECRETS_KEYderived from JWT_SECRETEncrypts stored secrets (16+ characters). Set it so secrets stay readable if JWT_SECRET ever changes; identical on both gateways of a pair
NEXUS_ADMIN_EMAILadmin@nexus.localThe first administrator, created only when there are no users
NEXUS_ADMIN_PASSWORDgeneratedThe first administrator’s password (8+ characters). Remove it after the first sign-in

Redundancy

VariableDefault
NEXUS_REDUNDANCYfalseActive/standby pair on a shared database
NEXUS_NODE_NAMEhost nameThis gateway’s name in a pair (must differ per gateway) and on the gateway network
NEXUS_FAILOVER_SECONDS15Heartbeat silence before a standby takes over from a hung active

Health checks

VariableDefault
NEXUS_NTP_SERVERTime server the clock check compares with; the database server’s clock otherwise. Also under System Health → This gateway
NEXUS_BACKUP_STATUSWindows with local databases: set by setupStatus file of the backup task, which adds the backup check and alarm
NEXUS_METRICS_PUBLICfalseServe /metrics without an API key
NEXUS_LOG_LEVELinfofatal, error, warn, info, debug, trace or silent. Also under System Health → This gateway, at once

Resource limits

VariableDefault
NEXUS_WATCHDOG_SECONDS30 in productionMain thread blocked this long and the gateway restarts (0 = off)
NEXUS_MEMORY_LIMIT_PERCENT90Memory use at which the gateway restarts itself in an orderly way
NEXUS_SCRIPT_MEMORY_MB512Memory limit of the script worker
NEXUS_DRIVER_ISOLATIONnativeDrivers run in the separate driver host: native (S7, Modbus RTU), all, or off
NEXUS_NODE_RED_MEMORY_MB1024Memory limit of the Node-RED process
NEXUS_NODE_RED_BLOCKED_SECONDS15Node-RED silent this long and it is restarted
NEXUS_NODE_RED_INSTALLSoffWhat Node-RED may install from npm: off, on, or a list of module names. See Node-RED

Paths

VariableDefault
NEXUS_DATA_DIRset by the installerRuntime data: Node-RED flows, store-and-forward buffers, certificates
NEXUS_AUTO_MIGRATEtrueApply database migrations at startup

Fallbacks for settings in the app

These are easier to set in the web app, which takes precedence:

VariableIn the app
SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASS, SMTP_FROMConnectivity → Email
TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_FROMConnectivity → SMS
ANTHROPIC_API_KEYConnectivity → AI assistant