Caddy is organized into three main components: a
command, the core
library, and configuration modules. The command is the extensible interface by which the
program is executed; it can also load
configuration files, run common modes, manage installed plugins, and offer relevant utility functions. The core library has APIs for loading, unloading, and
managing configuration; but it does nothing particularly useful on its own. Most of Caddy's functionality is provided by modules, which are plugins that extend Caddy's configuration structure; for example, the HTTP server is a module. Caddy modules implement various long-running services,
web standards, and other useful features. Caddy's input is a JSON configuration document which is received through an open socket via a RESTful HTTP API. Config adapters may be used to convert other configuration formats to
JSON. Existing adapters include the Caddyfile, which has first-class support in the command line; and
YAML,
TOML,
Nginx, and several other formats. All these modules are provisioned during the config load phase. using the xcaddy command line tool, or by manually compiling a custom build. == HTTP server ==