Hostname change to hostname.domain.tld

SYSTEM INFORMATION
OS type and version Debian 12 up-to-date
Webmin version current
Virtualmin version current
Webserver version REQUIRED
Related packages SUGGESTED

After the installation of Virtualmin my hostname in /etc/hostname change from hostname to hostname.domain.tld.

root@server:~# hostname
server.o-arp.de
root@server:~# hostname -f
server.o-arp.de
root@server:~# cat /etc/hostname
server.o-arp.de
root@server:~#

Not sure is it a feature or a bug?
So I change it back to hostname…

I think this is correct as you need a FQDN for your your servers hostname to allow all of the internet based services to work properly.

Personally, before I install Virtualmin on a new server, I always edit the hostname file in /etc to what I want, s1.mychoice.eu or whatever, seems to go fine for me. Then I reboot :slight_smile: once hopefully the server comes backup I then run the install command for GPL as root in a term. Very smooth install usually, did one last night. All tickety boo.

  • if you change the hostname after installing virtualmin, run the check config option.
  • I also thought there was a GUI option for changing the hostname via virtualmin.
  • Either the Virtualmin install script or my Ubuntu qwizard forced me to set a FQDN

Yes, if you have not set a FQDN when you run the script it will point it out to you and at the same time ask you there and then to set one. I just do it before I even install. Also not to set one that your going to recieve mail on for some reason.

This is because of how virtualmin/postfix internally maps the emails to the relevant linux user accounts on the server. The team have floated the idea of changing from using users to something else.

Thanks. Thought it was something like that. I have a specific domain that I use for this very thing on my servers. DNS for the domain I use goes to a specific IP address and server but seems to be no problem to use on other servers, like s1.domain.eu s2.domain.eu s3 domain.eu etc., I guess it is just a basic requirement?

FQDN in Hostname?
That is so wrong!

Also after a nice clean install of VM I then reboot the server again, once back online I login and go through the initial setup / config motions, not had a problem for years.

My Name is David Your name is … Hostname is … whatever you set it to.

Post an image of your /etc/hostname file contents.
If your server is with Hetzner put a ticket in, if you get a good and kind engineer he or she or it will sort it for you.

I find DNS confusing myself, hostname is not a hostname. Localhost is something else. Having a beer or two here.

consider this FQDN (Fully qualified domain name)

webserver.quantumwarp.com

  • webserver = hostname
  • quantumwarp = Domain
  • .com = Top level domain) (TLD)

Nice diagram

I think VM just needs a FQDN to function even if its s11.mickymouse.com and is not even real.

To have stuff router on the internet, a VM needs a real FQDN otherwise the internet protocols it can use will be limited. If you are not using it on the internet but just connecting into the VM over a local network etc.. you can just have a the hostname part and not need a FQDN.

So the VM needs a FQDN and Virtualmin needs a FQDN but it just uses the host’s (the virtual machine) FQDN. Virtualmin sits on top of your server and uses the assets the server possess rather than creating its own.

Joe, llia will explain it fully later I guess, it is Sunday after all.

For mail to work, you need a fully qualified domain name. And, Virtualmin also tries to get a cert for the system hostname so you can login to Webmin before you have Virtualmin domains without getting a certificate warning in your browser.

But, it shouldn’t be a surprise that it changed. The install script asked you to set a FQDN if the system doesn’t already have one. We generally try pretty hard not to do anything behind your back, we’re aiming for minimal surprise. The download page and install docs discuss the FQDN stuff and the fact that the installer will ask you to set a FQDN if you don’t have one, as well.

1 Like

Keep in mind that if you need to reference only the base hostname somewhere, you can always call hostname -s