From ArchWiki
Jump to navigation Jump to search

Caddy is a HTTP/2 capable web server with automatic HTTPS.


Install the caddy2AUR package.


Caddy 2 supports various configuration formats, see config adapters (caddyfile, nginx, json, yaml, toml, among others).

Most commonly, Caddy is configured using a plain text file called Caddyfile. The Caddyfile starts with (an optional global options block and) an address of the site to be served, and is followed by a number of directives.

A simple Caddyfile hosting the site at localhost:2020:

  http_port 2020



$ caddy help
$ caddy help run

Caddy can be run by any user from the page's directory, and the Caddyfile should be in the same directory:

$ caddy run

Alternatively you may specify a custom Caddyfile:

$ caddy run -config ../path/to/Caddyfile

See also