caddy
Options
Section titled “Options”services.caddy.enable
Section titled “services.caddy.enable”Whether to enable Caddy web server.
Type: boolean
Default:
falseExample:
trueDeclared by:
services.caddy.package
Section titled “services.caddy.package”Caddy package to use.
Type: package
Default:
pkgs.caddyDeclared by:
services.caddy.adapter
Section titled “services.caddy.adapter”Name of the config adapter to use. See https://caddyserver.com/docs/config-adapters for the full list.
Type: string
Default:
"caddyfile"Example:
"nginx"Declared by:
services.caddy.ca
Section titled “services.caddy.ca”Certificate authority ACME server. The default (Let’s Encrypt production server) should be fine for most people. Set it to null if you don’t want to include any authority (or if you want to write a more fine-graned configuration manually).
Type: null or string
Default:
"https://acme-v02.api.letsencrypt.org/directory"Example:
"https://acme-staging-v02.api.letsencrypt.org/directory"Declared by:
services.caddy.config
Section titled “services.caddy.config”Verbatim Caddyfile to use.
Refer to https://caddyserver.com/docs/caddyfile for more information.
Caddy v2 supports multiple config formats via adapters (see services.caddy.adapter).
Type: strings concatenated with “\n”
Default:
""Example:
'' # Global options block { debug }
# Site block example.com { encode gzip log root /srv/http }''Declared by:
services.caddy.dataDir
Section titled “services.caddy.dataDir”The data directory, for storing certificates. Before 17.09, this would create a .caddy directory. With 17.09 the contents of the .caddy directory are in the specified data directory instead. Caddy v2 replaced CADDYPATH with XDG directories. See https://caddyserver.com/docs/conventions#file-locations.
Type: absolute path
Default:
"${config.env.DEVENV_STATE}/caddy"Declared by:
services.caddy.email
Section titled “services.caddy.email”Email address (for Let’s Encrypt certificate).
Type: string
Default:
""Declared by:
services.caddy.resume
Section titled “services.caddy.resume”Use saved config, if any (and prefer over configuration passed with caddy.config).
Type: boolean
Default:
falseDeclared by:
services.caddy.virtualHosts
Section titled “services.caddy.virtualHosts”Declarative vhost config.
Type: attribute set of (submodule)
Default:
{ }Example:
{ "hydra.example.com" = { serverAliases = [ "www.hydra.example.com" ]; extraConfig = '''' encode gzip log root /srv/http ''''; };};Declared by:
services.caddy.virtualHosts.<name>.extraConfig
Section titled “services.caddy.virtualHosts.<name>.extraConfig”These lines go into the vhost verbatim.
Type: strings concatenated with “\n”
Default:
""Declared by:
services.caddy.virtualHosts.<name>.serverAliases
Section titled “services.caddy.virtualHosts.<name>.serverAliases”Additional names of virtual hosts served by this virtual host configuration.
Type: list of string
Default:
[ ]Example:
[ "www.example.org" "example.org"]Declared by:

