{ "slug": "caddy", "kind": "compose", "metadata": { "name": "Caddy", "description": "Modern web server and reverse proxy with automatic HTTPS, modular Caddyfile config, and simple presets for static sites or upstream proxying.", "tags": [ "reverse-proxy", "web-server", "tls" ], "icon": { "provider": "selfhst", "id": "caddy", "color": "emerald" }, "draft": false, "version": { "name": "2.11.2-alpine", "source_dep_name": "docker.io/library/caddy", "source_dep_version": "2.11.2-alpine" } }, "variables": [ { "name": "general", "title": "General", "description": "Basic container naming and lifecycle settings.", "items": [ { "name": "service_name", "type": "str", "title": "Service Name", "required": false, "default": "caddy", "description": "Compose service name for the Caddy container.", "config": { "placeholder": "caddy" } }, { "name": "restart_policy", "type": "enum", "title": "Restart Policy", "required": true, "default": "unless-stopped", "description": "Restart policy applied to the container.", "config": { "options": [ "unless-stopped", "always", "on-failure", "no" ] } }, { "name": "container_timezone", "type": "str", "title": "Container Timezone", "required": false, "description": "Optional timezone passed through as the `TZ` environment variable.", "config": { "placeholder": "UTC" } } ] }, { "name": "network", "title": "Network", "description": "Port publishing and Docker network attachment.", "items": [ { "name": "ports_http", "type": "int", "title": "HTTP Port", "required": true, "default": 80, "description": "Host port published for HTTP traffic on container port 80.", "config": { "placeholder": "80" } }, { "name": "ports_https", "type": "int", "title": "HTTPS Port", "required": true, "default": 443, "description": "Host port published for HTTPS traffic on container port 443.", "config": { "placeholder": "443" } }, { "name": "docker_network", "type": "str", "title": "Docker Network", "required": true, "default": "caddy", "description": "Docker network that Caddy should join.", "config": { "placeholder": "caddy" } }, { "name": "docker_network_external", "type": "bool", "title": "External Network", "required": false, "default": false } ] }, { "name": "tls", "title": "TLS", "description": "Optional global ACME metadata for Caddy.", "toggle": "tls_enabled", "items": [ { "name": "tls_enabled", "type": "bool", "title": "TLS Settings", "required": false, "default": false }, { "name": "tls_email", "type": "str", "title": "ACME Email", "required": false, "description": "Email address used for ACME account registration.", "config": { "placeholder": "admin@example.com" }, "needs": [ "tls_enabled=true" ] } ] }, { "name": "webserver", "title": "Webserver", "description": "Optional generated static site config that serves files from `/srv`.", "toggle": "webserver_enabled", "items": [ { "name": "webserver_enabled", "type": "bool", "title": "Static Webserver", "required": false, "default": false, "description": "Render a basic static site config into `config/webserver.caddy`." }, { "name": "webserver_domain", "type": "str", "title": "Site Address", "required": true, "description": "Hostname or site address used by the generated static site config.", "config": { "placeholder": "example.com" }, "needs": [ "webserver_enabled=true" ] }, { "name": "webserver_content_type", "type": "enum", "title": "Site Content", "required": true, "default": "mount", "description": "Storage mode used for static site content mounted into `/srv`.", "config": { "options": [ "mount", "nfs" ] }, "needs": [ "webserver_enabled=true" ] }, { "name": "webserver_content_mount_path", "type": "str", "title": "Bind Mount Path", "required": true, "default": "./data", "description": "Host path used when site content is mounted directly from the filesystem.", "config": { "placeholder": "./data" }, "needs": [ "webserver_enabled=true", "webserver_content_type=mount" ] }, { "name": "webserver_content_nfs_server", "type": "str", "title": "NFS Server", "required": true, "default": "192.0.2.1", "description": "Hostname or IP address of the NFS server that stores site content.", "config": { "placeholder": "192.0.2.1" }, "needs": [ "webserver_enabled=true", "webserver_content_type=nfs" ] }, { "name": "webserver_content_nfs_path", "type": "str", "title": "NFS Export Path", "required": true, "default": "/path/to/export", "config": { "placeholder": "/path/to/export" }, "needs": [ "webserver_enabled=true", "webserver_content_type=nfs" ] }, { "name": "webserver_content_nfs_options", "type": "str", "title": "NFS Mount Options", "required": true, "default": "rw,nolock,soft", "config": { "placeholder": "rw,nolock,soft" }, "needs": [ "webserver_enabled=true", "webserver_content_type=nfs" ] }, { "name": "webserver_custom_config_content", "type": "str", "title": "Custom Config Content", "required": false, "description": "Optional additional Caddyfile directives inserted into the generated webserver site block when not empty.", "config": { "placeholder": "encode zstd gzip", "textarea": true }, "needs": [ "webserver_enabled=true" ] } ] }, { "name": "reverse-proxy", "title": "Reverse Proxy", "description": "Optional generated reverse proxy config for forwarding requests to an upstream service.", "toggle": "reverse_proxy_enabled", "items": [ { "name": "reverse_proxy_enabled", "type": "bool", "title": "Reverse Proxy", "required": false, "default": false, "description": "Append a reverse proxy site block to `config/webserver.caddy`." }, { "name": "reverse_proxy_domain", "type": "str", "title": "Site Address", "required": true, "description": "Hostname or site address used by the generated reverse proxy config.", "config": { "placeholder": "app.example.com" }, "needs": [ "reverse_proxy_enabled=true" ] }, { "name": "reverse_proxy_upstream", "type": "str", "title": "Upstream", "required": true, "description": "Upstream target used by the generated reverse proxy config, for example `app:3000`.", "config": { "placeholder": "app:3000" }, "needs": [ "reverse_proxy_enabled=true" ] }, { "name": "reverse_proxy_custom_config_content", "type": "str", "title": "Custom Config Content", "required": false, "description": "Optional additional `reverse_proxy` subdirectives inserted into the generated reverse proxy block when not empty.", "config": { "placeholder": "header_up X-Forwarded-Proto https", "textarea": true }, "needs": [ "reverse_proxy_enabled=true" ] } ] } ] }