Skip to content

Multiple Base Domains

MultiDocker can serve projects under several base domains at the same time — for example coding9.test and client-a.test. The base domains are stored space-separated in config.env as BASE_DOMAINS, and index 0 is the primary.

mdocker config domain
mdocker config domain list # current base domains
mdocker config domain add client-a.test # append a base domain
mdocker config domain remove client-a.test # remove one
mdocker config domain primary client-a.test # move it to the front (make it primary)

Each of these commands cascades automatically: the wildcard certificate is regenerated, the DNS resolver is updated, the edge stack is refreshed, and all registered projects are re-rendered so their routing stays consistent.

The primary base domain (index 0) is what new projects default to when you don’t pass --host at init, and it’s the domain used to derive default hostnames like <name>.<primary>. Use config domain primary to change which one leads.