Problem
once deploy --host example.com registers exactly one hostname with the proxy. Requests for common aliases like www.example.com reach the server (e.g. via a CNAME to the apex) but kamal-proxy has no route for them and no TLS certificate, so they fail — even though kamal-proxy itself supports multiple --host values per service.
What I tried
- There's no supported way to pass additional hostnames today:
deployArgs in internal/docker/proxy.go forwards the single Host string as one --host flag.
- Amusingly, a comma-separated value (
--host "example.com,www.example.com") almost works, because kamal-proxy's --host is a pflag StringSlice that splits on commas — but post-deploy verification builds https://<host>/up from the raw string, producing an invalid URL, so VerifyHTTPOrRemove tears the route back down.
- Workaround that works but doesn't survive updates: re-running
kamal-proxy deploy inside the proxy container with extra --host flags. ONCE re-registers the route from its single-host settings on the next app update, dropping the alias again.
Proposal
Allow --host to be repeated:
once deploy ghcr.io/me/app:latest --host example.com --host www.example.com
- Store hostnames comma-joined in the existing
host settings field, so serialized settings stay backward compatible with single-host installs.
- Treat the first hostname as canonical for display URLs and HTTP verification.
- Match any hostname in lookups (
once update www.example.com) and duplicate-host checks.
I have a working implementation with tests (full suite including integration passes) and will open a PR shortly.
Problem
once deploy --host example.comregisters exactly one hostname with the proxy. Requests for common aliases likewww.example.comreach the server (e.g. via a CNAME to the apex) but kamal-proxy has no route for them and no TLS certificate, so they fail — even though kamal-proxy itself supports multiple--hostvalues per service.What I tried
deployArgsininternal/docker/proxy.goforwards the singleHoststring as one--hostflag.--host "example.com,www.example.com") almost works, because kamal-proxy's--hostis a pflagStringSlicethat splits on commas — but post-deploy verification buildshttps://<host>/upfrom the raw string, producing an invalid URL, soVerifyHTTPOrRemovetears the route back down.kamal-proxy deployinside the proxy container with extra--hostflags. ONCE re-registers the route from its single-host settings on the next app update, dropping the alias again.Proposal
Allow
--hostto be repeated:hostsettings field, so serialized settings stay backward compatible with single-host installs.once update www.example.com) and duplicate-host checks.I have a working implementation with tests (full suite including integration passes) and will open a PR shortly.