…and more importantly, where is that setting stored so I can turn it on for all of them?

I realize this varies according to OS, so I’m specifically asking about my Turnkey Nextcloud and Turnkey Mediaserver containers, which are based on Debian Linux. It’s perhaps worth noting that my Turnkey Syncthing container, which uses the same base OS, does register its hostname with my DHCP server. I’ve gone digging around in /etc/ etc. in each of the containers, but so far I haven’t found any configuration differences that would explain the difference in behavior. (Also, if it matters, my DHCP server is the one included with OpenWRT and running on my router.)

By the way, I’m aware that the best answer might be “you have an X/Y problem and you really ought to use static IPs and/or setup a reverse proxy,” but I haven’t gotten to that point yet. Besides, I still want to satisfy my curiosity about DHCP and hostnames regardless.

EDIT: to be clear, this post is about LXC containers running directly in Proxmox, NOT Docker.

  • @grueOP
    link
    English
    11 year ago

    Where is that DHCP server? Are you sure they get actual DHCP leases?

    The DHCP server is dnsmasq running on my OpenWRT router.

    The “Active DHCP Leases” table has entries for the Syncthing and the Nextcloud containers (the former with the hostname listed as “syncthing” and the latter with it listed as “?”). Weirdly, it does not have an entry for the Mediaserver container, even though that container is getting a valid IP.

    I also looked through the system logs and found DHCP-related messages for each (Nextcloud is .120, Mediaserver is .159, and Syncthing is .191):

    Fri Jul 28 22:47:28 2023 daemon.info dnsmasq-dhcp[4023]: DHCPDISCOVER(br-lan) be:d2:c2:da:ba:fc
    Fri Jul 28 22:47:28 2023 daemon.info dnsmasq-dhcp[4023]: DHCPOFFER(br-lan) 192.168.0.120 be:d2:c2:da:ba:fc
    Fri Jul 28 22:47:28 2023 daemon.info dnsmasq-dhcp[4023]: DHCPDISCOVER(br-lan) be:d2:c2:da:ba:fc
    Fri Jul 28 22:47:28 2023 daemon.info dnsmasq-dhcp[4023]: DHCPOFFER(br-lan) 192.168.0.120 be:d2:c2:da:ba:fc
    Fri Jul 28 22:47:28 2023 daemon.info dnsmasq-dhcp[4023]: DHCPREQUEST(br-lan) 192.168.0.120 be:d2:c2:da:ba:fc
    Fri Jul 28 22:47:28 2023 daemon.info dnsmasq-dhcp[4023]: DHCPACK(br-lan) 192.168.0.120 be:d2:c2:da:ba:fc
    
    
    Wed Jul 26 21:45:18 2023 daemon.info dnsmasq-dhcp[4023]: DHCPDISCOVER(br-lan) a6:b6:02:9b:bd:e5
    Wed Jul 26 21:45:18 2023 daemon.info dnsmasq-dhcp[4023]: DHCPOFFER(br-lan) 192.168.0.159 a6:b6:02:9b:bd:e5
    Wed Jul 26 21:45:18 2023 daemon.info dnsmasq-dhcp[4023]: DHCPREQUEST(br-lan) 192.168.0.159 a6:b6:02:9b:bd:e5
    Wed Jul 26 21:45:18 2023 daemon.info dnsmasq-dhcp[4023]: DHCPACK(br-lan) 192.168.0.159 a6:b6:02:9b:bd:e5
    
    
    Wed Jul 26 21:45:14 2023 daemon.info dnsmasq-dhcp[4023]: DHCPDISCOVER(br-lan) 1e:44:37:54:4a:f8
    Wed Jul 26 21:45:14 2023 daemon.info dnsmasq-dhcp[4023]: DHCPOFFER(br-lan) 192.168.0.191 1e:44:37:54:4a:f8
    Wed Jul 26 21:45:14 2023 daemon.info dnsmasq-dhcp[4023]: DHCPDISCOVER(br-lan) 1e:44:37:54:4a:f8
    Wed Jul 26 21:45:14 2023 daemon.info dnsmasq-dhcp[4023]: DHCPOFFER(br-lan) 192.168.0.191 1e:44:37:54:4a:f8
    Wed Jul 26 21:45:14 2023 daemon.info dnsmasq-dhcp[4023]: DHCPREQUEST(br-lan) 192.168.0.191 1e:44:37:54:4a:f8
    Wed Jul 26 21:45:14 2023 daemon.info dnsmasq-dhcp[4023]: DHCPACK(br-lan) 192.168.0.191 1e:44:37:54:4a:f8 syncthing
    

    Typically Docker’s…

    Again, this post is about LXC containers running directly in Proxmox, NOT DOCKER.