[Solved] DHCP hostname 'yunohost' as default?

Hi all,

TL;DR: where is ‘yunohost’ configured as hostname, even though I give another hostname while installing that is also shown on the command line (admin@myhostname:~, not admin@yunohost:~ )

Sorry to leave the forum full of half finished threads. On the way to solving one scratch or problem, often another (or ‘life’) comes up with a vengeance. Too often it is more than two weeks before I get back to resolving the original issue, leaving the thread closed without being able to post a solution, if any.

That aside, this time I have a problem with the default hostname that a yunohost shouts out to the DHCP-server. It always identifies as 'yunohost, even though I already gave a hostname while installing.

Where is the name configured as ‘yunohost’?

Background: the actual problem with that is that each time I configure a yunohost, my router (fritzbox) gets upset because it tries to match IP and hostname. It expects unique hostnames in the network. Because it already has seen a yunohost, the next yunohost makes it totally upset. The only way to modify any forwarding rules after that, is to factory reset the router and start painstakingly reconfiguring all port forwardings. That is stupid off course, but because all large companies are pushing for centralized services and civilians as consumers, there is no urge at AVM/fritzbox to improve functionality that helps home servers. So, even though the cause of the problem is at AVM/fritzbox, I hope to work around it during the yunohost installation.

Hi there,

did you try restarting your server to maybe propagate the new hostname (set during the postinstall using the main domain) ?

Otherwise, maybe check that this commands returns this :

root@yolo:/ynh-dev$ grep -nr "hostname" /etc/dhcp/
/etc/dhcp/dhclient.conf:15:send host-name = gethostname();

which indicates that the dhcpclient should be using the hostname of the machine …

Possibly you can tweak this line to indicate a custom hostname like this :

send host-name "yoloswag";
1 Like

Hi Aleks,

Thanks for the tip. gethostname() is used and returns the correct name, but maybe I have to check the installation script itself. The hostname on the commandline is correct all the time, and mostly I install Armbian first and then Yunohost on top of that. At some point during install each of the machines calls out “Hi, I’m Yunohost, let’s meet”.

I thought of it as a minor problem, but now I think of it: I have not pin pointed the moment at which the router gets upset. Looking at the install-script, perhaps it is Avahi, I don’t recognize anything else there that is chatty about the hostname. If not then, perhaps during post-install.

Next time I’ll pay closer attention and wait for a while between steps, to see whether one or the other one has the result of fritzbox being upset.

To be continued :wink:

1 Like

TL;DR: I think I was not being thorough enough in other cases. Now I paid close attention, and the machine never got ‘yunohost’ as hostname.

I installed another Yunohost, paying close attention to renaming the host after installing Armbian.

It is a couple of days ago now. but I think I didn’t run into problems this time. That is: was quite sure I did not run into this problem the last few days, but now I see I started this thread a few days ago, and now I am not so sure anymore.

Thanks for your suggestions, it helped me checking the used hostname quickly.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.