Caddy(8) Caddy(8)

# [NAME](#NAME)

caddy-adapt - Adapts a configuration to Caddy's native JSON

# [SYNOPSIS](#SYNOPSIS)

**caddy adapt --config \[--adapter ] \[--pretty] \[--validate] \[--envfile ] \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Adapts a configuration to Caddy's native JSON format and writes the output to stdout, along with any warnings to stderr.

If --pretty is specified, the output will be formatted with indentation for human readability.

If --validate is used, the adapted config will be checked for validity. If the config is invalid, an error will be printed to stderr and a non- zero exit status will be returned.

If --envfile is specified, an environment file with environment variables in the KEY=VALUE format will be loaded into the Caddy process.

If you wish to use stdin instead of a regular file, use - as the path.

# [OPTIONS](#OPTIONS)

**-a**, **--adapter**="caddyfile" Name of config adapter

**-c**, **--config**="" Configuration file to adapt (required)

**--envfile**=\[] Environment file(s) to load

**-h**, **--help**\[=false] help for adapt

**-p**, **--pretty**\[=false] Format the output for human readability

**--validate**\[=false] Validate the output

# [SEE ALSO](#SEE_ALSO)

[**caddy(8)**](/man/enterprise-packages/caddy-man/caddy.8)

# [HISTORY](#HISTORY)

11-Sep-2026 Auto generated by spf13/cobra

Sep 2026 Auto generated by spf13/cobra

---

Document: caddy-adapt(8) from caddy-man 2.11.4-r12 (Chainguard OS)
Source: https://github.com/caddyserver/caddy
