Skip to content

Changing the Base Domain

If you started on one base domain and want to move everything to another (say from coding9.test to my-company.test), change it in one command.

mdocker config set
mdocker config set BASE_DOMAIN my-company.test

Setting BASE_DOMAIN (or BASE_DOMAINS) is special: config set detects it and cascades the change automatically —

  1. regenerates the wildcard certificate for the new domain;
  2. rewrites the macOS DNS resolver at /etc/resolver/<new-domain>;
  3. re-renders every project’s override with the new hostnames;
  4. refreshes the edge stack.

If you ever edit config.env directly instead of using config set, the cascade does not run — you would need to re-run setup and re-render each project yourself:

manual re-render
mdocker setup
for n in $(mdocker --json ls | jq -r '.[].name'); do
mdocker rerender "$n"
done

Prefer mdocker config set BASE_DOMAIN … — it does all of this for you.