Ask HN: How do y’all manage your computer hostnames?
I’ve been using a particular hostname scheme for a while now, but it isn’t really cutting it, as I’m running out of good hostnames. I like the idea of very friendly hostnames (a clean name I can easily use to identify a certain system), but part of me wants to be a little more descriptive, especially since I have a lot of devices that I use on a regular basis and that are identified on things like GitHub and Tailscale via their hostname. I’m curious about how other people manage (or don’t manage) the hostnames for their computers and servers.
19 comments
[ 0.26 ms ] story [ 53.4 ms ] threadI have seen <site code><host function><id> quite a bit for environments less than, say, 10,000 hosts work well.
I have also seen places that just do p/v/c-<id> for stuff too, where p=physical, v=virtual, c=container and id is just a hex representation of the host number in the config db.
The big thing is having thoughtful DNS and load balancer setups for services. If you have a vpn, it should be vpn.domain.name or for documentation docs.domain.name.
A friend of mine uses favorite foods. I've had guest SSH accounts on 'burrito' before.
I don't bother to indicate via the hostname what the function of that particular machine is as a general policy, but sometimes an opportunity presents that I can't resist. For instance, my NAS is named "knifeblock" because it "holds" (the contents of) other "knives". My current smartphone is called "switchblade" because it's typically in my pocket, etc. My previous smartphone was "pocketknife" and the one before that was "penknife". The very first real server I set up for my personal use -- the one that started this whole naming scheme -- was "broadsword".
When a machine is retired, the name it goes by is retired as well, to help identify old backup images.
I have burned through all of the really common knife types and have moved on to more obscure and historical knifes and swords, and those from other nations/languages.
https://youtu.be/D7ImcrILvEo
For me, it'd probably be a prototyping server instrumented for exceedingly stupid and impractical things... But since you're more invested in the naming scheme, I shall pass the torch of finding out to you!
Just remember... Inquisitive minds are dying to know.
My first thought is that would be a pretty appropriate name for the machine I replace my current smartphone with. My current phone will be the last smartphone I own. After this, I'll go with the dumbest feature phone I can get, and also carry an actual pocket computer for my computing needs.
Knifewrench would be a decent name for that, because it will be full of weird things, both useful and impractical.
Thanks for the suggestion! I'd not heard of knife wrenches before.
If your service is spread over hundreds of servers then a cattle style naming convention makes sense. However, if you've got just 5 servers then pet style naming convention can be far more beneficial.
e.g. if you've got 5 servers and they're named after hobbits then when on sysadmin asks "What's going on with Frodo?" the other sysadmins will immediately know not only the server but what's running on there, if they've recently made any changes, etc. If those servers were named in a more cattle style approach then the question becomes "What's going on with DCPR002?", which is a lot harder for a sysadmin to parse and relate to the server.
That made an impression on me, so I followed a similar pattern when I started having my own devices to name: Erdos, Newton, Pascal.
Since then, I've settled into my own naming scheme, themed to women pioneers of technology:
My phone is named Lovelace after Ada Lovelace. One of my servers is named Hopper after Grace Hopper. My laptop is named Kare after Susan Kare.
My wife's naming scheme for her devices are space themed: Nebula, Luna, Io, Ganymede.
When we have shared devices, we sort of merge the schemes into space themed scientists. For example, our Apple TV is named "Copernicus", which I found a fitting name since the world revolves around it when it's on.
Services are referenced according to their purpose.
- currently for the dedicated servers that I rent at "Hetzner.de" I use just "he1", "he2", "he3", etc... . I don't have a high turnaround (e.g. I don't have he1 anymore but he2 runs since many years) and they're all located in Germany (I had one hosted in Helsinki until a few days ago but the connectivity was often really bad whenever Hetzner was doing changes to their network), so after a few hours/days I start remembering instinctively what runs on the latest server that I have set up.
- for the notebooks/servers I have at home I use from time to time a nickname. E.g. my old "Lenovo Carbon" laptop is just "carbon", but a NAS is called "story" (storage server which has only 4 disks -> fantasy-diminutive of "storage" was for me "story"), a server which has a Ryzen 5950x CPU with 3 big fans which used to make a "woooossshh"-sound whenever it spun them up is called "windy" (I then disabled the "boost" feature of the CPU because the noise of the air was annoying and it was anyway getting too warm in the flat, but the name stuck), a big tower-PC is "biggo", etc... .
- for VMs I always use the prefix "vm" followed by some chars which describe what the VM is supposed to host, followed by a number. E.g. I have currently "vmdbcommon6" (to host a general-purpose database, 6th reinstallation), "vmbot4" to run my web-crawler, "vmweb1" to host the website, etc.... I NEVER refer to Linux distributions names nor software names as it happened many times in the past that I wanted/had to switch.
So, nothing too clever in my case... .
Palladium? 10.0.0.46.
As a side-effect I now know a lot more about the periodic table.