Caddy(8)
π NAME π
okay bestie, meet caddy β an extensible server platform β¨
π¦ SYNOPSIS π¦
caddy [flags]
π DESCRIPTION π
Caddy is an extensible server platform written in Go. no cap.
At its core, Caddy merely manages configuration. Modules are plugged in statically at compile-time to provide useful functionality. Caddy's standard distribution includes common modules to serve HTTP, TLS, and PKI applications, including the automation of certificates. the way that it justβ¦ handles certs for you? iconic behavior fr fr π
To run Caddy, use:
caddy runto run Caddy in the foreground (recommended β¨ honestly just do this one).caddy startto start Caddy in the background; only do this if you will be keeping the terminal window open until you runcaddy stopto close the server.
When Caddy is started, it opens a locally-bound administrative socket to which configuration can be POSTed via a restful HTTP API (see https://caddyserver.com/docs/api). yes bestie, it's got an API. main character energy.
Caddy's native configuration format is JSON. However, config adapters can be used to convert other config formats to JSON when Caddy receives its configuration. The Caddyfile is a built-in config adapter that is popular for hand-written configurations due to its straightforward syntax (see https://caddyserver.com/docs/caddyfile). Many third-party adapters are available (see https://caddyserver.com/docs/config-adapters). Use caddy adapt to see how a config translates to JSON. π₯
For convenience, the CLI can act as an HTTP client to give Caddy its initial configuration for you. If a file named Caddyfile is in the current working directory, it will do this automatically. Otherwise, you can use the --config flag to specify the path to a config file.
Some special-purpose subcommands build and load a configuration file for you directly from command line input; for example:
caddy file-servercaddy reverse-proxycaddy respond
These commands disable the administration endpoint because their configuration is specified solely on the command line. (iykyk π«Ά)
In general, the most common way to run Caddy is simply:
$ caddy run
Or, with a configuration file:
$ caddy run --config caddy.json
If running interactively in a terminal, running Caddy in the background may be more convenient:
$ caddy start
...
$ caddy stop
This allows you to run other commands while Caddy stays running. Be sure to stop Caddy before you close the terminal! π¨ like genuinely, don't just ghost it.
Depending on the system, Caddy may need permission to bind to low ports. One way to do this on Linux is to use setcap:
$ sudo setcap cap_net_bind_service=+ep $(which caddy)
Remember to run that command again after replacing the binary. β οΈ every. single. time. bestie.
See the Caddy website for tutorials, configuration structure, syntax, and module documentation: https://caddyserver.com/docs/ πΈ
Custom Caddy builds are available on the Caddy download page at: https://caddyserver.com/download
The xcaddy command can be used to build Caddy from source with or without additional plugins: https://github.com/caddyserver/xcaddy
Where possible, Caddy should be installed using officially-supported package installers: https://caddyserver.com/docs/install
Instructions for running Caddy in production are also available: https://caddyserver.com/docs/running
β¨ OPTIONS β¨
-h,--help[=false]β help for caddy π (that's it, that's the whole options list, she's a minimal queen)
π EXAMPLE π
$ caddy run
$ caddy run --config caddy.json
$ caddy reload --config caddy.json
$ caddy stop
π SEE ALSO π
caddy-adapt(8)caddy-build-info(8)caddy-completion(8)caddy-environ(8)caddy-file-server(8)caddy-fmt(8)caddy-hash-password(8)caddy-list-modules(8)caddy-manpage(8)caddy-reload(8)caddy-respond(8)caddy-reverse-proxy(8)caddy-run(8)caddy-start(8)caddy-stop(8)caddy-storage(8)caddy-trust(8)caddy-untrust(8)caddy-validate(8)caddy-version(8)
π HISTORY π
1-Jan-0001 Auto generated by spf13/cobra
okay that's the whole vibe check, bestie π«Ά this page is from the Caddy(8) manual β Auto generated by spf13/cobra, dated Jan 0001 π go build something slay β¨ππ¦
π¦ where this page comes from
- ubuntu stonking: caddy 2.11.4-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms