Migrate Nginx Server Blocks to Caddyfile
Convert Nginx reverse proxy blocks, SSL certificate setups, and header directives into concise, automatic-HTTPS Caddyfile rules.
// Migrated configuration for nginx-to-caddyfile
server {
listen 80;
server_name api.example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Detected Breaking Changes & Semantic Shifts (1)
Targeting automated migration for nginx-to-caddyfile. Review exported syntax for project-specific configurations.
How to Migrate from Nginx Config to Caddyfile (Automatic HTTPS)
- 1
Paste your Nginx configuration server block.
- 2
Extract domains, proxy upstreams, and header directives.
- 3
The migrator collapses 20+ lines of boilerplate into a clean 4-line Caddyfile with automated Let’s Encrypt certificates.
Validate Caddyfile in CI
name: Caddyfile Validate
on: [push]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
docker run --rm -v $(pwd)/Caddyfile:/etc/caddy/Caddyfile caddy:latest caddy validate --config /etc/caddy/Caddyfile
Run Migration via Terminal CLI
Perform identical migration routines across entire directories or repositories in your local terminal:
devflow migrate nginx-to-caddy -i nginx.conf -o CaddyfileRelated DevOps & Stack Migrators
Associated DevFlow Tools
Nginx Config Generator
Generate Nginx, Caddy & Apache reverse proxy configs with SSL & presets
Nginx Config Validator
Validate Nginx configuration syntax, reverse proxy rules, and SSL security
SSL/TLS Certificate Decoder
Decode PEM & X.509 certificates offline or inspect live SSL/TLS certificate chains with expiration countdowns and health checks.
Frequently Asked Questions
- Does Caddy support HTTP/3 and WebSockets by default?
- Yes, Caddy includes native zero-config support for HTTP/3, WebSockets, and transparent reverse proxy headers.