Skip to main content

Caddy

Set TRUST_PROXY=true

Add TRUST_PROXY=true to your .env or docker-compose.yml, and set BASE_URL to the public address. Without it, PLANKA sees the address of the proxy for every user: they all share one sign-in limit, and Fail2ban would ban the proxy. Make sure PLANKA cannot be reached without going through the proxy.

The samples use the port of a manual installation, 1337. The stock docker-compose.yml publishes port 3000 instead.

Use this guide to configure Caddy as a reverse proxy for PLANKA.

1. Edit the Caddy Configuration​

Open the Caddyfile in your preferred editor:

sudo nano /etc/caddy/Caddyfile

2. Add Your Configuration​

Replace placeholders with your actual email and domain:

{
email your@email.tld
}

your.domain.tld {
reverse_proxy http://localhost:1337 {
header_up X-Forwarded-Proto {scheme}
}
}

Note: The header_up X-Forwarded-Proto {scheme} directive is strictly required if you rely on secure cookies and session features. It ensures the backend Node.js server correctly identifies the original request as HTTPS.

This config enables automatic HTTPS via Let's Encrypt.

3. Update PLANKA's Base URL​

Make sure the BASE_URL in your .env file or docker-compose.yml matches the domain you've configured:

BASE_URL=https://your.domain.tld

After saving changes, restart the Caddy service to apply the new configuration:

sudo systemctl restart caddy

Now your PLANKA instance should be securely accessible at https://your.domain.tld.