Modify /etc/hosts to create FQDN

I am a bit new to Nethserver and linux and because I have not defined my host and domain name properly during installation in order to create a FQDN, I would like to change this in the /etc/hostname and /etc/hosts file.

When I open the hosts file it mentions:

================= DO NOT MODIFY THIS FILE =================

Manual changes will be lost when this file is regenerated.

Please read the developer’s guide, which is available

at NethServer official site:

I looked in the developers guide, but could not sort out what to do.

Who is able to help with this?

Hi @MB76 and welcome to NethServer community!

You can do this very easily using servermanager.
Log into servermanager: https://IP-ADDRESS:980
You can log in with any account. Only accounts from Domain Admins and root have access to full servermanager.
Go to Configuration / Server name
There you can edit your FQDN for the server.
Be aware that you can only change this BEFORE you install a usermanager. If you already have installed a usermanager you need to reinstall the usermanager (loosing all users already created)

Thanks for this feedback Rob.
I have already created besides the admin two users. I also stored data for these users on the server raid array with Nextcloud. If I reinstall the usermanager and add the same user accounts again after changing the domain name, can I get access again to the Nextcloud files?

I also found this post by the way: Procedure "Change the FQDN" from manual doesn't work

Would this be an alternative approach?

It appeared to be not so difficult. I first removed the local OpenLDAP. Then changed the host and domain name in the server manager as described above. After this installed the local OpenLDAP again, and the previous user accounts were still there. Problem sorted.
Next I have to figure out how to obtain a letsencrypt certificate. But this post can be closed. Thanks.

Closed at TS request