Why I use (and recommend) numeric .xyz domains for self-hosting

Self-hosting from your local network (without a public IP): numeric .xyz + Cloudflare Tunnel

The problem

Self-hosting something like Grafana, your app, or an API needs three things: a stable name that resolves to your IP, a valid TLS certificate (Let's Encrypt doesn't issue for IPs), and not depending on a free DDNS subdomain that can change or disappear. A domain of your own solves all three. The catch is the cost and the availability of the name.

That's where the numeric class of .xyz comes in.

And if you host from home, a fourth thing is added: the ISP normally doesn't give you a public IP but leaves you behind CGNAT (an IP shared among several clients). With CGNAT, port forwarding doesn't even work, since there's nowhere to forward to.

A domain of your own + an outbound tunnel solve all four.

What the 1.111B class is

In 2017 the .xyz registry opened a block: all domains with 6 to 9 digits ending in .xyz (from 000000.xyz to 999999999.xyz), 1.111 billion combinations, at US$0.99 per year forever — registration, renewal, and transfer, with ICANN fees included. Renewal costs the same as the initial registration.

Why I recommend it

  1. Negligible cost: ~US$1/year, forever and with no surprises at renewal.
  2. Availability: with 1.111 billion combinations, you find a free one without fighting for it.
  3. No brand risk: a number doesn't collide with any brand, and no one is going to dispute it with you.
  4. Functional, not branding: for self-hosting you don't need a pretty or memorable name, you just need it to resolve.
  5. Wildcard + subdomains: a single domain gives you infinite subdomains with one wildcard record.
  6. Free Let's Encrypt: with the DNS-01 challenge you get a wildcard certificate (*.12345678.xyz) and cover all subdomains with just one.
  7. Independence: it's your domain. You don't depend on a third-party DDNS that can shut down.

How I use it

The numeric domain (e.g. 12345678.xyz) as the root, with DNS on Cloudflare (free) and a wildcard *. And the key thing for hosting from home is Cloudflare Tunnel (the cloudflared daemon), which gives me an outbound tunnel to Cloudflare, without a public IP and without opening ports on the router. Each service has its own subdomain (app., api., grafana.).

Downsides