Reverse Proxy Setup
Front Wealthfolio with Nginx, Caddy, Traefik, or Nginx Proxy Manager for HTTPS, custom domains, and integration with your existing edge.
For anything beyond LAN access, put Wealthfolio behind a reverse proxy.
The container speaks plain HTTP on port 8088. Your proxy terminates
TLS and adds the niceties (HSTS, gzip, access logs).
Before you start
Whichever proxy you use, two settings on Wealthfolio matter:
WF_CORS_ALLOW_ORIGINSmust match the public URL you’ll access the app from. Scheme, host, and port all have to match exactly.WF_LISTEN_ADDR=0.0.0.0:8088so the proxy can reach the container. (Already the default in our compose / Unraid templates.)
If your proxy handles authentication (Authentik, Authelia, Cloudflare
Access, Coolify built-in), set WF_AUTH_REQUIRED=false and clear
WF_AUTH_PASSWORD_HASH.
Caddy
Caddy is the simplest path: automatic HTTPS via Let’s Encrypt, zero config beyond the domain.
wealthfolio.example.com {
reverse_proxy localhost:8088
}Or, if Wealthfolio is on the same Docker network as Caddy:
wealthfolio.example.com {
reverse_proxy wealthfolio:8088
}Then in your Wealthfolio env: WF_CORS_ALLOW_ORIGINS=https://wealthfolio.example.com.
Nginx
server {
listen 443 ssl http2;
server_name wealthfolio.example.com;
ssl_certificate /etc/letsencrypt/live/wealthfolio.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wealthfolio.example.com/privkey.pem;
# Optional but recommended
add_header Strict-Transport-Security "max-age=31536000" always;
client_max_body_size 25M;
location / {
proxy_pass http://localhost:8088;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 60s;
}
}
server {
listen 80;
server_name wealthfolio.example.com;
return 301 https://$host$request_uri;
}Traefik (Docker labels)
Add labels to your Wealthfolio container in compose.yml (or
compose.override.yml):
services:
wealthfolio:
image: afadil/wealthfolio:latest
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.wealthfolio.rule=Host(`wealthfolio.example.com`)
- traefik.http.routers.wealthfolio.entrypoints=websecure
- traefik.http.routers.wealthfolio.tls.certresolver=letsencrypt
- traefik.http.services.wealthfolio.loadbalancer.server.port=8088
# Optional HTTP→HTTPS redirect
- traefik.http.routers.wealthfolio-http.rule=Host(`wealthfolio.example.com`)
- traefik.http.routers.wealthfolio-http.entrypoints=web
- traefik.http.routers.wealthfolio-http.middlewares=https-redirect
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
networks:
traefik:
external: trueNginx Proxy Manager (NPM)
NPM’s UI flow:
- Hosts → Proxy Hosts → Add Proxy Host.
- Domain Names:
wealthfolio.example.com - Forward Hostname / IP:
wealthfolio(Docker network) or your LAN IP - Forward Port:
8088 - ✅ Block Common Exploits
- ✅ Websockets Support
- SSL tab: request a new Let’s Encrypt cert, enable Force SSL + HTTP/2.
- Save.
SWAG (LinuxServer.io)
If you run SWAG, drop a config file at
/config/nginx/proxy-confs/wealthfolio.subdomain.conf:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name wealthfolio.*;
include /config/nginx/ssl.conf;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app wealthfolio;
set $upstream_port 8088;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}Then make sure SWAG and the Wealthfolio container share a Docker network.
Cloudflare Tunnel
If you don’t want to open ports at all, use Cloudflare Tunnel
(cloudflared):
- Install
cloudflaredon the host running Wealthfolio. cloudflared tunnel create wealthfolio- Map a public hostname to
http://localhost:8088.
Set WF_CORS_ALLOW_ORIGINS=https://wealthfolio.example.com. Cloudflare
handles TLS at the edge.
Cloudflare Tunnel proxies through Cloudflare’s network. If you’ve
enabled Cloudflare Access in front, set WF_AUTH_REQUIRED=false and
rely on Access. Otherwise you’ll have two auth layers and possible
cookie conflicts.
Common gotchas
| Issue | Fix |
|---|---|
502 Bad Gateway | Container isn’t reachable from the proxy. Check the upstream host/port and that they share a network. |
CORS error in browser console | WF_CORS_ALLOW_ORIGINS must match the URL in your address bar exactly. Add the scheme (https://). |
| Session lost after a few clicks | Proxy isn’t forwarding cookies properly. Make sure proxy_set_header Host $host (or equivalent) is set. |
| Login screen loops | Mixed content: proxy serves HTTPS but WF_CORS_ALLOW_ORIGINS is still http://.... Update both. |
After the proxy is up
If you set up authentication-at-the-edge (Authentik, Authelia, etc.), disable Wealthfolio’s built-in auth so users only log in once:
WF_AUTH_REQUIRED=false
WF_AUTH_PASSWORD_HASH=