Misschien dat dit voor iemand van pas komt. Zelf heb ik volgende stappen doorlopen om een server op te zetten (op Ubuntu Server Linux):
.
Installeren
Requirements:
code:
1
| sudo apt install -y git net-tools |
Steam & Valheim Server:
code:
1
2
3
4
5
| cd ~
sudo git clone https://github.com/Nimdy/Dedicated_Valheim_Server_Script.git
cd Dedicated_Valheim_Server_Script/
sudo chmod +x build_dedicated_valheim_server.sh |
.
Configureren
userpassword=”user_password” <—password for the new Linux User it creates
password=”passw0rd” <—password for the Valheim Server Access
displayname=”server display name” <—Public display name for server
worldname=”111111111″ <—local inside world name
(source:
https://re-actor.net/valheim-dedicated-server-in-linux/)
Set Variables:
code:
1
| sudo nano ~/Dedicated_Valheim_Server_Script/build_dedicated_valheim_server.sh |
code:
1
2
3
4
| userpassword='"MyServerName"'
password='"MyPassword"'
displayname='"MyServerName"'
worldname='"MyServerName"' |
Run configuration:
code:
1
| sudo ./build_dedicated_valheim_server.sh |
To modify the startup script later on (when needed):
code:
1
| sudo su - steam -c "nano /home/steam/valheimserver/start_valheim.sh" |
.
Open poorten
code:
1
| sudo ufw allow 2456:2458/udp |
Open these ports on your router if you want to play over the internet.
.
Admin toevoegen
Join any server.
Press the F2 key.
Under the Players box, you will find the ID in front of the player name.
Add this value into /home/steam/.config/unity3d/IronGate/Valheim/adminlist.txt (one per line)
(/home/steam/.config/unity3d/IronGate/Valheim is the server data directory)
.
Server status opvragen/stoppen/starten
code:
1
2
3
| sudo systemctl stop valheimserver.service
sudo systemctl start valheimserver.service
sudo systemctl status valheimserver.service |
.
Lokale savegame importeren in je server (optioneel)
1. Stop Server
2. Backup original server data
code:
1
| cp -r /home/steam/.config/unity3d/IronGate/Valheim /home/steam/.config/unity3d/IronGate/Valheim.bak |
3. Copy the content (using WinSCP for example) of "C:\Users\%username%\AppData\LocalLow\IronGate\Valheim\worlds" into "/home/steam/.config/unity3d/IronGate/Valheim/worlds"
4. Make sure the server world name matches with the configuration you used
5. Make sure the owner:groupowner is set to the steam user:
code:
1
| sudo chown -R steam:steam /home/steam/.config/unity3d/IronGate/Valheim/worlds |
6. Start Server