Skip to content

Commit e308570

Browse files
JohnMcLearclaude
andcommitted
docs: document docker-compose credential + TRUST_PROXY changes (#7907 follow-up)
#7907 made the production docker-compose require ADMIN_PASSWORD and the DB password (no insecure fallback) and defaulted TRUST_PROXY to false, but only changed docker-compose.yml. This brings the docs in line: - .env.default: document DOCKER_COMPOSE_APP_TRUST_PROXY (set true behind a trusted reverse proxy) and note ADMIN_PASSWORD is required (compose won't start while it's empty). - .env.dev.default: document the dev DOCKER_COMPOSE_APP_DEV_ENV_TRUST_PROXY. - README.md / doc/docker.md: update the embedded compose snippets to match the merged file (required ADMIN_PASSWORD/DB password, TRUST_PROXY default false). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3e76450 commit e308570

4 files changed

Lines changed: 22 additions & 8 deletions

File tree

.env.default

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,18 @@ DOCKER_COMPOSE_APP_PORT_TARGET=9001
1111
# The env var DEFAULT_PAD_TEXT seems to be mandatory in the latest version of etherpad.
1212
DOCKER_COMPOSE_APP_DEV_ENV_DEFAULT_PAD_TEXT="Welcome to etherpad"
1313

14+
# REQUIRED. The /admin account password. docker-compose refuses to start while
15+
# this is empty (the value has no insecure fallback). Set a strong value — the
16+
# /admin UI can install plugins, which is arbitrary code execution.
1417
DOCKER_COMPOSE_APP_ADMIN_PASSWORD=
1518

19+
# Set to true ONLY when Etherpad runs behind a trusted reverse proxy that sets
20+
# the X-Forwarded-* headers (Traefik, Nginx, Kubernetes Ingress, …). On a
21+
# directly-exposed instance keep it false so clients can't spoof their IP. If you
22+
# DO run behind a proxy you must set this to true, otherwise HTTPS detection
23+
# (secure cookies) and client-IP / rate-limiting will be wrong.
24+
DOCKER_COMPOSE_APP_TRUST_PROXY=false
25+
1626
DOCKER_COMPOSE_POSTGRES_DATABASE=db
1727
DOCKER_COMPOSE_POSTGRES_PASSWORD=etherpad-lite-password
1828
DOCKER_COMPOSE_POSTGRES_USER=etherpad-lite-user

.env.dev.default

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ DOCKER_COMPOSE_APP_DEV_ENV_DEFAULT_PAD_TEXT="Welcome to etherpad"
1313

1414
DOCKER_COMPOSE_APP_DEV_ADMIN_PASSWORD=
1515

16+
# docker-compose.dev.yml defaults this to true (dev convenience). Set to false if
17+
# you are not running the dev container behind a reverse proxy.
18+
DOCKER_COMPOSE_APP_DEV_ENV_TRUST_PROXY=true
19+
1620
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_DATABASE=db
1721
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_PASSWORD=etherpad-lite-password
1822
DOCKER_COMPOSE_POSTGRES_DEV_ENV_POSTGRES_USER=etherpad-lite-user

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,19 @@ services:
117117
- postgres
118118
environment:
119119
NODE_ENV: production
120-
ADMIN_PASSWORD: ${DOCKER_COMPOSE_APP_ADMIN_PASSWORD:-admin}
120+
ADMIN_PASSWORD: "${DOCKER_COMPOSE_APP_ADMIN_PASSWORD:?Set DOCKER_COMPOSE_APP_ADMIN_PASSWORD to a strong value}"
121121
DB_CHARSET: ${DOCKER_COMPOSE_APP_DB_CHARSET:-utf8mb4}
122122
DB_HOST: postgres
123123
DB_NAME: ${DOCKER_COMPOSE_POSTGRES_DATABASE:-etherpad}
124-
DB_PASS: ${DOCKER_COMPOSE_POSTGRES_PASSWORD:-admin}
124+
DB_PASS: "${DOCKER_COMPOSE_POSTGRES_PASSWORD:?Set DOCKER_COMPOSE_POSTGRES_PASSWORD to a strong value}"
125125
DB_PORT: ${DOCKER_COMPOSE_POSTGRES_PORT:-5432}
126126
DB_TYPE: "postgres"
127127
DB_USER: ${DOCKER_COMPOSE_POSTGRES_USER:-admin}
128128
# For now, the env var DEFAULT_PAD_TEXT cannot be unset or empty; it seems to be mandatory in the latest version of etherpad
129129
DEFAULT_PAD_TEXT: ${DOCKER_COMPOSE_APP_DEFAULT_PAD_TEXT:- }
130130
DISABLE_IP_LOGGING: ${DOCKER_COMPOSE_APP_DISABLE_IP_LOGGING:-false}
131131
SOFFICE: ${DOCKER_COMPOSE_APP_SOFFICE:-null}
132-
TRUST_PROXY: ${DOCKER_COMPOSE_APP_TRUST_PROXY:-true}
132+
TRUST_PROXY: ${DOCKER_COMPOSE_APP_TRUST_PROXY:-false}
133133
restart: always
134134
ports:
135135
- "${DOCKER_COMPOSE_APP_PORT_PUBLISHED:-9001}:${DOCKER_COMPOSE_APP_PORT_TARGET:-9001}"
@@ -138,7 +138,7 @@ services:
138138
image: postgres:15-alpine
139139
environment:
140140
POSTGRES_DB: ${DOCKER_COMPOSE_POSTGRES_DATABASE:-etherpad}
141-
POSTGRES_PASSWORD: ${DOCKER_COMPOSE_POSTGRES_PASSWORD:-admin}
141+
POSTGRES_PASSWORD: "${DOCKER_COMPOSE_POSTGRES_PASSWORD:?Set DOCKER_COMPOSE_POSTGRES_PASSWORD to a strong value}"
142142
POSTGRES_PORT: ${DOCKER_COMPOSE_POSTGRES_PORT:-5432}
143143
POSTGRES_USER: ${DOCKER_COMPOSE_POSTGRES_USER:-admin}
144144
PGDATA: /var/lib/postgresql/data/pgdata

doc/docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,19 +355,19 @@ services:
355355
- postgres
356356
environment:
357357
NODE_ENV: production
358-
ADMIN_PASSWORD: ${DOCKER_COMPOSE_APP_ADMIN_PASSWORD:-admin}
358+
ADMIN_PASSWORD: "${DOCKER_COMPOSE_APP_ADMIN_PASSWORD:?Set DOCKER_COMPOSE_APP_ADMIN_PASSWORD to a strong value}"
359359
DB_CHARSET: ${DOCKER_COMPOSE_APP_DB_CHARSET:-utf8mb4}
360360
DB_HOST: postgres
361361
DB_NAME: ${DOCKER_COMPOSE_POSTGRES_DATABASE:-etherpad}
362-
DB_PASS: ${DOCKER_COMPOSE_POSTGRES_PASSWORD:-admin}
362+
DB_PASS: "${DOCKER_COMPOSE_POSTGRES_PASSWORD:?Set DOCKER_COMPOSE_POSTGRES_PASSWORD to a strong value}"
363363
DB_PORT: ${DOCKER_COMPOSE_POSTGRES_PORT:-5432}
364364
DB_TYPE: "postgres"
365365
DB_USER: ${DOCKER_COMPOSE_POSTGRES_USER:-admin}
366366
# For now, the env var DEFAULT_PAD_TEXT cannot be unset or empty; it seems to be mandatory in the latest version of etherpad
367367
DEFAULT_PAD_TEXT: ${DOCKER_COMPOSE_APP_DEFAULT_PAD_TEXT:- }
368368
DISABLE_IP_LOGGING: ${DOCKER_COMPOSE_APP_DISABLE_IP_LOGGING:-false}
369369
SOFFICE: ${DOCKER_COMPOSE_APP_SOFFICE:-null}
370-
TRUST_PROXY: ${DOCKER_COMPOSE_APP_TRUST_PROXY:-true}
370+
TRUST_PROXY: ${DOCKER_COMPOSE_APP_TRUST_PROXY:-false}
371371
restart: always
372372
ports:
373373
- "${DOCKER_COMPOSE_APP_PORT_PUBLISHED:-9001}:${DOCKER_COMPOSE_APP_PORT_TARGET:-9001}"
@@ -376,7 +376,7 @@ services:
376376
image: postgres:15-alpine
377377
environment:
378378
POSTGRES_DB: ${DOCKER_COMPOSE_POSTGRES_DATABASE:-etherpad}
379-
POSTGRES_PASSWORD: ${DOCKER_COMPOSE_POSTGRES_PASSWORD:-admin}
379+
POSTGRES_PASSWORD: "${DOCKER_COMPOSE_POSTGRES_PASSWORD:?Set DOCKER_COMPOSE_POSTGRES_PASSWORD to a strong value}"
380380
POSTGRES_PORT: ${DOCKER_COMPOSE_POSTGRES_PORT:-5432}
381381
POSTGRES_USER: ${DOCKER_COMPOSE_POSTGRES_USER:-admin}
382382
PGDATA: /var/lib/postgresql/data/pgdata

0 commit comments

Comments
 (0)