🔒

Caddyfile Generator

Verified

by Community

Create Caddyfile configurations for reverse proxying, static files, redirects, and more with automatic HTTPS.

caddyconfigproxyhttpsserver

Caddyfile Generator Skill

Generate Caddy configs.

Reverse Proxy

example.com {
    reverse_proxy localhost:{port}
}

Multiple Sites

example.com {
    reverse_proxy localhost:3000
}

api.example.com {
    reverse_proxy localhost:8080
}

Static Files

example.com {
    root * /var/www/html
    file_server
}

With Headers

example.com {
    reverse_proxy localhost:3000
    header {
        Strict-Transport-Security "max-age=31536000"
        X-Content-Type-Options "nosniff"
    }
}

Notes

  • Caddy auto-provisions HTTPS via Let's Encrypt
  • Validate with caddy validate --config Caddyfile
  • Reload with caddy reload