Complete environment and source token catalog
This appendix is generated from the Plainwire 2.5.0 source tree. It lists every PLAINWIRE_* token found in the snapshot, including normal operator settings, SDK/example names, build helpers, browser globals, and test-only names.
Do not copy this table into
.env. Most installations should use the upstream.env.exampleplus the subsystem guides. This catalog exists so obscure knobs are not invisible.
Catalog size: 246 tokens. Upstream .env.example contains 225 configured names.
Core and public runtime#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_ADAPTIVE_SCREEN |
false | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:156<br>src/pw_client_config.erl:10<br>src/pw_admin_runtime.erl:58 |
PLAINWIRE_ALLOW_STATIC_TURN_CREDENTIALS |
false | Compatibility/security exception. Allows static TURN username/password credentials in production. Default false. Prefer short-lived coturn shared-secret or Cloudflare credentials. | .env.example:326<br>src/pw_rtc_config.erl:58 |
PLAINWIRE_ASYNC_MAX_QUEUE |
4096 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:112<br>src/pw_async_pool.erl:23<br>scripts/verify-source.sh:170 |
PLAINWIRE_ASYNC_WORKERS |
16 | Bounded background work for presence reads, identity fanout, missed-call persistence, and other work that must not spawn without a ceiling. | .env.example:111<br>src/pw_async_pool.erl:22<br>scripts/verify-source.sh:170 |
PLAINWIRE_BASE_URL |
source-managed / unset | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | docs/BOTS.md:215<br>docs/BOTS.md:233<br>sdk/c/README.md:15 |
PLAINWIRE_CLUSTER_DEDUP_LIMIT |
262144 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:234<br>src/pw_cluster.erl:75<br>scripts/verify-source.sh:172 |
PLAINWIRE_CLUSTER_DRAIN_BATCH |
128 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:233<br>src/pw_cluster.erl:71<br>scripts/verify-source.sh:172 |
PLAINWIRE_CLUSTER_EVENT_MAX_AGE_MS |
12000 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:230<br>src/pw_cluster.erl:69<br>scripts/verify-source.sh:171 |
PLAINWIRE_CLUSTER_OUTBOX_LIMIT |
8192 | Optional cross-node event transport queue. 2.4.0 still supports exactly one realtime/WebSocket owner; API nodes may forward committed events to it. The bounded outbox absorbs brief transport outages and expires stale realtime events rather than allowing unbounded memory growth or retry storms. | .env.example:229<br>src/pw_cluster.erl:65<br>scripts/verify-source.sh:171 |
PLAINWIRE_CLUSTER_RETRY_MS |
500 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:231<br>src/pw_cluster.erl:70<br>docs/SCALING.md:60 |
PLAINWIRE_CLUSTER_REVALIDATE_JITTER_MS |
10000 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:232<br>src/pw_ws.erl:340<br>docs/SCALING.md:161 |
PLAINWIRE_DEFAULT_THEME |
system | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:125<br>.env.example:10<br>.env.development.example:14 |
PLAINWIRE_ENC_KEY |
secret / unset | Generate with: openssl rand -base64 32 | RELEASE_NOTES_2.1.0.md:88<br>.env.example:38<br>.env.example:40 |
PLAINWIRE_ENC_PREVIOUS_KEYS |
source-managed / unset | During an encryption-key rotation, put the old base64 key(s) here, comma separated. New data uses PLAINWIRE_ENC_KEY; existing data can still be read with up to four previous keys. Do not remove a previous key until all data encrypted with it has been deliberately re-encrypted or aged out. | RELEASE_NOTES_2.1.0.md:88<br>RELEASE_NOTES_2.1.0.md:175<br>.env.example:43 |
PLAINWIRE_ENV |
production | Public production deployment | README.md:112<br>.env.example:2<br>.env.development.example:2 |
PLAINWIRE_IDLE_TIMEOUT_MS |
600000 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:15<br>src/pw_client_config.erl:24 |
PLAINWIRE_INSTANCE_DESCRIPTION |
"A fast, self-hosted place to talk." | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:130<br>src/pw_client_config.erl:20 |
PLAINWIRE_KRISP_ENABLED |
false | Optional, licensed Krisp bits live in priv/static/krisp (see its README) | .env.example:126<br>src/pw_rtc_config.erl:39<br>src/pw_util.erl:264 |
PLAINWIRE_LOAD_SELFTEST_PORT |
source-managed / unset | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | scripts/test-live-load-harness.sh:6 |
PLAINWIRE_MAIL_ENABLED |
source-managed / unset | --- Mail / password reset (plainwi.re only by default) --- SMTP credentials belong in the host environment, never in git. Password reset is enabled automatically when PLAINWIRE_PUBLIC_URL is https://plainwi.re (or www.plainwi.re) and SMTP is configured. Self-hosted instances stay silent unless PLAINWIRE_MAIL_ENABLED=true. Proton Mail needs an SMTP token from Proton settings, not a mailbox password. | RELEASE_NOTES_2.4.1.md:15<br>README.md:133<br>.env.example:335 |
PLAINWIRE_MAX_SESSIONS_PER_USER |
32 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:17<br>src/pw_db.erl:6048<br>scripts/install-openrc-release.sh:156 |
PLAINWIRE_PBKDF2_ITERS |
160000 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:53<br>src/pw_app.erl:161<br>src/pw_util.erl:105 |
PLAINWIRE_PRESENCE_WATCH_MAX |
2000 | One client cannot create unbounded presence reverse-index cardinality. | .env.example:101<br>src/pw_ws.erl:186<br>src/pw_realtime_registry.erl:410 |
PLAINWIRE_PUBLIC_URL |
https://chat.example.com | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:113<br>README.md:138<br>.env.example:3 |
PLAINWIRE_RATE_MAX_ENTRIES |
500000 | Cap high-cardinality fixed-window rate state. New keys fail closed at this ceiling while expired buckets are garbage-collected. | .env.example:99<br>src/pw_rate.erl:57<br>docs/SCALING.md:36 |
PLAINWIRE_REGISTRATION_ENABLED |
true | Public instance identity and sign-up policy | README.md:126<br>.env.example:129<br>src/pw_client_config.erl:92 |
PLAINWIRE_SEARCH_BACKFILL_BATCH |
100 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:48<br>src/pw_search_index.erl:23<br>test/browser/v21-contract.mjs:28 |
PLAINWIRE_SEARCH_BACKFILL_INTERVAL_MS |
1500 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:49<br>src/pw_search_index.erl:24<br>test/browser/v21-contract.mjs:28 |
PLAINWIRE_SEARCH_KEY |
source-managed / unset | Optional independent 32-byte base64 HMAC key for the message blind-search index. If empty, Plainwire derives a search key from PLAINWIRE_ENC_KEY. Changing it invalidates and rebuilds the blind index without storing plaintext search terms. | RELEASE_NOTES_2.1.0.md:90<br>.env.example:47<br>src/pw_crypto.erl:17 |
PLAINWIRE_SESSION_DAYS |
30 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:16<br>src/pw_db.erl:6040<br>src/pw_util.erl:331 |
PLAINWIRE_SMTP_FROM |
source-managed / unset | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:143<br>.env.example:342<br>src/pw_mail.erl:162 |
PLAINWIRE_SMTP_HOST |
smtp.protonmail.ch | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:139<br>.env.example:338<br>src/pw_mail.erl:98 |
PLAINWIRE_SMTP_PASS |
secret / unset | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:142<br>.env.example:341<br>src/pw_mail.erl:104 |
PLAINWIRE_SMTP_PORT |
587 | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:140<br>.env.example:339<br>src/pw_mail.erl:186 |
PLAINWIRE_SMTP_TLS |
true | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:343<br>src/pw_mail.erl:301 |
PLAINWIRE_SMTP_USER |
source-managed / unset | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:141<br>.env.example:340<br>src/pw_mail.erl:99 |
PLAINWIRE_SOURCE_REPOSITORY |
https://github.com/Plainwire-development/Plainwire | Repository shown by the first-run tour and Help surfaces. HTTPS only. | README.md:151<br>.env.example:132<br>.env.development.example:24 |
PLAINWIRE_URL |
source-managed / unset | Advanced core and public runtime setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | sdk/python/echo_bot.py:4<br>sdk/rust/examples/echo.rs:4 |
Database#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_ALLOW_INSECURE_DB |
false | Compatibility/security exception. Explicit production exception for PostgreSQL without TLS. Use only when the DB path is fully trusted, such as a private same-host/container network. | .env.example:307<br>deploy/README.md:34<br>src/pw_app.erl:142 |
PLAINWIRE_DB_CALL_TIMEOUT_MS |
60000 | Maximum caller wait for a DB lane. PostgreSQL statement_timeout should normally be lower so work stops before the caller gives up. | .env.example:31<br>src/pw_db.erl:162<br>scripts/verify-source.sh:168 |
PLAINWIRE_DB_HOST |
database.internal | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:118<br>.env.example:19<br>.env.development.example:6 |
PLAINWIRE_DB_IDLE_TX_TIMEOUT_MS |
15000 | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:33<br>src/pw_db.erl:918 |
PLAINWIRE_DB_LOCK_TIMEOUT_MS |
5000 | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:34<br>src/pw_db.erl:919 |
PLAINWIRE_DB_MAX_QUEUE |
250 | Per-lane bounded queue; overload fails fast instead of growing BEAM mailboxes. | .env.example:28<br>src/pw_db.erl:101<br>src/pw_db.erl:198 |
PLAINWIRE_DB_NAME |
plainwire | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:122<br>.env.example:23<br>.env.development.example:10 |
PLAINWIRE_DB_PASS |
secret / unset | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:121<br>.env.example:22<br>.env.development.example:9 |
PLAINWIRE_DB_POOL_SIZE |
20 | Start near 2x CPU cores, then watch postgres and tune it | .env.example:26<br>.env.development.example:12<br>src/pw_db.erl:554 |
PLAINWIRE_DB_PORT |
5432 | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:119<br>.env.example:20<br>.env.development.example:7 |
PLAINWIRE_DB_SLOW_MS |
250 | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:35<br>src/pw_db.erl:238 |
PLAINWIRE_DB_SSL |
true | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:24<br>.env.development.example:11<br>src/pw_app.erl:142 |
PLAINWIRE_DB_STATEMENT_TIMEOUT_MS |
15000 | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:32<br>src/pw_db.erl:917<br>docs/SCALING.md:46 |
PLAINWIRE_DB_USER |
plainwire | Advanced database setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:120<br>.env.example:21<br>.env.development.example:8 |
PLAINWIRE_POSTGRES_SERVICE |
source-managed / unset | OpenRC installer override naming the PostgreSQL service to manage/discover. Not used by normal app runtime. | scripts/install-openrc-release.sh:19<br>scripts/install-openrc-release.sh:35 |
Uploads and media#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_ALLOW_ARBITRARY_MEDIA |
false | Compatibility/security exception. Compatibility override allowing remote media outside the normal production restrictions. Default false. Avoid in production unless the egress risk is understood. | .env.example:308<br>src/pw_media.erl:428<br>scripts/install-openrc-release.sh:152 |
PLAINWIRE_ALLOW_UNSIGNED_MEDIA_TOKENS |
false | Compatibility/security exception. Compatibility override for unsigned media tokens in production. Default false. Do not enable as a routine deployment setting. | .env.example:309<br>src/pw_media.erl:344 |
PLAINWIRE_COMPRESS_OVERSIZE_UPLOADS |
true | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:13<br>src/pw_client_config.erl:25<br>scripts/install-openrc-release.sh:143 |
PLAINWIRE_FILE_REQUESTS_PER_MINUTE |
1200 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:89<br>src/pw_file_hdl.erl:24 |
PLAINWIRE_MEDIA_ALLOWED_HOSTS |
cdn.example.com | Trusted image/CDN hosts only. keep egress filtering too | .env.example:56<br>src/pw_media.erl:426<br>scripts/install-openrc-release.sh:151 |
PLAINWIRE_MEDIA_FETCH_CONCURRENCY |
24 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:57<br>src/pw_media.erl:307<br>scripts/install-openrc-release.sh:153 |
PLAINWIRE_MEDIA_QUALITY |
auto | Optional numeric diagnostics. Build with scripts/build-media-quality.sh. auto uses the worker if installed; off disables server analysis. | .env.example:155<br>src/pw_client_config.erl:9<br>src/pw_admin_runtime.erl:57 |
PLAINWIRE_MEDIA_QUALITY_BIN |
source-managed / unset | Absolute path override for the optional native media-quality executable. | .env.example:329<br>src/pw_media_quality.erl:25<br>docs/CALL_HEALTH.md:18 |
PLAINWIRE_MEDIA_REQUESTS_PER_MINUTE |
1200 | Authenticated avatar/file-heavy screens get a generous per-user/IP burst budget | .env.example:88<br>src/pw_media_hdl.erl:25 |
PLAINWIRE_MEDIA_SIGNING_KEY |
secret / unset | Optional dedicated media-token signing key. Keep secret. Source install helpers generate/configure it when needed. | RELEASE_NOTES_2.1.0.md:90<br>.env.example:52<br>src/pw_crypto.erl:40 |
PLAINWIRE_PROFILE_IMAGE_MAX_BYTES |
16777216 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:12<br>src/pw_client_config.erl:114<br>scripts/install-openrc-release.sh:142 |
PLAINWIRE_UPLOAD_CONCURRENCY |
64 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:64<br>src/pw_upload_gc.erl:100<br>src/pw_admin_runtime.erl:50 |
PLAINWIRE_UPLOAD_DIR |
/var/lib/plainwire/uploads | Streamed attachments need durable storage and a 250 MB proxy limit on /api/uploads | .env.example:60<br>.env.development.example:13<br>deploy/plainwire.service:12 |
PLAINWIRE_UPLOAD_IMAGE_MAX_DIMENSION |
4096 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:14<br>src/pw_client_config.erl:26<br>scripts/install-openrc-release.sh:144 |
PLAINWIRE_UPLOAD_INFLIGHT_BYTES |
1073741824 | Big uploads add up. put a ceiling on the pile. | .env.example:67<br>src/pw_upload_gc.erl:102<br>scripts/install-openrc-release.sh:149 |
PLAINWIRE_UPLOAD_MAX_BYTES |
262144000 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:61<br>deploy/README.md:38<br>src/pw_client_config.erl:111 |
PLAINWIRE_UPLOAD_MAX_FILES |
10 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:11<br>src/pw_client_config.erl:23<br>scripts/install-openrc-release.sh:141 |
PLAINWIRE_UPLOAD_QUOTA_BYTES |
1073741824 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:62<br>src/pw_db.erl:5608<br>scripts/install-openrc-release.sh:145 |
PLAINWIRE_UPLOAD_RETENTION_DAYS |
90 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:63<br>src/pw_upload_gc.erl:138<br>src/pw_admin_runtime.erl:49 |
PLAINWIRE_UPLOAD_USER_CONCURRENCY |
4 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:65<br>src/pw_upload_gc.erl:101<br>scripts/install-openrc-release.sh:148 |
PLAINWIRE_UPLOAD_USER_INFLIGHT_BYTES |
536870912 | Advanced uploads and media setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:68<br>src/pw_upload_gc.erl:103<br>scripts/install-openrc-release.sh:150 |
HTTP and WebSocket#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_ALLOWED_ORIGINS |
source-managed / unset | Comma-separated WebSocket origin allowlist. If unset, Plainwire derives the normal production origin from the public URL. Set explicitly for unusual multi-origin deployments. | .env.example:303<br>src/pw_ws.erl:570<br>scripts/install-openrc-release.sh:126 |
PLAINWIRE_HTTP_ACCEPTORS |
100 | Cowboy/ranch capacity; proxy and file-descriptor limits need to agree | .env.example:71<br>src/pw_sup.erl:97 |
PLAINWIRE_HTTP_CONNECTION_SUPERVISORS |
8 | Ranch connection supervisors reduce accept/connection-management contention. max_connections is exposed here as an approximate listener-wide cap; Plainwire divides it across these supervisors internally. | .env.example:75<br>src/pw_sup.erl:100<br>scripts/verify-source.sh:173 |
PLAINWIRE_HTTP_CONNECT_TIMEOUT_MS |
2500 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:86<br>src/pw_http_fetch.erl:52<br>src/pw_http_fetch.erl:151 |
PLAINWIRE_HTTP_FETCH_TIMEOUT_MS |
8000 | Bounded upstream media/embed fetches: slow/dead avatar hosts must not stall UI lists | .env.example:85<br>src/pw_media.erl:256<br>src/pw_http_fetch.erl:51 |
PLAINWIRE_HTTP_HANDSHAKE_TIMEOUT_MS |
5000 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:77<br>src/pw_sup.erl:121 |
PLAINWIRE_HTTP_IDLE_TIMEOUT_MS |
60000 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:80<br>src/pw_sup.erl:132 |
PLAINWIRE_HTTP_MAX_CONNECTIONS |
100000 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:76<br>src/pw_sup.erl:98<br>src/pw_admin_runtime.erl:51 |
PLAINWIRE_HTTP_MAX_KEEPALIVE |
1000 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:82<br>src/pw_sup.erl:134 |
PLAINWIRE_HTTP_REQUEST_TIMEOUT_MS |
30000 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:81<br>src/pw_sup.erl:133 |
PLAINWIRE_HTTP_SEND_TIMEOUT_MS |
15000 | Close TCP clients that cannot drain outbound data within this window. | .env.example:79<br>src/pw_sup.erl:126<br>scripts/verify-source.sh:173 |
PLAINWIRE_TRUSTED_PROXIES |
127.0.0.1/32,::1/128 | Trusted reverse-proxy CIDRs. Default source value is 127.0.0.1/32,::1/128. Keep narrow. |
.env.example:305<br>src/pw_util.erl:375 |
PLAINWIRE_TRUST_PROXY |
true | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:116<br>.env.example:5<br>.env.development.example:5 |
PLAINWIRE_WS_COMPRESS |
true | WebSocket permessage-deflate. Disable only after measuring CPU/bandwidth tradeoffs. | .env.example:313<br>src/pw_ws.erl:89 |
PLAINWIRE_WS_HARD_QUEUE |
2000 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:105<br>src/pw_realtime_delivery.erl:105<br>docs/SCALING.md:25 |
PLAINWIRE_WS_MAX_CONNECTIONS |
100000 | Realtime admission/backpressure. The WebSocket cap is intentionally separate from Ranch's listener-wide HTTP cap because keep-alive HTTP and WS have different cost profiles. Upgrade limits blunt reconnect storms. | .env.example:94<br>src/pw_ws.erl:33<br>scripts/verify-source.sh:174 |
PLAINWIRE_WS_SOFT_QUEUE |
500 | Slow clients do not get to fill the BEAM mailbox forever. Ephemeral events are shed at the soft limit and persistently slow consumers are evicted at hard. | .env.example:104<br>src/pw_realtime_delivery.erl:104<br>docs/SCALING.md:25 |
PLAINWIRE_WS_TRACE |
false | Hot per-frame tracing is intentionally off in production. | .env.example:107<br>src/pw_hub.erl:313<br>src/pw_ws.erl:623 |
PLAINWIRE_WS_UPGRADES_GLOBAL_MIN |
60000 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:96<br>src/pw_ws.erl:35<br>scripts/verify-source.sh:175 |
PLAINWIRE_WS_UPGRADES_PER_IP_MIN |
1200 | Advanced http and websocket setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:95<br>src/pw_ws.erl:34<br>scripts/verify-source.sh:175 |
Realtime and TURN#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_CALL_RING_MS |
45000 | Call ring timeout. Defaults to the server ring constant and is clamped between 10000 and 120000 ms. | .env.example:323<br>src/pw_hub.erl:744 |
PLAINWIRE_CF_ACCOUNT_ID |
source-managed / unset | Optional monthly usage guard. When account ID is present, unknown/stale usage prevents new credentials. Analytics is delayed; this is NOT a billing cap. | .env.example:148<br>src/pw_cf_turn.erl:18<br>src/pw_cf_turn.erl:46 |
PLAINWIRE_CF_ANALYTICS_API_TOKEN |
secret / unset | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:149<br>src/pw_cf_turn.erl:154<br>scripts/install-openrc-release.sh:60 |
PLAINWIRE_CF_TURN_API_TOKEN |
secret / unset | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:145<br>src/pw_storage_sanitize.erl:66<br>src/pw_cf_turn.erl:15 |
PLAINWIRE_CF_TURN_KEY_ID |
secret / unset | Cloudflare TURN takes priority when BOTH values are set. Keep tokens private. A Cloudflare Tunnel token is a different credential and will not work here. | .env.example:144<br>src/pw_cf_turn.erl:15<br>src/pw_cf_turn.erl:17 |
PLAINWIRE_CF_USAGE_CHECK_INTERVAL_MS |
300000 | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:151<br>src/pw_cf_turn.erl:70<br>docs/CLOUDFLARE_TURN.md:26 |
PLAINWIRE_ICE_TRANSPORT_POLICY |
all | WebRTC ICE policy. all is normal. relay forces TURN and is useful for controlled relay tests. |
.env.example:318<br>src/pw_rtc_config.erl:14<br>docs/CLOUDFLARE_TURN.md:35 |
PLAINWIRE_REQUIRE_TURN |
true | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:195<br>.env.example:122<br>src/pw_rtc_config.erl:56 |
PLAINWIRE_RTC_CONFIG |
source-managed / unset | Browser global holding fetched ICE configuration. Not a server environment variable. | priv/static/elm-bridge.js:1465<br>priv/static/elm-bridge.js:1629 |
PLAINWIRE_RTC_RECONNECT_GRACE_MS |
15000 | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:123<br>src/pw_hub.erl:1046<br>test/pw_hub_tests.erl:293 |
PLAINWIRE_STUN_URLS |
source-managed / unset | Comma-separated STUN URL override. Source default includes Google public STUN at stun:stun.l.google.com:19302. |
.env.example:317<br>src/pw_rtc_config.erl:10<br>test/pw_rtc_config_tests.erl:27 |
PLAINWIRE_TURN_CREDENTIAL |
secret / unset | Static TURN credential compatibility setting. Production requires the explicit static-credential override. Prefer short-lived credentials. | .env.example:327<br>src/pw_rtc_config.erl:92<br>src/pw_rtc_config.erl:113 |
PLAINWIRE_TURN_MONTHLY_LIMIT_BYTES |
950000000000 | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:150<br>src/pw_cf_turn.erl:121<br>docs/CLOUDFLARE_TURN.md:25 |
PLAINWIRE_TURN_SECRET |
secret / unset | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:194<br>.env.example:119<br>src/pw_rtc_config.erl:57 |
PLAINWIRE_TURN_TTL_SECONDS |
3600 | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:121<br>src/pw_rtc_config.erl:33<br>src/pw_rtc_config.erl:97 |
PLAINWIRE_TURN_URLS |
turn:turn.example.com:3478?transport=udp,turn:turn.example.com:3478?transport=tcp,turns:turn.example.com:5349?transport=tcp | Coturn: use-auth-secret, the same static-auth-secret, and a realm | README.md:193<br>.env.example:118<br>src/pw_rtc_config.erl:30 |
PLAINWIRE_TURN_USERNAME |
plainwire | Advanced realtime and turn setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:120<br>src/pw_rtc_config.erl:91<br>src/pw_rtc_config.erl:99 |
PLAINWIRE_VOICE_MAX_PARTICIPANTS |
8 | Voice room participant cap. Default 8, clamped to 2 through 32. | .env.example:321<br>src/pw_media_topology.erl:11 |
PLAINWIRE_VOICE_MAX_SHARES |
2 | Concurrent screen-share cap. Default 2, clamped to 1 through 8. | .env.example:322<br>src/pw_media_topology.erl:14 |
Admin control plane#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_ADMIN_ACCEPTORS |
10 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:171<br>src/pw_sup.erl:53 |
PLAINWIRE_ADMIN_ALLOW_REMOTE |
false | Remote production access is deliberately opt-in and requires HTTPS + secure cookies. | README.md:298<br>.env.example:185<br>src/pw_app.erl:90 |
PLAINWIRE_ADMIN_BIND |
127.0.0.1 | Loopback is the safe default. Put an HTTPS reverse proxy in front for remote use. | README.md:294<br>.env.example:169<br>src/pw_app.erl:56 |
PLAINWIRE_ADMIN_BOOTSTRAP_TOKEN |
secret / unset | Sensitive compatibility token name recognized by storage/config sanitization. Plainwire 2.5 host-admin enrollment does not require it. Prefer the documented enrollment/recovery flow rather than inventing a permanent admin key. | .env.example:372<br>src/pw_storage_sanitize.erl:65 |
PLAINWIRE_ADMIN_CONNECTION_SUPERVISORS |
4 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:172<br>src/pw_sup.erl:55 |
PLAINWIRE_ADMIN_COOKIE_SECURE |
true | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:189<br>src/pw_admin_api.erl:350<br>src/pw_app.erl:102 |
PLAINWIRE_ADMIN_ENABLED |
false | Optional service-operator control plane. This is for the configured Plainwire HOST, not for moderators inside individual Plainwire servers. It has a separate listener and separate operator sessions. Source code contains no admin key. | README.md:293<br>.env.example:167<br>deploy/README.md:64 |
PLAINWIRE_ADMIN_ENROLLMENT_MINUTES |
60 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:180<br>src/pw_admin_api.erl:357 |
PLAINWIRE_ADMIN_HANDSHAKE_TIMEOUT_MS |
5000 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:174<br>src/pw_sup.erl:70 |
PLAINWIRE_ADMIN_IDLE_TIMEOUT_MS |
30000 | Admin HTTP listener idle timeout. Default 30000 ms, clamped to 5000 through 120000. | .env.example:176<br>src/pw_sup.erl:79 |
PLAINWIRE_ADMIN_LOCAL_RECOVERY |
false | Emergency only: generate one host-local owner recovery token on startup. Requires loopback bind. Remove after recovery. | README.md:288<br>.env.example:187<br>src/pw_app.erl:60 |
PLAINWIRE_ADMIN_MAX_CONNECTIONS |
2000 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:173<br>src/pw_sup.erl:54 |
PLAINWIRE_ADMIN_MAX_KEEPALIVE |
200 | Maximum admin listener keepalive count. Default 200, clamped to 1 through 2000. | .env.example:178<br>src/pw_sup.erl:81 |
PLAINWIRE_ADMIN_PORT |
8090 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:295<br>.env.example:170<br>src/pw_sup.erl:51 |
PLAINWIRE_ADMIN_PUBLIC_URL |
https://control.example.com | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:298<br>.env.example:188<br>src/pw_admin_api.erl:349 |
PLAINWIRE_ADMIN_REQUEST_TIMEOUT_MS |
15000 | Admin listener request timeout. Default 15000 ms, clamped to 5000 through 60000. | .env.example:177<br>src/pw_sup.erl:80 |
PLAINWIRE_ADMIN_SECRET_FILE |
/var/lib/plainwire/admin-instance.key | Production defaults to /var/lib/plainwire/admin-instance.key. Keep this file private and persistent; it binds operator verification keys to this instance. | .env.example:183<br>src/pw_app.erl:76<br>src/pw_admin_identity.erl:142 |
PLAINWIRE_ADMIN_SEND_TIMEOUT_MS |
10000 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:175<br>src/pw_sup.erl:73<br>scripts/verify-source.sh:174 |
PLAINWIRE_ADMIN_SESSION_HOURS |
12 | Advanced admin control plane setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:179<br>src/pw_admin_api.erl:353 |
Redis#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_NODE_ID |
source-managed / unset | Stable and unique per running node when using Redis-backed presence across nodes. | .env.example:206<br>src/pw_redis.erl:142<br>docs/REDIS.md:26 |
PLAINWIRE_REDIS_ASYNC_QUEUE |
4096 | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:220<br>src/pw_redis.erl:321<br>scripts/verify-source.sh:169 |
PLAINWIRE_REDIS_DB |
0 | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:212<br>src/pw_redis.erl:221 |
PLAINWIRE_REDIS_ENABLED |
false | Optional Redis real-time accelerator. Redis is never a durable authority. When Redis is disabled or unreachable, Plainwire falls back to its existing local ETS presence/rate-limit behavior and continues serving messages normally. | README.md:237<br>.env.example:204<br>deploy/README.md:3 |
PLAINWIRE_REDIS_HOST |
127.0.0.1 | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:207<br>src/pw_redis.erl:215 |
PLAINWIRE_REDIS_PASSWORD |
secret / unset | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:211<br>src/pw_storage_sanitize.erl:65<br>src/pw_redis.erl:220 |
PLAINWIRE_REDIS_POOL_SIZE |
8 | Dedicated I/O workers remove the single Redis-process bottleneck. Commands are key-affine so same-key mutations retain ordering. These queues are bounded; optional accelerator writes may be shed before they threaten the BEAM. | .env.example:218<br>src/pw_redis.erl:225<br>scripts/verify-source.sh:168 |
PLAINWIRE_REDIS_PORT |
6379 | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:208<br>src/pw_redis.erl:216 |
PLAINWIRE_REDIS_PREFIX |
plainwire | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:213<br>src/pw_redis.erl:768<br>test/pw_redis_tests.erl:26 |
PLAINWIRE_REDIS_SYNC_QUEUE |
2048 | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:219<br>src/pw_redis.erl:362<br>scripts/verify-source.sh:169 |
PLAINWIRE_REDIS_TIMEOUT_MS |
80 | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:214<br>src/pw_redis.erl:803 |
PLAINWIRE_REDIS_TLS |
false | Advanced redis setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:221<br>src/pw_redis.erl:217 |
PLAINWIRE_REDIS_TLS_INSECURE |
false | Compatibility/security exception. Emergency/private-network compatibility only. Keep false on public networks. | .env.example:223<br>src/pw_redis.erl:218 |
PLAINWIRE_REDIS_USERNAME |
source-managed / unset | Optional Redis 6+ ACL user. If set, password is required and AUTH username password is used. | .env.example:210<br>src/pw_redis.erl:219<br>test/browser/integrations-contract.mjs:53 |
Scylla and message storage#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_INSTANCE_ID |
source-managed / unset | Stable per instance is recommended; otherwise a boot nonce intentionally makes concurrent local instances distinct and they probe separate generator slots. | .env.example:287<br>src/pw_message_id.erl:233 |
PLAINWIRE_MESSAGE_BACKEND |
postgres | Optional ScyllaDB high-volume message/event storage. PostgreSQL remains the relational authority. Keep postgres for small/self-hosted installations. Use dual only while migrating; see docs/SCYLLA.md. |
.env.example:239<br>src/pw_scylla_config.erl:8<br>docs/SCYLLA.md:3 |
PLAINWIRE_MESSAGE_ID_CLOCK_ROLLBACK_MS |
2000 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:284<br>src/pw_message_id.erl:48 |
PLAINWIRE_MESSAGE_NODE_ID |
auto | auto claims one of 64 short-lived PostgreSQL-backed generator slots. |
.env.example:283<br>src/pw_message_id.erl:202<br>src/pw_message_id.erl:241 |
PLAINWIRE_SCYLLA_BACKFILL_BATCH |
250 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:274<br>src/pw_storage_migration.erl:12 |
PLAINWIRE_SCYLLA_BACKFILL_CONCURRENCY |
8 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:275<br>src/pw_storage_migration.erl:13 |
PLAINWIRE_SCYLLA_BACKFILL_MAX_ROWS |
0 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:276<br>src/pw_storage_migration.erl:14 |
PLAINWIRE_SCYLLA_BUCKET_POLICY |
month | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:262<br>src/pw_scylla_config.erl:55<br>docs/SCYLLA.md:92 |
PLAINWIRE_SCYLLA_CACHE_TTL_MS |
20000 | Scylla-side message cache TTL. Default 20000 ms, clamped to 1000 through 300000. | .env.example:362<br>src/pw_scylla_config.erl:39 |
PLAINWIRE_SCYLLA_CA_FILE |
source-managed / unset | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:247<br>src/pw_scylla_config.erl:24<br>scripts/scylla-migrate:44 |
PLAINWIRE_SCYLLA_CERT_FILE |
source-managed / unset | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:248<br>src/pw_scylla_config.erl:25<br>scripts/scylla-migrate:45 |
PLAINWIRE_SCYLLA_CONNECT_TIMEOUT_MS |
5000 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:255<br>src/pw_scylla_config.erl:32 |
PLAINWIRE_SCYLLA_CONSISTENCY |
local_quorum | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:251<br>src/pw_scylla_config.erl:46<br>docs/SCYLLA.md:87 |
PLAINWIRE_SCYLLA_CONTACT_POINTS |
127.0.0.1 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:241<br>src/pw_scylla_config.erl:105<br>scripts/scylla-migrate:7 |
PLAINWIRE_SCYLLA_DELIVERY_RETENTION_DAYS |
90 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:265<br>src/pw_scylla_config.erl:41<br>docs/SCYLLA.md:130 |
PLAINWIRE_SCYLLA_DRIVER_QUEUE |
32768 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:254<br>src/pw_scylla_config.erl:31 |
PLAINWIRE_SCYLLA_ENABLED |
false | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:240<br>deploy/README.md:3<br>src/pw_scylla_config.erl:5 |
PLAINWIRE_SCYLLA_EVENT_RETENTION_DAYS |
365 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:264<br>src/pw_scylla_config.erl:40<br>docs/SCYLLA.md:129 |
PLAINWIRE_SCYLLA_HISTORY_BUCKETS |
36 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:263<br>src/pw_message_store_scylla.erl:593<br>docs/SCYLLA.md:128 |
PLAINWIRE_SCYLLA_IO_THREADS |
2 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:253<br>src/pw_scylla_config.erl:30<br>docs/SCYLLA.md:89 |
PLAINWIRE_SCYLLA_KEYSPACE |
plainwire | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:243<br>src/pw_scylla_config.erl:20<br>scripts/scylla-migrate:9 |
PLAINWIRE_SCYLLA_KEY_FILE |
source-managed / unset | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:249<br>src/pw_scylla_config.erl:26<br>scripts/scylla-migrate:46 |
PLAINWIRE_SCYLLA_LOCAL_DC |
datacenter1 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:250<br>src/pw_scylla_config.erl:27<br>scripts/scylla-migrate:10 |
PLAINWIRE_SCYLLA_MAX_INFLIGHT |
256 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:258<br>src/pw_scylla_config.erl:35<br>docs/SCYLLA.md:114 |
PLAINWIRE_SCYLLA_MAX_PAGE_SCAN_ROWS |
4096 | Upper bound for rows scanned while serving a paged Scylla history request. Default 4096 in the Scylla message store. | .env.example:363<br>src/pw_message_store_scylla.erl:602 |
PLAINWIRE_SCYLLA_MAX_PARTITION_INFLIGHT |
8 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:259<br>src/pw_scylla_config.erl:36<br>docs/SCYLLA.md:115 |
PLAINWIRE_SCYLLA_MAX_PARTITION_QUEUE |
128 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:261<br>src/pw_scylla_config.erl:38<br>docs/SCYLLA.md:117 |
PLAINWIRE_SCYLLA_MAX_QUEUE |
4096 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:260<br>src/pw_scylla_config.erl:37<br>docs/SCYLLA.md:116 |
PLAINWIRE_SCYLLA_MIGRATION_MODE |
manual | Migration behavior selector. Source default is manual. Use the documented storage migration commands rather than changing this casually. |
.env.example:365<br>src/pw_scylla_config.erl:63 |
PLAINWIRE_SCYLLA_OPERATION_TIMEOUT_MS |
8000 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:257<br>src/pw_scylla_config.erl:34<br>docs/SCYLLA.md:91 |
PLAINWIRE_SCYLLA_PARITY_SAMPLE_ROWS |
500 | Rows sampled by parity checks. Default 500, clamped to 50 through 5000. | .env.example:368<br>src/pw_storage_migration.erl:71 |
PLAINWIRE_SCYLLA_PASSWORD |
secret / unset | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:245<br>src/pw_storage_sanitize.erl:64<br>src/pw_scylla_config.erl:22 |
PLAINWIRE_SCYLLA_POOL_SIZE |
2 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:252<br>src/pw_scylla_config.erl:29<br>docs/SCYLLA.md:88 |
PLAINWIRE_SCYLLA_PORT |
9042 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:242<br>src/pw_scylla_config.erl:19<br>scripts/scylla-migrate:8 |
PLAINWIRE_SCYLLA_RECONCILE_INTERVAL_MS |
300000 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:266<br>src/pw_storage_reconciler.erl:12<br>docs/SCYLLA.md:248 |
PLAINWIRE_SCYLLA_RECONCILE_ROWS |
500 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:267<br>src/pw_storage_migration.erl:249<br>docs/SCYLLA.md:249 |
PLAINWIRE_SCYLLA_REPLICATION_FACTOR |
source-managed / unset | Replication factor used by the explicit Scylla migration script when creating schema. Script default is 1 and is only suitable for a single-node/lab topology. | scripts/scylla-migrate:11<br>scripts/scylla-migrate:17<br>docs/SCYLLA.md:39 |
PLAINWIRE_SCYLLA_REQUEST_TIMEOUT_MS |
5000 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:256<br>src/pw_scylla_config.erl:33<br>docs/SCYLLA.md:90 |
PLAINWIRE_SCYLLA_SHADOW_SAMPLE_ROWS |
200 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:273<br>src/pw_storage_migration.erl:150<br>docs/SCYLLA.md:253 |
PLAINWIRE_SCYLLA_TLS |
false | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:246<br>src/pw_scylla_config.erl:23<br>scripts/scylla-migrate:55 |
PLAINWIRE_SCYLLA_USERNAME |
source-managed / unset | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:244<br>src/pw_scylla_config.erl:21<br>scripts/scylla-migrate:42 |
PLAINWIRE_SCYLLA_VERIFY_AFTER_ID |
0 | Starting message ID for storage verification. Default 0. | .env.example:366<br>src/pw_storage_migration.erl:51 |
PLAINWIRE_SCYLLA_VERIFY_LIMIT |
1000 | Maximum rows for a verification batch. Default 1000, clamped to 1 through 5000. | .env.example:367<br>src/pw_storage_migration.erl:52 |
PLAINWIRE_SCYLLA_WRITE_INTENT_BUCKETS |
512 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:272<br>src/pw_message_store_scylla.erl:590<br>docs/SCYLLA.md:252 |
PLAINWIRE_SCYLLA_WRITE_INTENT_GRACE_MS |
300000 | Crash-recovery journal for Scylla-authoritative writes. Intents older than this grace are reconciled against PostgreSQL before cleanup. | .env.example:270<br>src/pw_storage_migration.erl:197<br>docs/SCYLLA.md:250 |
PLAINWIRE_SCYLLA_WRITE_INTENT_RECONCILE_ROWS |
500 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:271<br>src/pw_storage_migration.erl:190<br>docs/SCYLLA.md:251 |
PLAINWIRE_STORAGE_OUTBOX_BATCH |
25 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:278<br>src/pw_storage_outbox.erl:26<br>src/pw_storage_outbox.erl:230 |
PLAINWIRE_STORAGE_OUTBOX_CONCURRENCY |
8 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:279<br>src/pw_storage_outbox.erl:27<br>src/pw_storage_outbox.erl:231 |
PLAINWIRE_STORAGE_OUTBOX_FAILED_RETENTION_DAYS |
30 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:281<br>src/pw_db.erl:3755<br>docs/SCYLLA.md:258 |
PLAINWIRE_STORAGE_OUTBOX_INTERVAL_MS |
250 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:277<br>src/pw_storage_outbox.erl:25<br>docs/SCYLLA.md:254 |
PLAINWIRE_STORAGE_OUTBOX_RETENTION_DAYS |
7 | Advanced scylla and message storage setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:280<br>src/pw_db.erl:3754<br>docs/SCYLLA.md:257 |
Developer apps, bots, webhooks, and AI#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_AI_CHAT_MENTIONS_PER_USER_PER_MINUTE |
20 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:354<br>src/pw_db.erl:6902<br>test/browser/v24-bot-contract.mjs:37 |
PLAINWIRE_AI_COMMANDS_PER_APP_PER_MINUTE |
60 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:353<br>src/pw_ai_bot_dispatcher.erl:70<br>test/browser/v21-app-contract.mjs:46 |
PLAINWIRE_AI_COMMAND_CONCURRENCY |
4 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:351<br>src/pw_ai_bot_dispatcher.erl:17<br>test/browser/v21-app-contract.mjs:47 |
PLAINWIRE_AI_COMMAND_TIMEOUT_MS |
30000 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:352<br>src/pw_ai_bot_dispatcher.erl:18 |
PLAINWIRE_APP_ALLOW_LOOPBACK_HTTP |
false | Developer app/webhook+AI outbound safety. Remote app endpoints are HTTPS-only. Enable this only for local development against exact localhost/127.0.0.1/::1. | RELEASE_NOTES_2.4.0.md:28<br>RELEASE_NOTES_2.1.0.md:43<br>.env.example:295 |
PLAINWIRE_APP_COMMAND_LEASE_MS |
45000 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:347<br>src/pw_db.erl:6364 |
PLAINWIRE_APP_COMMAND_MAX_ATTEMPTS |
6 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:348<br>src/pw_db.erl:6365<br>src/pw_db.erl:6474 |
PLAINWIRE_APP_INTERACTION_CONCURRENCY |
8 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:349<br>src/pw_app_interaction_dispatcher.erl:14 |
PLAINWIRE_APP_INTERACTION_TIMEOUT_MS |
10000 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:350<br>src/pw_app_interaction_dispatcher.erl:15 |
PLAINWIRE_APP_NAME |
Plainwire | Public client behavior. these values are served at runtime, so one build can be reused across deployments without rebuilding the Elm bundle. | README.md:124<br>.env.example:9<br>src/pw_db.erl:7847 |
PLAINWIRE_APP_REQUEST_MAX_BYTES |
65536 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:296<br>src/pw_app_http.erl:11<br>docs/SECURITY_AUDIT_2.1.0.md:37 |
PLAINWIRE_APP_RESPONSE_MAX_BYTES |
131072 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:297<br>src/pw_app_http.erl:12<br>test/browser/v21-app-contract.mjs:32 |
PLAINWIRE_APP_USER |
source-managed / unset | OpenRC install/update helper override for the Unix account that owns the Plainwire checkout. Not an application runtime setting. | scripts/install-openrc-release.sh:13<br>scripts/install-openrc-release.sh:14<br>scripts/update-openrc-release.sh:9 |
PLAINWIRE_BOT_ |
source-managed / unset | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | docs/BOTS.md:162 |
PLAINWIRE_BOT_COMMAND_CLAIM_PER_MINUTE |
2400 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:197<br>src/pw_api.erl:945<br>test/browser/v21-contract.mjs:43 |
PLAINWIRE_BOT_COMMAND_LEASE_MS |
30000 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:198<br>src/pw_db.erl:4591<br>src/pw_db.erl:4626 |
PLAINWIRE_BOT_COMMAND_MAX_ATTEMPTS |
8 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:199<br>src/pw_db.erl:4592 |
PLAINWIRE_BOT_H |
source-managed / unset | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | sdk/c/include/plainwire_bot.h:1<br>sdk/c/include/plainwire_bot.h:2 |
PLAINWIRE_BOT_MESSAGE_PER_MINUTE |
300 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:195<br>src/pw_api.erl:943<br>test/browser/v21-contract.mjs:43 |
PLAINWIRE_BOT_MUTATION_PER_MINUTE |
600 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:196<br>src/pw_api.erl:944<br>test/browser/v21-contract.mjs:43 |
PLAINWIRE_BOT_READ_PER_MINUTE |
1200 | Bot API v1 rate and durable command-delivery controls. Limits are per bot per minute and are shared across nodes when Redis is available. Command leases are intentionally short and retried with a bounded attempt count after worker loss. | .env.example:194<br>src/pw_api.erl:942<br>test/browser/v21-contract.mjs:43 |
PLAINWIRE_BOT_TOKEN |
secret / unset | Example environment variable used by the Erlang bot SDK documentation. It is not a core Plainwire server setting. | docs/BOTS.md:215<br>docs/BOTS.md:233<br>docs/BOTS.md:242 |
PLAINWIRE_DEVELOPER_APP_LIMIT |
25 | --- Developer Applications / interaction workers / AI commands --- | .env.example:346<br>src/pw_db.erl:3903 |
PLAINWIRE_GITHUB_CACHE_TTL_MS |
source-managed / unset | Cache public GitHub metadata for two minutes with a token (ten minutes without). Override only when you have a reason; values are clamped to 30s..1h. | README.md:162<br>.env.example:140<br>src/pw_github.erl:512 |
PLAINWIRE_GITHUB_TOKEN |
secret / unset | Plainwire Source uses the public GitHub REST API through the server. A token is optional, but recommended on busy public instances because it raises GitHub's upstream rate limit. Prefer a token with no repository permissions; Plainwire still filters responses to public-safe metadata. It is never returned to the browser. | README.md:161<br>.env.example:137<br>src/pw_github.erl:505 |
PLAINWIRE_KLIPY_API_KEY |
source-managed / unset | Optional KLIPY GIF search. The key stays on the server and is never sent to clients. | README.md:172<br>.env.example:159<br>.env.development.example:18 |
PLAINWIRE_KLIPY_CONTENT_FILTER |
medium | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:173<br>.env.example:160<br>.env.development.example:19 |
PLAINWIRE_KLIPY_COUNTRY |
US | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:174<br>.env.example:161<br>.env.development.example:20 |
PLAINWIRE_KLIPY_LOCALE |
en_US | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | README.md:175<br>.env.example:162<br>.env.development.example:21 |
PLAINWIRE_WEBHOOK_ALLOW_HTTP |
false | Compatibility/security exception. Allows plain HTTP webhook targets. Default false. Keep false for normal production internet egress. | .env.example:359<br>src/pw_outbound_url.erl:89<br>docs/SECURITY_AUDIT_2.1.0.md:31 |
PLAINWIRE_WEBHOOK_CONCURRENCY |
8 | Webhook dispatcher concurrency. Default 8, clamped to 1 through 32. | .env.example:356<br>src/pw_webhook_dispatcher.erl:24<br>docs/WEBHOOKS.md:110 |
PLAINWIRE_WEBHOOK_DELIVERED_RETENTION_DAYS |
7 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:291<br>src/pw_db.erl:3853<br>docs/WEBHOOKS.md:106 |
PLAINWIRE_WEBHOOK_FAILED_RETENTION_DAYS |
30 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:292<br>src/pw_db.erl:3854<br>docs/WEBHOOKS.md:107 |
PLAINWIRE_WEBHOOK_TIMEOUT_MS |
8000 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:289<br>src/pw_webhook_dispatcher.erl:16<br>src/pw_webhook_dispatcher.erl:114 |
PLAINWIRE_WEBHOOK_WORKER_TIMEOUT_MS |
13000 | Advanced developer apps, bots, webhooks, and ai setting present in the Plainwire source. Keep the source default unless the subsystem guide or a measured production need calls for an override. | .env.example:290<br>src/pw_webhook_dispatcher.erl:17<br>docs/WEBHOOKS.md:109 |
Build, development, and internal#
| Name | Example/default | Purpose | Source |
|---|---|---|---|
PLAINWIRE_ASSET_VERSION |
source-managed / unset | Optional runtime asset fingerprint override. Normally let Plainwire derive its asset version from the build. | .env.example:311<br>src/pw_client_config.erl:46<br>docs/UI_REFRESH.md:3 |
PLAINWIRE_BUILD_MEDIA_QUALITY |
source-managed / unset | Release helper switch controlling whether the optional native media-quality worker is built. Defaults to 0 in packaging scripts. | scripts/release-check.sh:4<br>scripts/package-release.sh:4 |
PLAINWIRE_BUILD_PROFILE |
source-managed / unset | Release helper rebar profile override. Packaging scripts default it to default. |
scripts/release-check.sh:4<br>scripts/package-release.sh:4 |
PLAINWIRE_CLIENT_CONFIG |
source-managed / unset | Browser global populated by bootstrap code. This is not a server environment variable to set in .env. |
priv/static/elm-bridge.js:14<br>priv/static/bootstrap.js:37 |
PLAINWIRE_DEBUG |
source-managed / unset | Browser/test debug flag. Not a normal server environment variable. | test/browser/rtc.mjs:40<br>priv/static/elm-bridge.js:1500 |
PLAINWIRE_DEV_DB_DIR |
source-managed / unset | Development PostgreSQL helper data directory. Defaults below XDG data home or ~/.local/share/plainwire/postgres. |
scripts/dev-db.sh:4 |
PLAINWIRE_DEV_DB_LOG |
source-managed / unset | Development database helper log path. Defaults to postgres.log under the helper socket directory. |
scripts/dev-db.sh:6 |
PLAINWIRE_DEV_DB_SOCKET_DIR |
source-managed / unset | Development database helper socket directory. Defaults to the parent of the development DB data directory. | scripts/dev-db.sh:5 |
PLAINWIRE_HOST |
source-managed / unset | Hostname variable consumed by the upstream Caddy example. It is a proxy-template variable, not the Plainwire public URL setting. | deploy/README.md:38<br>deploy/Caddyfile:1<br>deploy/Caddyfile:2 |
PLAINWIRE_RELEASE_BIN |
source-managed / unset | Path to an installed relx plainwire_relay executable used by migration/benchmark helper scripts for RPC. |
scripts/storage-migrate:6<br>scripts/storage-migrate:9<br>scripts/storage-bench:5 |
PLAINWIRE_TEST_BOOL |
true | Internal EUnit fixture for environment parsing tests. Do not configure in production. | test/pw_util_tests.erl:41<br>test/pw_util_tests.erl:42<br>test/pw_util_tests.erl:43 |
PLAINWIRE_TEST_CQLSH_LOG |
source-managed / unset | Browser/tool test fixture used to capture fake cqlsh invocations. Do not configure in production. |
test/browser/storage-tools.mjs:14<br>test/browser/storage-tools.mjs:20 |
PLAINWIRE_TEST_NATIVE |
source-managed / unset | Test switch enabling native media-quality integration tests. Do not configure in production. | Makefile:156<br>docs/UI_REFRESH.md:28<br>docs/CALL_HEALTH.md:12 |
PLAINWIRE_VERSION__ |
source-managed / unset | Build-time HTML placeholder token, not an environment variable. | scripts/verify-source.sh:45<br>scripts/verify-source.sh:46<br>scripts/verify-source.sh:47 |
Regenerate after an upstream upgrade#
python3 scripts/rebuild-env-reference.py /path/to/Plainwire
python3 scripts/build-site.py
Review the diff. A new variable is not automatically a setting operators should change. Document its operational meaning before using it in production.