caddy
Web server with automatic HTTPS
TLDR
Start web server
SYNOPSIS
caddy command [options]
DESCRIPTION
caddy is a modern web server with automatic HTTPS. It obtains and renews TLS certificates automatically via Let's Encrypt, provides HTTP/2 and HTTP/3 support, and uses a simple configuration format.
The server is designed for ease of use while maintaining high performance and security.
PARAMETERS
run
Start Caddy serverstart
Start Caddy in backgroundstop
Stop Caddy serverreload
Reload configurationvalidate
Validate Caddyfilefile-server
Quick file server modereverse-proxy
Quick reverse proxy mode--config file
Configuration file (default: Caddyfile)--adapter name
Config adapter (caddyfile, json)
CONFIGURATION
Caddyfile
Default configuration file in the current directory, defining sites, routes, and server behavior
CADDYFILE
Simple configuration:
root * /var/www/html
file_server
}
reverse_proxy localhost:8080
}
FEATURES
- Automatic HTTPS (Let's Encrypt)
- HTTP/2 and HTTP/3 support
- Reverse proxy
- Load balancing
- File server
- Template engine
- Dynamic configuration via API
- Plugin system
QUICK COMMANDS
caddy file-server
# Serve on specific port
caddy file-server --listen :8080
# Reverse proxy
caddy reverse-proxy --from :80 --to :8080
# Start with Caddyfile
caddy run
# Validate config
caddy validate --config Caddyfile
CAVEATS
Automatic HTTPS requires port 80/443 access. Let's Encrypt rate limits apply. Certificate storage needs disk space. Memory usage higher than nginx. Plugin ecosystem smaller than alternatives. Version 2.x not compatible with v1 configs.
HISTORY
Caddy was created by Matt Holt in 2015 as a web server prioritizing ease of use with automatic HTTPS, with version 2.0 rewritten in 2019.
