How should I configure my hostname/FQDN for a multi-purpose VPS?

I recently got a VPS and have a fresh Ubuntu install, but I’m a bit confused as to how I should be setting up the hostname and /etc/hosts file if I’m wanting to set up an email server (Dovecot/Postfix) as well as use it for a NodeJS dev platform (and later hosting production stuff).

I read that you’re supposed to set your FQDN (and hostname) to mail.domain.com to avoid issues with Postfix, but that seems odd to do in my use case if I’m going to be using this VPS for a few other things as well.

Should I still do this, then handle other subdomains/etc via something like nginx if I’m going to point traffic at various Express/React apps once they’re running?

I’m pretty new to the server/system administration side of all of this.

Thanks in advance for any advice!

Answer

Name it whatever you want. There’s nothing magical about mail.example.org; it’s just a commonly used name for mail server. The mailserver may as well be named example.org or zaphod.beeblebrox.is.alien.example.org. Heck, it need not be in the same domain as the domain it’s handling mail for.

Attribution
Source : Link , Question Author : MisutoWolf , Answer Author : vidarlo

Leave a Comment