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

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
- Negligible cost: ~US$1/year, forever and with no surprises at renewal.
- Availability: with 1.111 billion combinations, you find a free one without fighting for it.
- No brand risk: a number doesn't collide with any brand, and no one is going to dispute it with you.
- Functional, not branding: for self-hosting you don't need a pretty or memorable name, you just need it to resolve.
- Wildcard + subdomains: a single domain gives you infinite subdomains with one wildcard record.
- Free Let's Encrypt: with the DNS-01 challenge you get a wildcard certificate (*.12345678.xyz) and cover all subdomains with just one.
- 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
- It's ugly and not memorable. For self-hosting it doesn't matter; for a brand, it does.
- Cheap TLDs (.xyz included) carry a certain spam/phishing reputation; some corporate filters look at them warily. For personal use it's not a bother, but it can come up.
- It's not for “serious” production facing third parties (a bank won't trust it), but for your own infrastructure and demos it's perfect.