A dedicated Valheim server keeps your world online 24/7. On Ubuntu you use SteamCMD, open UDP and keep the process in screen or a unit file.
Steps
Install 32-bit deps and SteamCMD:
sudo dpkg --add-architecture i386sudo apt updatesudo apt install -y lib32gcc-s1 steamcmd screenCreate a user and download the server (app 896660):
sudo useradd -m -r -s /bin/bash valheim || truesudo mkdir -p /opt/valheim && sudo chown valheim:valheim /opt/valheimsudo -u valheim bash -c 'steamcmd +force_install_dir /opt/valheim +login anonymous +app_update 896660 validate +quit'Start with a world name and password (change them):
sudo -u valheim bash -c 'cd /opt/valheim && screen -S valheim ./valheim_server.x86_64 -name "MyWorld" -port 2456 -world "MyWorld" -password "ChangeMe" -public 1'Open the game UDP range:
sudo ufw allow 2456:2458/udpsudo ufw reload
Tips
- Back up
~/.config/unity3d/IronGate/Valheim/worlds_localoften. - 1–2 GB RAM is fine for a few players; scale up with mods or more slots.
ext step
Keep the world online without your PC: See our game server VPS plans.