Config Adapters

    For example, a config adapter could turn your NGINX config into Caddy JSON.

    The following config adapters are currently available (some are third-party projects):

    You can use a config adapter by specifying it on the command line by using the flag on most subcommands that take a config:

    Or via the API at the endpoint:

    Not all config languages are 100% compatible with Caddy; some features or behaviors simply don’t translate well or are not yet programmed into the adapter or Caddy itself.

    Some adapters do a 1-1 translation, like YAML->JSON or TOML->JSON. Others are designed specifically for Caddy, like the Caddyfile. Generally, these adapters will always work.

    Config adapters can output the resulting JSON, warnings, and errors. JSON results if no errors occur. Errors occur when something is wrong with the input (for example, syntax errors). Warnings are emitted when something is wrong with the adaptation but which is not necessarily fatal (for example, feature not supported). Caution is advised if using configs that were adapted with warnings.