Here is what I expect:
$ hostname
freedombox
$ hotname -f # resolvable by the dns.
freedombox.mydomain.org
A certificate whose CN is freedombox.mydomain.org.
My current setup in the config page is:
hostname: freedombox
domain name: freedombox.mydomain.org
I get
$ hostname
freedombox
$ hotname -f # NOT resolvable by the dns.
freedombox.freedombox.mydomain.org
A certificate whose CN is freedombox.mydomain.org.
There is nothing wrong with your setup.
there is someting wrong: the result of hostname -f is not resolvable.
When you query for the FQDN using hostname-f, you get “${hostname}.${domainname}”
Here is the hostname
man page, which explains the same thing (if I got it correctly) but put the other way: ${domainname} is deduced from the fqdn written in /etc/hosts
THE FQDN
The FQDN (Fully Qualified Domain Name) of the system is the name that the resolver(3) returns for the host name, such as, ursula.example.com. It is usually the hostname followed by the DNS domain
name (the part after the first dot). You can check the FQDN using hostname --fqdn or the domain name using dnsdomainname.
You cannot change the FQDN with hostname or dnsdomainname.
The recommended method of setting the FQDN is to make the hostname be an alias for the fully qualified name using /etc/hosts, DNS, or NIS. For example, if the hostname was "ursula", one might have a
line in /etc/hosts which reads
127.0.1.1 ursula.example.com ursula
Technically: The FQDN is the name getaddrinfo(3) returns for the host name returned by gethostname(2). The DNS domain name is the part after the first dot.
Therefore it depends on the configuration of the resolver (usually in /etc/host.conf) how you can change it. Usually the hosts file is parsed before DNS or NIS, so it is most common to change the
FQDN in /etc/hosts.
FreedomBox doesn’t automatically prepend the hostname to the domain name but treats them separately.
Isn’t FreedomBox writting “127.0.0.1 ${hostname}.${domainname} ${hostname}” to /etc/hosts?
See code here:
Maybe it should instead write
“127.0.0.1 ${domainname} ${hostname}”
Thank you for your help!