Create the first superadmin from DOCWELL_ADMIN_EMAIL on start

When DOCWELL_ADMIN_EMAIL and DOCWELL_ADMIN_PASSWORD are set (and
optionally DOCWELL_ADMIN_NAME), docwell-server creates that account as
superadmin on start while the instance has no accounts. Once any account
exists it changes nothing, so restarts never reset the password or a role
changed in the admin panel. Without them, the first sign-up still wins.

Pass the variables through every compose file, document them in the
.env examples and the configuration, access and quick-start guides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 5.5 committed 2026-11-13 22:32:29 +01:00
1 parent b9be8be156
commit 3c7403ddf9
27 files changed
+239 -3

No files matched your search

+7
View File
@@ -40,6 +40,13 @@ DOCWELL_SIGNUP_ENABLED=true
# Comma-separated email domains allowed to sign up (blank = any).
DOCWELL_SIGNUP_DOMAINS=
# Optional: the first account, created as superadmin on start while the
# instance has no accounts. Later starts leave it alone (change it in the
# admin panel). Password: 8 characters or more. Blank = first sign-up wins.
DOCWELL_ADMIN_EMAIL=
DOCWELL_ADMIN_PASSWORD=
DOCWELL_ADMIN_NAME=
# Largest attachment in MB (1-100).
DOCWELL_MAX_UPLOAD_MB=50
# Days to keep audit log entries. Blank = 365, 0 = forever.
+7
View File
@@ -40,6 +40,13 @@ DOCWELL_SIGNUP_ENABLED=true
# Comma-separated email domains allowed to sign up (blank = any).
DOCWELL_SIGNUP_DOMAINS=
# Optional: the first account, created as superadmin on start while the
# instance has no accounts. Later starts leave it alone (change it in the
# admin panel). Password: 8 characters or more. Blank = first sign-up wins.
DOCWELL_ADMIN_EMAIL=
DOCWELL_ADMIN_PASSWORD=
DOCWELL_ADMIN_NAME=
# Largest attachment in MB (1-100).
DOCWELL_MAX_UPLOAD_MB=50
# Days to keep audit log entries. Blank = 365, 0 = forever.
+7
View File
@@ -40,6 +40,13 @@ DOCWELL_SIGNUP_ENABLED=true
# Comma-separated email domains allowed to sign up (blank = any).
DOCWELL_SIGNUP_DOMAINS=
# Optional: the first account, created as superadmin on start while the
# instance has no accounts. Later starts leave it alone (change it in the
# admin panel). Password: 8 characters or more. Blank = first sign-up wins.
DOCWELL_ADMIN_EMAIL=
DOCWELL_ADMIN_PASSWORD=
DOCWELL_ADMIN_NAME=
# Largest attachment in MB (1-100).
DOCWELL_MAX_UPLOAD_MB=50
# Days to keep audit log entries. Blank = 365, 0 = forever.
@@ -40,6 +40,13 @@ DOCWELL_SIGNUP_ENABLED=true
# Comma-separated email domains allowed to sign up (blank = any).
DOCWELL_SIGNUP_DOMAINS=
# Optional: the first account, created as superadmin on start while the
# instance has no accounts. Later starts leave it alone (change it in the
# admin panel). Password: 8 characters or more. Blank = first sign-up wins.
DOCWELL_ADMIN_EMAIL=
DOCWELL_ADMIN_PASSWORD=
DOCWELL_ADMIN_NAME=
# Largest attachment in MB (1-100).
DOCWELL_MAX_UPLOAD_MB=50
# Days to keep audit log entries. Blank = 365, 0 = forever.
+4
View File
@@ -59,6 +59,10 @@ services:
DOCWELL_DRAWIO_URL: "${DOCWELL_DRAWIO_URL:-}"
# Defaults until a superadmin saves sign-up rules in the admin panel.
DOCWELL_SIGNUP_ENABLED: "${DOCWELL_SIGNUP_ENABLED:-true}"
# Optional: creates the first account as superadmin while there are no accounts.
DOCWELL_ADMIN_EMAIL: "${DOCWELL_ADMIN_EMAIL:-}"
DOCWELL_ADMIN_PASSWORD: "${DOCWELL_ADMIN_PASSWORD:-}"
DOCWELL_ADMIN_NAME: "${DOCWELL_ADMIN_NAME:-}"
DOCWELL_SIGNUP_DOMAINS: "${DOCWELL_SIGNUP_DOMAINS:-}"
DOCWELL_MAX_UPLOAD_MB: "${DOCWELL_MAX_UPLOAD_MB:-50}"
DOCWELL_AUDIT_RETENTION_DAYS: "${DOCWELL_AUDIT_RETENTION_DAYS:-}"
@@ -231,6 +231,10 @@ services:
DOCWELL_DRAWIO_URL: "${DOCWELL_DRAWIO_URL:-}"
# Defaults until a superadmin saves sign-up rules in the admin panel.
DOCWELL_SIGNUP_ENABLED: "${DOCWELL_SIGNUP_ENABLED:-true}"
# Optional: creates the first account as superadmin while there are no accounts.
DOCWELL_ADMIN_EMAIL: "${DOCWELL_ADMIN_EMAIL:-}"
DOCWELL_ADMIN_PASSWORD: "${DOCWELL_ADMIN_PASSWORD:-}"
DOCWELL_ADMIN_NAME: "${DOCWELL_ADMIN_NAME:-}"
DOCWELL_SIGNUP_DOMAINS: "${DOCWELL_SIGNUP_DOMAINS:-}"
DOCWELL_MAX_UPLOAD_MB: "${DOCWELL_MAX_UPLOAD_MB:-50}"
DOCWELL_AUDIT_RETENTION_DAYS: "${DOCWELL_AUDIT_RETENTION_DAYS:-}"
@@ -107,6 +107,10 @@ services:
DOCWELL_DRAWIO_URL: "${DOCWELL_DRAWIO_URL:-}"
# Defaults until a superadmin saves sign-up rules in the admin panel.
DOCWELL_SIGNUP_ENABLED: "${DOCWELL_SIGNUP_ENABLED:-true}"
# Optional: creates the first account as superadmin while there are no accounts.
DOCWELL_ADMIN_EMAIL: "${DOCWELL_ADMIN_EMAIL:-}"
DOCWELL_ADMIN_PASSWORD: "${DOCWELL_ADMIN_PASSWORD:-}"
DOCWELL_ADMIN_NAME: "${DOCWELL_ADMIN_NAME:-}"
DOCWELL_SIGNUP_DOMAINS: "${DOCWELL_SIGNUP_DOMAINS:-}"
DOCWELL_MAX_UPLOAD_MB: "${DOCWELL_MAX_UPLOAD_MB:-50}"
DOCWELL_AUDIT_RETENTION_DAYS: "${DOCWELL_AUDIT_RETENTION_DAYS:-}"
+4
View File
@@ -46,6 +46,10 @@ services:
DOCWELL_DRAWIO_URL: "${DOCWELL_DRAWIO_URL:-}"
# Defaults until a superadmin saves sign-up rules in the admin panel.
DOCWELL_SIGNUP_ENABLED: "${DOCWELL_SIGNUP_ENABLED:-true}"
# Optional: creates the first account as superadmin while there are no accounts.
DOCWELL_ADMIN_EMAIL: "${DOCWELL_ADMIN_EMAIL:-}"
DOCWELL_ADMIN_PASSWORD: "${DOCWELL_ADMIN_PASSWORD:-}"
DOCWELL_ADMIN_NAME: "${DOCWELL_ADMIN_NAME:-}"
DOCWELL_SIGNUP_DOMAINS: "${DOCWELL_SIGNUP_DOMAINS:-}"
DOCWELL_MAX_UPLOAD_MB: "${DOCWELL_MAX_UPLOAD_MB:-50}"
DOCWELL_AUDIT_RETENTION_DAYS: "${DOCWELL_AUDIT_RETENTION_DAYS:-}"
+4
View File
@@ -18,6 +18,10 @@ services:
# Links in auth emails point here.
DOCWELL_WEB_URL: ${DOCWELL_WEB_URL:-http://localhost:3000}
DOCWELL_SIGNUP_ENABLED: ${DOCWELL_SIGNUP_ENABLED:-true}
# Optional: creates the first account as superadmin while there are no accounts.
DOCWELL_ADMIN_EMAIL: ${DOCWELL_ADMIN_EMAIL:-}
DOCWELL_ADMIN_PASSWORD: ${DOCWELL_ADMIN_PASSWORD:-}
DOCWELL_ADMIN_NAME: ${DOCWELL_ADMIN_NAME:-}
DOCWELL_SIGNUP_DOMAINS: ${DOCWELL_SIGNUP_DOMAINS:-}
DOCWELL_MAX_UPLOAD_MB: ${DOCWELL_MAX_UPLOAD_MB:-50}
DOCWELL_SMTP_HOST: ${DOCWELL_SMTP_HOST:-}