I'm trying to set an FQDN for a container with VestaCP installed on but everytime the container reboots the config from /etc/hostname and /etc/hosts will be overwritten, is there a way to set an FQDN?
Set the hostname in the DNS tab in the webui. The search domain of your host will then be happened to form the FQDN wich will be persistent when rebooting.
Hostname in the web UI is set to FQDN and DNS domain is also set to the domain (without hostname) but the command hostname or hostname -f will still output the hostname itself, also in /etc/hosts only the hostname is present.
Your hostname in the DNS tab of your container should be the hostname and not the FQDN. It should be like this:
Container hostname: production-1
Host search domain: example.com
Which would set the FQDN in your container to example-1.example.com
There is no need to mess with /etc/hostname and /etc/hosts
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.