DevFlow logoDevFlow
Nginx ConfigCaddyfile (Automatic HTTPS)Automated Breaking Change Check

Migrate Nginx Server Blocks to Caddyfile

Convert Nginx reverse proxy blocks, SSL certificate setups, and header directives into concise, automatic-HTTPS Caddyfile rules.

From: Nginx Config
To: Caddyfile (Automatic HTTPS)
Source (Nginx Config)
332 chars
Migrated Target (Caddyfile (Automatic HTTPS))
1ms381 chars
// 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)

Automated Migration Check
info

Targeting automated migration for nginx-to-caddyfile. Review exported syntax for project-specific configurations.

Resolution: Inspect generated config and run test suite to verify equivalence.

How to Migrate from Nginx Config to Caddyfile (Automatic HTTPS)

  1. 1

    Paste your Nginx configuration server block.

  2. 2

    Extract domains, proxy upstreams, and header directives.

  3. 3

    The migrator collapses 20+ lines of boilerplate into a clean 4-line Caddyfile with automated Let’s Encrypt certificates.

Validate Caddyfile in CI

.github/workflows/caddy-validate.yml
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 Caddyfile

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.
Was this guide / tool helpful to you?