Use the certs/ fallback in every environment

TLS no longer depends on NODE_ENV: the TLS_* variables win, else certs/
is used whenever it exists (the container's /app/certs mount lands there
too), and TLS_DISABLED=1 is the only way to serve plain HTTP with a
certificate present. The plain-HTTP redirect listener now starts whenever
TLS is on, not only in development, and HTTP_REDIRECT_PORT replaces
DEV_HTTP_PORT. The installer writes TLS_DISABLED=1 for --no-https, and the
health check follows the same rule.
This commit is contained in:
2026-10-20 10:29:37 +01:00
parent 8c20c9a7ed
commit 459eebf73d
10 changed files with 222 additions and 63 deletions
+5 -4
View File
@@ -17,14 +17,15 @@ DEV_EMAIL_RECIPIENT=
ENCRYPTION_KEY=
ENCRYPTION_SALT=
# HTTPS (optional in development; see README). Generate files with
# `bun run gen:certs` and point these at them. The installer sets them on a
# real install. Leave all three empty to serve plain HTTP.
# HTTPS (see README). Generate files with `bun run gen:certs`; when these
# are empty the server uses certs/ if it exists, in every environment. Set
# TLS_DISABLED=1 to serve plain HTTP even when a certificate is there.
TLS_CERT_FILE=
TLS_KEY_FILE=
TLS_CA_FILE=
TLS_DISABLED=
# Plain-HTTP port that redirects to the HTTPS one (default PORT + 1).
DEV_HTTP_PORT=
HTTP_REDIRECT_PORT=
# Web Push: generated into Settings > Environment on first start. Set a
# fixed pair here only if you want to keep one across installs.