nb proxy caddy

nb proxy caddy is the command-group entry for the Caddy provider.

If you already have a domain, want to get HTTPS running quickly, and do not want to maintain too many TLS details yourself, this is usually the place to start. It handles two things:

  • choosing how Caddy runs, which means local or docker
  • generating, starting, reloading, and inspecting the Caddy entrypoint for CLI-managed envs

Usage

nb proxy caddy <command>

Subcommands

CommandDescription
nb proxy caddy useSwitch the Caddy driver
nb proxy caddy currentPrint the current driver
nb proxy caddy generateGenerate or refresh the Caddy config for one env
nb proxy caddy startStart the Caddy proxy
nb proxy caddy restartRestart the Caddy proxy
nb proxy caddy reloadReload the Caddy config
nb proxy caddy stopStop the Caddy proxy
nb proxy caddy statusShow Caddy runtime status
nb proxy caddy infoShow driver, config paths, and runtime info

Notes

  • The current driver is stored in proxy.caddy-driver
  • The default driver is local
  • The local driver uses the executable pointed to by bin.caddy, whose default value is caddy
  • The Docker driver uses caddy:latest
  • The default Docker container name is <docker.container-prefix>-caddy-proxy
  • The Docker driver mounts host NB_CLI_ROOT into the container at /apps

Typical workflow

nb proxy caddy use local
nb proxy caddy generate --env app1 --host app1.example.com
nb proxy caddy start
nb proxy caddy status
nb proxy caddy info