Caddy(8) Caddy(8)

# [NAME](#NAME)

caddy-validate - Tests whether a configuration file is valid

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

Loads and provisions the provided config, but does not start running it. This reveals any errors with the configuration through the loading and provisioning stages.

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

# [OPTIONS](#OPTIONS)

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

**-c**, **--config**="" Input configuration file

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

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

# [SEE ALSO](#SEE_ALSO)

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

# [HISTORY](#HISTORY)

4-Nov-2026 Auto generated by spf13/cobra

Nov 2026 Auto generated by spf13/cobra

---

Document: caddy-validate(8) from caddy 2.11.8-r0 (Chainguard OS)
Source: https://github.com/caddyserver/caddy
