Docker Installation (External Caddy)
In this setup, the NocoBase app container and the Caddy container run separately. You can start with Docker Installation (Built-in Nginx) and then switch the entry service to an external Caddy container.
When to use this setup
- You want to deploy NocoBase and the web server separately
- You want to simplify reverse proxy and HTTPS configuration with Caddy
- You want to expose only the proxy container to the public network
docker-compose.yml example
If you need the full image, replace latest-no-nginx with latest-full-no-nginx.
The 13000:80 mapping is only for convenient local testing, so it does not occupy the standard host ports directly. In production, you usually do not keep using 13000:80; instead, let the external Caddy container map directly to the host 80 and 443 ports.
Key points
NOCOBASE_EXTRACT_CLIENT_ASSETS=trueextracts client assets and generates proxy configNOCOBASE_PROXY_PROVIDER=caddytells the app to generate Caddy configNOCOBASE_PROXY_UPSTREAM_HOST=applets the Caddy container reach theappservice through the Compose network./storagemust be mounted into both theappandcaddycontainers so they can share proxy config, static assets, and uploaded files- The
caddycontainer should wait untilnocobase.caddyis generated, then link it to/etc/caddy/Caddyfilewithln -sf - The generated config forwards both the
/files/route underAPP_PUBLIC_PATHand the root-level/files/route to NocoBase for authenticated file previews and downloads - Expose only the Caddy container port to the host. For testing, you can start with
13000:80; in production, you usually expose the host80and443ports directly, while theappservice does not need to expose its port to the host
If you use a local host Caddy
If your Caddy is installed directly on the host instead of running in a Docker container, it is better to use a separate docker-compose.yml. In this setup, the app service must expose a host port directly, and the proxy-related environment variables should use host-side values.
You can use a docker-compose.yml like this:
In this variant:
NOCOBASE_PROXY_STORAGE_PATHshould be the absolute host path of yourstoragedirectoryNOCOBASE_PROXY_UPSTREAM_HOSTshould be127.0.0.1- The
appservice must keepports, so the local Caddy can reach the app through127.0.0.1:13000
After the app container starts, wait for the config file to be generated, then link it into the local Caddy config path:
If your host Caddy does not use /etc/caddy/Caddyfile, replace the link target with your own config path. Usually it is safer to keep nocobase.caddy as the main entry file instead of copying its content manually.
If you maintain Caddy yourself instead of using the generated config, make sure /files/* and the corresponding route under APP_PUBLIC_PATH are forwarded to NocoBase before the SPA fallback rules. See Caddy Reverse Proxy for a complete example.
Related links
- Docker Installation (Built-in Nginx) — Start with the single-container setup
- Caddy Static Resource Proxy — Learn more about the generated Caddy config

