← All tools

Caddyfile Generator

Reviewed 2026-10-22. Static, proxy, PHP and static + API modes; multiple upstreams, optional JSON logs and status-code error files. Redirects require certificates for both hosts. Generate a hostname site block. A static root selects file_server; otherwise reverse_proxy is used. SPA fallback applies only to static serving. Header lines use Name: value; Caddy tokens are quoted. Basic auth is not generated; create a password hash with caddy hash-password before configuring it yourself. Check paths, DNS and TLS before use; no server is run.

caddyfile-generatorLOCAL WORKSPACE

Enabling local controls…

Inputs and settings

Processed in this tab without uploading or storing inputs. Each text field is limited to 32 KiB and complete output to 1 MiB; additional format and model limits apply.

Results

Review the settings and run. Editing inputs clears old results.

Processing model and limits

Reviewed 2026-10-22. Static, proxy, PHP and static + API modes; multiple upstreams, optional JSON logs and status-code error files. Redirects require certificates for both hosts. Generate a hostname site block. A static root selects file_server; otherwise reverse_proxy is used. SPA fallback applies only to static serving. Header lines use Name: value; Caddy tokens are quoted. Basic auth is not generated; create a password hash with caddy hash-password before configuring it yourself. Check paths, DNS and TLS before use; no server is run.

Data and model checked: Caddyfile directives ↗Flavio Copes source tool (reviewed 2026-10-22) ↗

How to use this tool

Load the example, confirm field units and processing rules, then run locally. Editing any input clears the old result. Copy or download the complete output explicitly.

When not to use it

Reviewed 2026-10-22. Static, proxy, PHP and static + API modes; multiple upstreams, optional JSON logs and status-code error files. Redirects require certificates for both hosts. Generate a hostname site block. A static root selects file_server; otherwise reverse_proxy is used. SPA fallback applies only to static serving. Header lines use Name: value; Caddy tokens are quoted. Basic auth is not generated; create a password hash with caddy hash-password before configuring it yourself. Check paths, DNS and TLS before use; no server is run.