Configuration
Select a template to pre-fill common settings.
Separate multiple domains with commas.
Used for Let's Encrypt notifications.
Caddyfile Preview
LiveAbout Caddyfile Generator
The Caddyfile Generator is a powerful, free online tool designed to help developers and system administrators create configuration files for the Caddy Web Server. Whether you are setting up a simple static site, a complex reverse proxy, or a WordPress installation, this tool simplifies the process by providing a visual interface for common directives.
Caddy is known for its simplicity and automatic HTTPS. However, remembering the exact syntax for every directive can be challenging. This tool bridges that gap, ensuring your configuration is syntactically correct and optimized for performance.
How to Use This Tool
- Select a Recipe: Choose your project type (e.g., Static Site, Reverse Proxy) to pre-load standard settings.
- Enter Domain: Input your domain name(s). Use
localhostfor local development. - Configure Paths: Set your site root or upstream proxy address depending on your recipe.
- Toggle Features: Enable compression, logging, or security headers with a single click.
- Export: Copy the code to your clipboard or download the
Caddyfiledirectly.
Tips for Caddy Users
- Automatic HTTPS: Caddy automatically provisions TLS certificates from Let's Encrypt. Ensure your domain's DNS records point to your server before starting Caddy.
- Formatting: Use the
caddy fmtcommand in your terminal to automatically format your Caddyfile if you make manual edits later. - Reloading: You don't need to stop the server to apply changes. Run
caddy reloadfor zero-downtime configuration updates.
Frequently Asked Questions
What is a Caddyfile?
A Caddyfile is the human-readable configuration file for Caddy. It's designed to be easy to type and read, unlike more verbose configs like Nginx or Apache.
Can I use this for production?
Yes! The configurations generated here use standard, production-ready directives. However, always review the config to ensure it meets your specific security requirements.
How do I run Caddy with this file?
Place the downloaded file (named simply
Caddyfile) in the same folder as your Caddy executable and run caddy run.Configuration copied to clipboard!
Read Also: