DocsReference
Configuration
Every environment variable Gatehouse reads.
Gatehouse is configured with environment variables. Security rules (two-step verification, passwords, sessions, the allow-list and streaming) are set by owners in Settings and stored in the database.
Server
| Variable | Default | Purpose |
|---|---|---|
PORT |
8787 |
Listen port. |
HOST |
127.0.0.1 (0.0.0.0 in Docker) |
Listen address. |
GATEHOUSE_BASE_URL |
http://localhost:$PORT |
Public URL. Used for OAuth, SSO callbacks, SCIM and links in email. Use https in production. |
GATEHOUSE_ORG_NAME |
My organization |
Shown in the console and emails. |
GATEHOUSE_ENV |
unset (production in Docker) |
production requires a provided master key. |
GATEHOUSE_TRUST_PROXY |
unset | Express trust proxy value. Set it behind a load balancer so client IPs are right. Prefer the proxy's address range (10.0.0.0/8) over 1 when anything else can reach Gatehouse directly. |
Storage and keys
| Variable | Default | Purpose |
|---|---|---|
GATEHOUSE_DATA_DIR |
./data (/data in Docker) |
Where the database lives. |
GATEHOUSE_DB |
<data dir>/gatehouse.db |
Database file path. |
GATEHOUSE_MASTER_KEY_COMMAND |
unset | Command that prints the base64 master key, for KMS or vault. |
GATEHOUSE_MASTER_KEY_FILE |
unset | File holding the master key. |
GATEHOUSE_MASTER_KEY |
unset | The master key itself. |
Behavior
| Variable | Default | Purpose |
|---|---|---|
GATEHOUSE_APPROVAL_TIMEOUT_MS |
300000 |
How long a held call waits for a decision. |
GATEHOUSE_ALLOW_SELF_APPROVAL |
false |
Lets people approve their own calls. For one-person trials only. |
GATEHOUSE_UPSTREAM_TIMEOUT_MS |
120000 |
Timeout for calls to MCP servers. |
GATEHOUSE_AUDIT_ARGS |
redacted |
hash stores only a hash of call arguments in the audit log. |
Backups and licensing
| Variable | Default | Purpose |
|---|---|---|
BACKUP_INTERVAL_HOURS, BACKUP_KEEP_DAYS, BACKUP_DIR |
24, 30, /backups |
The backup service's schedule and retention. See Backups. |
BACKUP_S3_BUCKET, BACKUP_S3_REGION, BACKUP_S3_ACCESS_KEY_ID, BACKUP_S3_SECRET_ACCESS_KEY, BACKUP_S3_PREFIX |
unset | Off-site copy of each encrypted backup in S3 or a Lightsail bucket. |
GATEHOUSE_LICENSE / GATEHOUSE_LICENSE_FILE |
unset | License key for self-hosted installs. See Licensing. |
Hardening
| Variable | Default | Purpose |
|---|---|---|
GATEHOUSE_STDIO_COMMANDS |
unset (any) | Comma-separated programs owners may run as local MCP servers, like npx,uvx. |
GATEHOUSE_DISABLE_STDIO |
false |
true turns local (stdio) servers off. Only remote MCP servers can be added. |
GATEHOUSE_ALLOW_LINK_LOCAL |
false |
true lets Gatehouse connect to link-local and cloud metadata addresses. Leave it off. |
GATEHOUSE_ALLOW_PLAIN_LDAP |
false |
true allows ldap:// without StartTLS. For labs only; passwords cross the network in clear text. |
| Variable | Default | Purpose |
|---|---|---|
SMTP_HOST |
unset | Turns on email for invites and password resets. |
SMTP_PORT |
587 |
|
SMTP_USER, SMTP_PASSWORD |
unset | Credentials, if your server needs them. |
SMTP_FROM |
Gatehouse <no-reply@localhost> |
Sender address. |
SMTP_SECURE |
false |
true for implicit TLS (usually port 465). |
Slack
| Variable | Purpose |
|---|---|
SLACK_BOT_TOKEN |
Bot token (xoxb-…). |
SLACK_APP_TOKEN |
App-level token with connections:write (xapp-…), for Socket Mode. |
SLACK_CHANNEL |
Channel ID for approval requests. |
See Approvals for setup.