Change the hostname / install with other hostname (for VirtualBox Test)

I installed a new Yunohost instance via Virtualbox and the VM Image “yunohost-buster-4.1.8-amd64-stable.iso” …

I already have a YunoHost instance running in my Network for production use… So i would like to change the hostname of the “Test-VM” … But how? The docs didn’t contain how to change it.

There is no way to change this on installation nor via WebGUI nor via yunohost CLI, isn’t it?

I found a old ticket: Set main domain as hostname · Issue #341 · YunoHost/issues · GitHub

EDIT: It seems that my first instance has the hostname “yunohost” and the second one “yunohost.local” is that normal?

EDIT2: Oh… I change the domain more than one time and set a new one and delete old ones… It seems that /ets/hosts are not clean up. Looks currently like this:

~$ cat /etc/hosts                                                                                                                                
127.0.0.1       localhost                                                                                                                                 
127.0.1.1       yunohost.yunohost.org   yunohost                                                                                                          
                                                                                                                                                          
# The following lines are desirable for IPv6 capable hosts                                                                                                
::1     localhost ip6-localhost ip6-loopback                                                                                                              
ff02::1 ip6-allnodes                                                                                                                                      
ff02::2 ip6-allrouters                                                                                                                                    
                                                                                                                                                          
127.0.0.1       test-yuno                                                                                                                                 
                                                                                                                                                          
127.0.0.1       yunohost                                                                                                                                  
                                                                                                                                                          
127.0.0.1       192                                                                                                                                       

Hm. Okay i think i have everything together now…

I have a FritzBox Router… The FritzBox used “*.fritz.box” name scheme.
This seems to work:

  1. Add “domainname.fritz.box” to the YunoHost Domains via WebGUI
  2. Change “domainname.fritz.box” to the default Doamin (also in WebGUI)
  3. Go into FritzBox Admin (Heimnetz/Netzwerk) and change the Name to “domainname” (without “.fritz.box”)

Now it looks like this:

jens@testyunohost:~$ cat /etc/hostname                                                                                                                    
testyunohost.fritz.box                                                                                                                                    
jens@testyunohost:~$ cat /etc/hosts                                                                                                                       
127.0.0.1       localhost                                                                                                                                 
127.0.1.1       yunohost.yunohost.org   yunohost                                                                                                          
                                                                                                                                                          
# The following lines are desirable for IPv6 capable hosts                                                                                                
::1     localhost ip6-localhost ip6-loopback                                                                                                              
ff02::1 ip6-allnodes                                                                                                                                      
ff02::2 ip6-allrouters                                                                                                                                    
                                                                                                                                                          
127.0.0.1       test-yuno                                                                                                                                 
                                                                                                                                                          
127.0.0.1       yunohost                                                                                                                                  
                                                                                                                                                          
127.0.0.1       192                                                                                                                                       
                                                                                                                                                          
127.0.0.1       testyunohost                                                                                                                              

Is it a bug that /etc/hosts is not cleaned? Or is this on purpose?
Why is there the entry 127.0.1.1 yunohost.yunohost.org ?

A clean version should look like:

127.0.0.1       localhost   testyunohost   testyunohost.fritz.box
                                                                                                                                                          
# The following lines are desirable for IPv6 capable hosts                                                                                                
::1     localhost ip6-localhost ip6-loopback                                                                                                              
ff02::1 ip6-allnodes                                                                                                                                      
ff02::2 ip6-allrouters                                                                                                                                                                                                                                                         

isn’t it?!?

I tried yunohost in VM a lot of times.
I added “home.up” as main domain and added this line in the hosts file of every pc or android I’m using to connect to the VM :

192.168.1.24 home.up

Where the ip address is the one used by the yunohost server.
In the VM I have set the network as “bridged adapter”
I used virtualbox.

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