1Caddy(8)                                                              Caddy(8)
2
3
4

NAME

6       caddy -
7
8
9

SYNOPSIS

11       caddy [flags]
12
13
14

DESCRIPTION

16       Caddy is an extensible server platform written in Go.
17
18
19       At its core, Caddy merely manages configuration. Modules are plugged in
20       statically at compile-time to  provide  useful  functionality.  Caddy's
21       standard  distribution  includes common modules to serve HTTP, TLS, and
22       PKI applications, including the automation of certificates.
23
24
25       To run Caddy, use:
26
27
28              - 'caddy run' to run Caddy in the foreground (recommended).
29              - 'caddy start' to start Caddy in the background; only do this
30                if you will be keeping the terminal window open until you run
31                'caddy stop' to close the server.
32
33
34
35       When Caddy is started, it opens a locally-bound  administrative  socket
36       to  which  configuration  can  be  POSTed  via  a restful HTTP API (see
37       https://caddyserver.com/docs/api).
38
39
40       Caddy's native configuration format is JSON. However,  config  adapters
41       can be used to convert other config formats to JSON when Caddy receives
42       its configuration. The Caddyfile is a built-in config adapter  that  is
43       popular for hand-written configurations due to its straightforward syn‐
44       tax  (see  https://caddyserver.com/docs/caddyfile).  Many   third-party
45       adapters   are   available   (see  https://caddyserver.com/docs/config-
46       adapters).  Use 'caddy adapt' to see how a config translates to JSON.
47
48
49       For convenience, the CLI can act as an HTTP client to  give  Caddy  its
50       initial configuration for you. If a file named Caddyfile is in the cur‐
51       rent working directory, it will do this automatically.  Otherwise,  you
52       can use the --config flag to specify the path to a config file.
53
54
55       Some  special-purpose  subcommands  build and load a configuration file
56       for you directly from command line input; for example:
57
58
59              - caddy file-server
60              - caddy reverse-proxy
61              - caddy respond
62
63
64
65       These commands disable the administration endpoint because  their  con‐
66       figuration is specified solely on the command line.
67
68
69       In general, the most common way to run Caddy is simply:
70
71
72              $ caddy run
73
74
75
76       Or, with a configuration file:
77
78
79              $ caddy run --config caddy.json
80
81
82
83       If running interactively in a terminal, running Caddy in the background
84       may be more convenient:
85
86
87              $ caddy start
88              $ caddy stop
89
90
91
92       This allows you to run other commands while Caddy  stays  running.   Be
93       sure to stop Caddy before you close the terminal!
94
95
96       Depending  on  the  system,  Caddy  may  need permission to bind to low
97       ports. One way to do this on Linux is to use setcap:
98
99
100              $ sudo setcap cap_net_bind_service=+ep $(which caddy)
101
102
103
104       Remember to run that command again after replacing the binary.
105
106
107       See the Caddy website for tutorials, configuration  structure,  syntax,
108       and module documentation: https://caddyserver.com/docs/
109
110
111       Custom  Caddy  builds  are  available  on  the  Caddy download page at:
112       https://caddyserver.com/download
113
114
115       The xcaddy command can be used to build Caddy from source with or with‐
116       out additional plugins: https://github.com/caddyserver/xcaddy
117
118
119       Where  possible,  Caddy  should be installed using officially-supported
120       package installers: https://caddyserver.com/docs/install
121
122
123       Instructions for  running  Caddy  in  production  are  also  available:
124       https://caddyserver.com/docs/running
125
126
127

OPTIONS

129       -h, --help[=false]      help for caddy
130
131
132

EXAMPLE

134                $ caddy run
135                $ caddy run --config caddy.json
136                $ caddy reload --config caddy.json
137                $ caddy stop
138
139
140
141

SEE ALSO

143       caddy-adapt(8),  caddy-build-info(8),  caddy-completion(8), caddy-envi‐
144       ron(8),  caddy-file-server(8),  caddy-fmt(8),   caddy-hash-password(8),
145       caddy-list-modules(8),   caddy-manpage(8),  caddy-reload(8),  caddy-re‐
146       spond(8), caddy-reverse-proxy(8), caddy-run(8), caddy-start(8),  caddy-
147       stop(8),  caddy-trust(8),  caddy-untrust(8),  caddy-validate(8), caddy-
148       version(8)
149
150
151

HISTORY

153       15-Aug-2023 Auto generated by spf13/cobra
154
155
156
157Auto generated by spf13/cobra      Aug 2023                           Caddy(8)
Impressum