Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
200 lines (168 loc) · 10.6 KB
/
Copy path.env.example
File metadata and controls
200 lines (168 loc) · 10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# Pad — Docker Compose environment example
#
# Copy to .env, fill in values, then run `docker compose up -d`.
#
# If you don't already have a POSTGRES_PASSWORD, generate one with:
# openssl rand -base64 32
# …and paste it below. Docker Compose WILL refuse to start with the password
# missing; this is deliberate so a fresh deploy can never inherit a known-weak
# default credential.
# REQUIRED — PostgreSQL password for the `pad` user.
POSTGRES_PASSWORD=
# REQUIRED on Postgres — AES-256 encryption key for TOTP seeds and other
# sensitive fields. 64-character hex string (32 bytes). Pad will auto-
# generate one on SQLite deployments but refuses to on Postgres because
# multi-replica deployments would generate divergent keys and fail cross-
# instance decryption. Generate with:
# openssl rand -hex 32
PAD_ENCRYPTION_KEY=
# RECOMMENDED — The Pad release to run (docker-compose.yml's image tag).
# Pin it so an upgrade happens when you choose: unset, the compose file uses
# `latest`, which moves to each new STABLE release on your next pull. Tags are
# the bare version (no leading v); see
# https://github.com/PerpetualSoftware/pad/releases. To upgrade, change it and
# run `docker compose pull && docker compose up -d`.
# PAD_VERSION=0.17.2
# OPTIONAL — Which host interface the Pad web UI publishes to.
# Default (loopback only) is the safest choice on a fresh install, because
# the bootstrap endpoint is reachable until the first admin is created.
# 127.0.0.1 → localhost only (default)
# 0.0.0.0 → every interface (LAN + internet if no firewall)
# 10.0.0.5 → bind to a specific LAN IP
# PAD_BIND_ADDR=127.0.0.1
# OPTIONAL — Container UID/GID for the pad process (Docker only).
# Default: 1000/1000 with docker-compose; 99/100 with raw `docker run`
# (Unraid `nobody:users` convention). Set these to match your host
# volume's ownership to avoid permission errors on /data writes.
# Must be POSITIVE integers — 0 (root) is rejected by the entrypoint.
# See docker-entrypoint.sh.
# PUID=1000
# PGID=1000
# OPTIONAL — Redis auth (docker-compose.prod.yml only).
# If set, Redis starts with `--requirepass` and Pad connects with the password.
# REDIS_PASSWORD=
# OPTIONAL — Pad Cloud sidecar shared secret (cloud mode only).
# Comma-separated list supports rotation for INBOUND calls: pad accepts
# any listed secret when pad-cloud calls pad's admin endpoints.
# PAD_CLOUD_SECRET=
# OPTIONAL — Base URL pad uses to call pad-cloud back (reverse direction,
# e.g. Stripe cancel-customer when a user deletes their account). Required
# in cloud mode to cascade account deletion through to Stripe billing;
# without it, pad deletes local rows but never cancels the subscription.
# PAD_CLOUD_SIDECAR_URL=http://pad-cloud:7778
# OPTIONAL — Exact outbound secret pad sends on reverse calls. Use this
# during a cloud-secret rotation when pad-cloud is still validating against
# the OLD value: pin the outbound here so the reverse call matches, then
# roll pad-cloud, then unpin. When unset, pad falls back to the LAST entry
# of PAD_CLOUD_SECRET (the older rotation value).
# PAD_CLOUD_OUTBOUND_SECRET=
# OPTIONAL — Trusted reverse-proxy CIDRs. Only peers in these CIDRs may set
# X-Forwarded-For / X-Real-IP. Leave unset for direct-exposed deploys.
# PAD_TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12
# OPTIONAL — Bearer token required to scrape /metrics. When unset, /metrics
# is reachable only from loopback (so a Prometheus on the same host keeps
# working without config); when set, every scrape must send
# "Authorization: Bearer $PAD_METRICS_TOKEN".
# openssl rand -hex 32
# PAD_METRICS_TOKEN=
# OPTIONAL — Session IP-change policy.
# Default (unset) logs an ActionSessionIPChanged audit entry when a session
# presents a new client IP and updates the stored IP. "strict" additionally
# destroys the session and forces re-login. Strict mode breaks legitimate
# mobility (mobile roaming, VPN toggles, carrier NAT); enable only for
# high-sensitivity deployments.
# PAD_IP_CHANGE_ENFORCE=strict
# ─────────────────────────────────────────────────────────────────────
# Core server — see docs/deployment.md for full reference.
# ─────────────────────────────────────────────────────────────────────
# Listen address. 0.0.0.0 for containers, 127.0.0.1 for loopback-only.
# PAD_HOST=0.0.0.0
# Listen port.
# PAD_PORT=7777
# Public-facing base URL. Used to build invitation + password-reset links.
# Required on deployments that bind to 0.0.0.0 — without it, emailed links
# point at "http://0.0.0.0:7777" which recipients cannot reach (BUG-899).
# PAD_URL=https://pad.example.com
# Alternative to PAD_URL using the generic env-var convention. Read by the
# server only (does not flip the CLI to remote mode, does not contaminate
# the CLI's BaseURL, and is intentionally NOT persisted to config.toml on
# `pad init` / `pad configure` saves), so it's safe to set on hosts that
# already use PUBLIC_URL for other tooling. Pad-cloud sets it on its
# sidecar and forwards it to the pad service in the same compose.
# Precedence: PAD_URL > PUBLIC_URL > constructed http://host:port.
# PUBLIC_URL=https://pad.example.com
# ── MCP over HTTP for agents (off by default) ───────────────────────────
# See docs/deployment.md, "MCP for agents (self-hosted)". On a self-hosted
# install MCP is served at /mcp only when an admin turns it on AND PAD_URL
# (or PUBLIC_URL) is set: unlike emailed links, MCP never falls back to
# http://host:port. (Pad Cloud always serves it; these settings do not
# apply there.)
# An https issuer URL (PAD_AUTH_SERVER_URL, default the origin) gives OAuth
# plus personal API tokens; an http one gives tokens only. Behind a proxy,
# forward the Host header and set PAD_TRUSTED_PROXIES.
#
# Force MCP on or off and lock the admin toggle (true/false). Unset leaves
# it to the toggle (Settings → Admin → Instance → MCP for agents, or
# PUT /api/v1/admin/mcp).
# PAD_MCP_ENABLED=
#
# Override the MCP URL clients connect to (default <origin>/mcp). It is
# also the OAuth audience: changing it invalidates issued OAuth tokens.
# PAD_MCP_PUBLIC_URL=https://pad.example.com/mcp
#
# Override the OAuth issuer (default: the origin).
# PAD_AUTH_SERVER_URL=https://pad.example.com
# Writable data directory — SQLite DB, config, logs. Default: ~/.pad
# PAD_DATA_DIR=/data
# Log level: debug | info | warn | error
# PAD_LOG_LEVEL=info
# Operating mode: local | remote | cloud. Controls how the CLI
# discovers the daemon and which credential keying rules apply.
# PAD_MODE=local
# ─────────────────────────────────────────────────────────────────────
# Database — SQLite default; set PAD_DB_DRIVER=postgres for Postgres.
# ─────────────────────────────────────────────────────────────────────
# PAD_DB_DRIVER=postgres
# PAD_DB_PATH=/data/pad.db # SQLite path, ignored on Postgres
# PAD_DATABASE_URL=postgres://pad:secret@postgres:5432/pad?sslmode=disable
# ─────────────────────────────────────────────────────────────────────
# Real-time events — cross-instance fan-out via Redis. Carries three things:
# SSE activity events, watch/push notifications, and the session-presence
# registry that `pad push` and the web UI's agent-session picker read.
# Without this, all three stay in-process (fine for single-node).
# Use a non-evicting maxmemory-policy — see docs/deployment.md.
# ─────────────────────────────────────────────────────────────────────
# PAD_REDIS_URL=redis://redis:6379
# Scopes every Redis key and channel to THIS installation. Leave unset
# unless two Pad installations share one Redis endpoint — unset keeps the
# historical key names, so upgrading changes nothing. Lowercase letters,
# digits, '-' and '_' only; a whitespace-only value is refused at startup
# rather than treated as unset. Changing it on a running deployment is a
# cutover, not a tweak — see docs/deployment.md.
# PAD_REDIS_NAMESPACE=prod
# Streaming connection caps, all PER INSTANCE (no shared counter — a
# three-replica deployment admits 3x these). MAX_CONNECTIONS and
# MAX_PER_USER cover BOTH SSE endpoints; MAX_PER_WORKSPACE covers
# /api/v1/events only. UPGRADING: MAX_CONNECTIONS used to bound only
# /api/v1/events, so a tuned value now bounds more than it did.
# Full detail, including the refusal contract: docs/deployment.md.
# PAD_SSE_MAX_CONNECTIONS=1000
# PAD_SSE_MAX_PER_WORKSPACE=100
# PAD_SSE_MAX_PER_USER=50
# Open collaborative-editing WebSockets per user, per instance (BUG-1308).
# One per open item pane; a dial over it is 429 collab_limit_exceeded.
# PAD_COLLAB_MAX_PER_USER=50
# ─────────────────────────────────────────────────────────────────────
# Security hardening for production behind TLS.
# ─────────────────────────────────────────────────────────────────────
# Set Secure flag on session cookies — requires TLS.
# PAD_SECURE_COOKIES=true
# Comma-separated list of allowed CORS origins. Leave unset to disable CORS.
# PAD_CORS_ORIGINS=https://pad.example.com,https://app.example.com
# ─────────────────────────────────────────────────────────────────────
# Transactional email via Maileroo. Optional — without it, workspace
# invites fall back to CLI-copyable join codes.
# ─────────────────────────────────────────────────────────────────────
# PAD_MAILEROO_API_KEY=your-sending-key
# PAD_EMAIL_FROM=noreply@example.com
# PAD_EMAIL_FROM_NAME=Pad