Skip to content

Tenants, Domains and Host Names

A Muppy client (a company running its own Muppy instance) gets two domains: a private one and a public one. Both are sub-domains of zones the Muppy operator runs, both are served to the client through Muppy Built-in DNS, and each App Server the client creates gets one host name on each.

Private domain Public domain
Example hankluum.muppy.io hankluum.muppy.cloud
Zone a flat OVH zone, muppy.io a Cloudflare zone with Advanced Certificate Manager, muppy.cloud, prepared as in Preparing a Cloudflare Zone for Public URLs
Reached through the host's public IP, the host firewall, Sunray Cloudflare's proxy, then the origin
Host name of an App Server <server>-<host>.hankluum.muppy.io <server>.hankluum.muppy.cloud

What a tenant is

A tenant is a client, a company, and one MBD domain per zone. On the operator's Muppy (the MBD Server), the tenant is a DNS Domain of provider MBD Server: hankluum.muppy.cloud, backed by the Cloudflare domain muppy.cloud, with its own SigV4 token. On the client's Muppy (the MBD Client), the same name is a DNS Domain of provider MBD Client, connected to the operator's instance with that token. The private domain works the same way over the OVH zone.

The MBD domain is the tenant. Nothing marks it as such: a domain of provider MBD Client is, by construction, a sub-domain reserved to one client. The operator creates the tenant once; the client configures its two MBD Client domains once; every host name after that is generated.

A tenant exists because the public zone can be split. Its certificates reach two labels down, so each client gets a sub-zone of its own and writes into it from its own Muppy. A Cloudflare zone without Advanced Certificate Manager cannot be split that way: its clients share one flat zone, and the company is named inside each host name instead of by the domain.

How host names are built

A Traefik application's host name comes from an FQDN generator, chosen on the App Definition for the Direct URL and on the Traefik Application Definition for a public one.

Each generator is named after the shape it produces, so the list of generators reads as the list of names available:

Generator Produces
[appserver-plain] {ds_name} pubcf-main-dev-cyril
[appserver-host] {ds_name}-{host_name} pubcf-main-dev-cyril-gra5
[appserver-company] {ds_name}-{company} pubcf-main-dev-cyril-acme
[appserver-company-host] {ds_name}-{company}-{host_name} pubcf-main-dev-cyril-acme-gra5
[appserver-name_complement] {name_complement} hankluum
[appserver-lxd_host] {lxd_host_name} lxd-gra5

{ds_name} is the App Server name (pubcf-main-dev-cyril: code, branch, qualifier, owner), {host_name} the machine the LXD host runs on — or the LXD host itself when it is not a VM — {company} a slug of the company name, {name_complement} the App Server's Name complement, and {lxd_host_name} the same machine as {host_name}, written as the machine is named: {host_name} drops its dashes to stay one segment of a longer name, {lxd_host_name} keeps them because it is the whole name.

A Code Server offers two of them, with a codr- prefix: [codeserver-host] codr-{ds_name}-{host_name}, which is the default of its IDE URL, and [codeserver-company-host] codr-{ds_name}-{company}-{host_name}.

A Code Server is a developer's tool, not a shop window. Its URL exists to say what you are connecting to, so the host is useful information rather than a detail to hide. The price is that moving the server to another host changes the IDE's URL.

Which one to choose

The shape follows two questions: does the domain already name the company? and how is a collision between two servers of one name avoided?

Your situation Public name Direct name
You run your own Muppy, one company, MBD domains from muppy.io [appserver-plain] — the domain is your tenant, so it already names you [appserver-host] on the private domain
You are an integrator managing App Servers for several clients on one domain that names you, not them [appserver-company], or [appserver-company-host] when two servers of one name sit on two hosts [appserver-host]
You are an integrator with your own flat Cloudflare zone, no sub-zone per client [appserver-company-host] [appserver-host]
You are an end client with your own Cloudflare zone, one company, a CNAME in front [appserver-host] — one company, so the host is what keeps names apart [appserver-host]
The server is published under its commercial name, with no CNAME: hankluum.muppy.cloud [appserver-name_complement] [appserver-host], unchanged and explicit
A machine carries a single App Server, published under the machine's name: lxd-gra5.muppy.cloud [appserver-lxd_host] — a second server on that machine is refused [appserver-host]

A name that drops the host cannot be shared. When a second App Server would take a name already served for another one, the proxy configuration refuses it and names the holder, and the wizard that creates an App Server warns before provisioning. Choosing those names is the client's responsibility; a definition whose generator keeps the host is the escape hatch when two servers must carry one name.

The company slug only matters where the domain does not name the company. On a tenant sub-domain reserved to one client it would repeat what the domain already says.

The commercial name, in full

An App Server named mpy18c-prod-hankluum — code and version, qualifier, Name complement — keeps that name everywhere it is administered, and its Direct URL stays explicit: mpy18c-prod-hankluum-gra5.muppy.direct. Only its public URL carries the commercial name, hankluum.muppy.cloud, through [appserver-name_complement].

That generator names the server after its Name complement and nothing else, so an Application Definition carrying it is specific to one server and is set by hand. An App Server with no Name complement cannot be named this way: the reconfiguration fails and names the server, rather than publishing a URL nobody chose.

A name that would exceed 63 characters — the limit of a DNS label — is shortened and ends with an 8-character fingerprint computed from the full name, whichever generator produced it. The same server therefore always receives the same shortened name.

Pretty names and full control

The generated public name is meant to be readable and traceable to the server it serves, not pretty.
A client who wants erp.acme.com in front of erp-prod.hankluum.muppy.cloud gets it with a custom domain: a CNAME on their own zone, served by the same Cloudflare chain.
A client who wants full control connects a domain of their own and names its applications directly in it. Both are described in Custom Domains, along with the reason the choice matters — which of the two holds the TLS certificate.