To change the hostname or password of your dedicated Valheim server you will first need to login to the Management portal. On first signup you will receive an email with login details to your panel.
First, take a backup of your world to avoid any data loss.
Next you will need to click on the "Commandline Manager"
Now select "Custom Commandlines" and "New"
Tick all the boxes and fill out the details as required and save it.
Select the new commandline. This will restart your server with the new values.