LXC container with FQDN

Fchen

New Member
Jul 17, 2017
12
0
1
32
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
 
No matter if I name the server production-0 or production-0.example.com, hostname -f will output only the hostname itself, not the FQDN.

My SMTP server needs the FQDN for a correct HELO/EHLO.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!