Skip to content
Menu

Reverse Proxy (HTTPS & Tailscale)

Florabase binds its frontend container strictly to 127.0.0.1:8080 and requires an exact https:// origin in FLORABASE_CANONICAL_ORIGIN. Expose it either through a reverse proxy on the host (Caddy, Nginx, Traefik, Nginx Proxy Manager, Synology DSM) or privately over Tailscale Serve.

Your reverse proxy must:

  1. Terminate TLS for the exact hostname in FLORABASE_CANONICAL_ORIGIN at the root path / (not a subpath).
  2. Forward traffic to http://127.0.0.1:8080 (or the host loopback port you mapped).
  3. Pass the original Host header and replace client-supplied forwarding headers.
  4. Allow request bodies of at least 32 MiB for high-resolution collection photos.
  5. Pass through the baseline security headers emitted by florabase-frontend.

Caddy obtains and renews TLS certificates automatically and does not enforce a small default body cap:

Caddyfile
florabase.example.com {
reverse_proxy 127.0.0.1:8080
}
server {
listen 80;
listen [::]:80;
server_name florabase.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name florabase.example.com;
ssl_certificate /etc/ssl/florabase/fullchain.pem;
ssl_certificate_key /etc/ssl/florabase/privkey.pem;
client_max_body_size 32m;
# Enable HSTS once HTTPS works reliably on all your devices:
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Forwarded "";
}
}

Attach the frontend service to your Traefik external proxy network in a local Compose override (keeping db and backend isolated on Florabase’s default network):

services:
frontend:
networks:
- default
- traefik_proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.florabase.rule=Host(`florabase.example.com`)"
- "traefik.http.routers.florabase.entrypoints=websecure"
- "traefik.http.routers.florabase.tls.certresolver=letsencrypt"
- "traefik.http.services.florabase.loadbalancer.server.port=8080"

Create a Proxy Host pointing to http://<docker-host-loopback-or-frontend-service>:8080 with Force SSL enabled, then open the Advanced → Custom Nginx Configuration tab and add:

client_max_body_size 32m;

Tailscale Serve (private HTTPS without opening ports)

Section titled “Tailscale Serve (private HTTPS without opening ports)”

For private access without managing public DNS or port forwarding, run Tailscale on the Docker host with MagicDNS and HTTPS certificates enabled. Set FLORABASE_CANONICAL_ORIGIN in compose.yaml to https://<device>.<tailnet>.ts.net, keep Funnel disabled, and run:

Terminal window
tailscale serve --bg --https=443 http://127.0.0.1:8080
tailscale serve status

Verify that tailscale serve status shows your exact HTTPS origin targeting http://127.0.0.1:8080, then test sign-in and a photo upload from another device on your tailnet (and re-test after a host reboot).

Confirm the stack responds through your HTTPS origin:

Terminal window
curl --fail --show-error https://florabase.example.com/api/v1/ready
  • Check that Container Manager meets the baseline (Docker Engine 24.0.2+ and Compose 2.20.1+).
  • Run the one-time folder setup inside a local Btrfs or ext4 shared folder (such as /volume1/docker/florabase/data and /volume1/docker/florabase/backup). Keep those folders out of SMB/NFS exports and avoid recursive DSM ACL or ownership resets on them.
  • Configure HTTPS with either Tailscale Serve or DSM Control Panel → Login Portal → Reverse Proxy (set custom max body size ≥ 32 MiB and forward to http://127.0.0.1:8080).
  • Backups, isolated restores, and offline password resets require SSH access with bash and docker compose.

Once HTTPS is live, browsers can also install Florabase as an online-only Progressive Web App (see Labels, Media & Data).