Reverse Proxy
Out of the box, Healdan listens on 127.0.0.1:8080, so only the machine running Docker can reach it, and only
over plain HTTP. To use it from other machines, put a reverse proxy in front of it that handles HTTPS.
Whichever proxy you use:
- Set
LOGICALDOC_PUBLIC_URLin.envto the public HTTPS address, so links and emails use it. - Forwarded headers. The proxy sends
X-Forwarded-ForandX-Forwarded-Proto. Tomcat trusts them only from private, loopback and link-local addresses, so Healdan sees HTTPS and each user’s real IP address only when the proxy reaches it from one of those. - WebSockets and large uploads. The proxy must forward WebSockets (Healdan pushes live updates at
/wk-event) and allow large uploads and long requests.
With Nginx Proxy Manager (NPM) on the same Docker host, NPM runs in its own container, so it reaches Healdan over a shared Docker network rather than a port on the host.
Find NPM’s network. Run
docker network ls. If NPM was started from a folder namednpm, the network isnpm_default. To confirm, rundocker inspect <npm-container> --format '{{json .NetworkSettings.Networks}}'.Edit
.envand restart. Set these, then rundocker compose up -d:.envCOMPOSE_FILE=compose.yaml:compose.proxy.yaml PROXY_NETWORK=npm_default LOGICALDOC_PUBLIC_URL=https://docs.example.orgThe app no longer publishes a port on the host. NPM reaches it on that network as
logicaldoc:8080.Add a proxy host in NPM (Hosts → Proxy Hosts → Add Proxy Host):
Details: Domain Names
docs.example.org, Schemehttp, Forward Hostnamelogicaldoc, Forward Port8080. Turn on Block Common Exploits and Websockets Support.SSL: request a new Let’s Encrypt certificate, and turn on Force SSL and HTTP/2 Support.
Advanced, under Custom Nginx Configuration, so large uploads and long conversions aren’t cut off:
client_max_body_size 0; proxy_request_buffering off; proxy_read_timeout 300s; proxy_send_timeout 300s;
Save, then open
https://docs.example.org.
| Symptom | Cause |
|---|---|
network npm_default declared as external, but could not be found | PROXY_NETWORK doesn’t match NPM’s network |
| 502 Bad Gateway | NPM isn’t on that network, or the app isn’t healthy. Check docker compose ps; docker network inspect <network> should list both containers |
| The app loads but live updates fail | Turn on Websockets Support |
| 413 Request Entity Too Large | Add the Advanced snippet |