Security
A short checklist to keep your setup safe.
Ports
| Port | Used for | Open to the internet? |
|---|---|---|
80, 443 |
Your websites | Yes |
8080 |
CPM web UI | No. Use it on your LAN, through a VPN, or behind single sign-on such as TinyAuth |
2019 |
Caddy Admin API | Never. It has no password: anyone who reaches it controls Caddy |
9514 |
Logs from Caddy to CPM | Never. Keep it on your LAN or Docker network |
Do not port-forward 2019, also not when Caddy uses admin 0.0.0.0:2019.
CPM behind single sign-on
To reach CPM from outside without a VPN, put it behind an SSO such as TinyAuth, Authelia or Authentik:
- Add a proxy host for CPM, for example
cpm.example.comtohttp://<cpm-ip>:8080. - Protect it with the forward auth of your SSO, for example with a snippet on that proxy host.
- Keep port
8080itself closed to the internet. Only the proxy host on443is public.
The CPM login stays in place, so visitors need both the SSO login and a CPM account.
Checklist
- Ports
8080,2019and9514are not reachable from the internet. CPM is only reachable from outside through a VPN or SSO. -
CPM_LOG_ALLOWis set to the IP of Caddy when port9514is reachable from other machines (for exampleCPM_LOG_ALLOW=192.168.1.10). - Every user has a strong password. Only give the administrator role to people who need to manage users.
- The
/datavolume is backed up and only readable by you. It contains the database, the login secret and API tokens of plugins. - Dry-run is off in production, so visitors get real certificates.
- Use the upstream scheme https:// (self-signed) only for services you trust on your own network.
Good to know
- Passwords are stored hashed (bcrypt). Logins stay valid for 7 days.
- API tokens of plugins are also visible in the generated Caddyfile and in Audit Logs, so treat every CPM user as trusted.
- Every CPM user can manage hosts, files and settings. Only managing users is limited to administrators.
- If you put CPM itself behind a reverse proxy with HTTPS, make sure it sends
X-Forwarded-Proto: https, so CPM marks its cookies as secure.
Edit this page on GitHub · Loaded live from R0GGER/Caddy-Proxy-Manager