New on LowEndTalk? Please Register and read our Community Rules.
Naming of server hostname
These days I'm dealing with hostname and FQDN. I have read many discussions but I think they are not the best solution. Any idea?
I'm using this naming method right now:
fsn1-dc12-ex43-1.hetzner.example.com
I'm thinking of changing it to hetzner-fsn1-dc12-ex43-1.example.com
, or maybe adding a country code de
.
How do you guys name your server? No fancy name
Comments
⠀ ⠀ ⠀
⠀ ⠀ ⠀
All my hostnames are pretty simple and are based on universal ISO country codes. For example:
... which results in:
ewr-1-usa.srv.elde.st
I denote "srv" as any external server and have a internal designation for homelab stuff. I don't generally label the datacentre (as that's not something I'm usually concerned with).
Added bonus with a single subdomain: one wildcard SSL is usually enough to cover all of my VPSes (I know this isn't the most secure thing; I do not care).
Hostname:
shuf -n 1 /usr/share/dict/words
I re-run it until I get a word I like.
Or I use other random word generator like online ones.
FQDN will be the result from the
shuf
command + a domain name, which differs across the environments I'm working in.For example in a test setup domain will be
localhost.localdomain
.I used the IATA airport code be the part of name before but I found that how can I find the closest airport if I don’t know where the data centre is.
Like EWR and TEB, I know the server is located at Secaucus only.
I use my girlfriend's name.
Girlfriend_name.example.com
I don’t have enough girlfriends to fill up all of my server hostname.
Teko, you are too fast
role-number-location
eg. gw-001-fsn, web-001-ldn, db-001-nyc
Paid server with dedicated IPv4:
vps0, vps1, …, vps9.
Free server; server without dedicated IPv4:
box0, box1, …, box9.
I can have up to ten in each category.
If I don't have a hostname, I must cancel or transfer out some, before ordering new ones.
VPS - bobs
Dedi - vagene
Each host will be labelled as such:
open.bobs or open.vagene or show.bobs or send.bobs
I use my clients personal information
ssn-dob-id#-first-last.host
I use the host provider's name and country code.
prod-{id}-{loc}.domain.com
idle-{id}-{loc}.domain.com
random-word.example.com
Example:
atom.example.com
ray.example.com
diode.example.com
hertz.exampl.ecom
etc...
My company name is "Feline Tech".
I name my servers based on feline species name. Like tiger.felinetech.net, jaguar.felinetech.net.
Running out of species name though. Thinking of renaming internal usage nodes to my pet cat names.
i just use a subdomain.
so pointing to the dedicated ip.
and nahhhhhh i can access it..
What I think I see are two different use cases for server naming in this thread:
You have only a few servers and it is relatively easy to think of unique names for them. There are all kinds of popular "themes" that people choose: planets, Star Trek, famous people, landmarks, etc. etc. etc.
You have many servers and you need to include "metadata" in the name to make it easier to keep track of them. Metadata might include location (e.g., country code), purpose, provider name, location in the rack, etc. etc. etc.
My use case is #1.
I recently made a change and named my servers after animals such as dog, cat, raccoon, possum, bear, etc.
I am not that pleased with it, especially after I created aliases to connect to the servers. Using the alias "dog" worked fine, but the alias for "cat" was a failure - it covered up the "cat" (concatenate and print files) command. Doh!!
(A long time ago, I discovered similar tricks in the C preprocessor to expose and hide C variables using matching macro variable names with #define, #ifdef, #ifndef, #undef, etc. If you're a C programmer, give it a try - you can do amazing things with it.)
I have a schema...
Location + number + 3-character usage + 3-character env + number
Example of Germany-based VPN production server: de1vpnprd01 and de1vpnprd01
Both in DE01 location, VPN Production servers 1 and 2
And in case of other location of the server in Germany, I change the first number:
Application dev server: de2appdev01
Same with www test server in Poland, Warsaw
pl1wwwtst01
Or storage in France : fr1strprd01 (France 1 Storage Production 01
I asign identifiers to locations as below
de1 - Oracle Frankfurt
de2 - Contabo Nurnberg
de3 - PHP-Friends Frankfurt (same location, another DC)
pl1 - OVHCloud Warsaw
fr1 - OVHCloud Roubaix
Had fr2 in OVH Gravelines
When it comes to environments:
prd - production
tst - test
dev - development
sbx - sandbox