Trusted Proxies#

Use Security → Trusted Proxies to configure which upstream proxies each managed server trusts to report a visitor’s IP address. This page is admin-only. The verified client IP is used for client-identity access lists, rate limits, forwarded headers and logging. Trust is configured separately for every server.

Trusted proxies determine visitor identity. To restrict which proxies may reach a website, use an access list with Connection source matching as well.

Trusted Proxies editor with a Cloudflare snapshot and CF-Connecting-IP header

Cloudflare snapshot preview in the local example instance. The ranges and header are unsaved.

Configure a server#

  1. Open Security → Trusted Proxies and click Edit beside the server.
  2. Choose a Source: Custom (manual), a provider, or Custom URL.
  3. Enter or load the Trusted proxy ranges, one IPv4 or IPv6 CIDR per line. A single proxy address needs a /32 (IPv4) or /128 (IPv6) suffix.
  4. Check the Client IP header. The default is X-Forwarded-For; Cloudflare uses CF-Connecting-IP.
  5. Review the ranges and click Save. Saving stores the policy and triggers configuration reconciliation for that server. Check the server’s configuration application status to confirm it has applied.

For a server that faces visitors directly, select Custom (manual), clear the ranges and save. Empty ranges trust no forwarded header. Invalid CIDRs and all-address ranges (0.0.0.0/0 and ::/0) are rejected. Trust only the proxies actually in front of the server; other servers and private networks do not inherit trust.

Provider presets and refresh#

Built-in providers are Cloudflare, AWS CloudFront, Google Cloud and Fastly. Selecting a provider alone does not load its ranges. Use Apply snapshot when a shipped snapshot is offered, or Refresh from source to fetch the provider’s published ranges. Providers without a snapshot require a refresh. A snapshot works offline but may be older than the provider’s list.

Both actions populate the editor with ranges, the provider’s default header and an as of date. Review them before saving. Refreshing is a preview: it does not change the saved policy until you click Save. Cancel discards the edit. A failed refresh leaves the saved policy in place.

There is no automatic refresh. Review provider changes and refresh manually; the as of date identifies the saved snapshot or fetch date.

Custom URL#

Choose Custom URL, enter an HTTPS URL and click Refresh from source. The endpoint must return a plain-text list with one CIDR per line; blank lines and # comments are supported. For example:

# Replace these documentation addresses with your proxy ranges.
192.0.2.10/32
2001:db8::10/128

The controller fetches the URL. Private/internal destinations and redirects to them are refused; redirects must remain HTTPS. A successful fetch fills the editor and defaults the header to X-Forwarded-For. Check the header and ranges before saving. Manual ranges do not need a public list endpoint.

Upgrades and management traffic#

POSTERNPROXY_CADDY_TRUSTED_PROXIES is deprecated. Existing environment policies are migrated into per-server database state once on upgrade. Later environment edits do not overwrite saved policies; use this page for subsequent changes. The environment value is still validated at startup.

This page configures Caddy’s website listeners. The controller’s management proxy trust remains the separate POSTERNPROXY_TRUSTED_PROXIES environment setting. See Security Hardening for forwarding-header handling and origin protection.

PosternProxyQuick start →