A Valheim dedicated server on a VPS: requirements and setup
You can host Valheim straight from the game, but then the world only exists while the host is online, and their computer carries both the game and the server. A Valheim dedicated server on a VPS runs around the clock: friends join whenever they like, the world is saved on a schedule, and the load doesn't get in anyone's way. The good news is that it's one of the least demanding game servers, and a small group doesn't need an expensive plan.
How Valheim distributes the load
Valheim has an unusual network model. The server stores the world and relays data, while physics, mobs and structures in each zone are simulated by the client of the first player who entered that zone. So the server rarely hits the CPU limit, but it depends heavily on the network and on which players have a weak computer or slow internet: lag at a base is often caused by the zone's "owner", not by the VPS. Two conclusions follow: a stable connection and low ping to all participants matter more than powerful hardware, and when things desync, check which player arrived at the problem spot first.
Which VPS you need
- CPU: 2 cores at 3 GHz or more. The Unity server is mostly single-threaded, so a high clock speed is more useful than extra cores; the plans in the table are sorted by it.
- Memory: 4 GB for a world with 2–10 players. Consumption grows with the explored map and the number of structures, and a year-old world with a large base and mods can take 6–8 GB.
- Disk: the server itself takes a couple of gigabytes, world files tens of megabytes. Speed matters more: saving a large world on a slow disk causes brief freezes for all players.
- OS: the dedicated server (Steam app 896660) is officially released for Windows and Linux. Linux, such as Ubuntu or Debian, is more convenient on a VPS: you don't need a Windows licence or a graphical shell, which also eats memory.
By default the server allows up to 10 players at once; only mods allow more, and then the memory and bandwidth requirements grow.
Ports and connecting
The server listens on the port set by the -port parameter (2456 by default) and the one after it: 2456/UDP for the game and 2457/UDP for the Steam server list query. Open these ports in the VPS firewall; the official guide advises opening the range 2456–2458. If some of your group play on Xbox or Game Pass, start the server with the -crossplay parameter: connections then go through the PlayFab service using an invite code, without direct access to the ports, though some players may notice a higher ping.
The server password must be at least five characters long and must not contain the server name, otherwise the server won't start. For a private game with friends, add -public 0 so the world doesn't appear in the public list.
Mods and the dedicated server
Most server mods are installed through BepInEx, and then the server and every player need the same set of mods: if versions differ, the client simply won't connect. Mods that raise the player limit, increase the zone processing range or add new biomes noticeably increase memory and traffic use, so plan for 6–8 GB on a server with a large modpack. To manage mods on the server, it's handy to keep one profile in a mod manager and share its code with friends. Before updating the game, check that compatible mod versions have been released, otherwise the server won't start after the patch.
Saves, backups and updates
The world is stored in two files, .db and .fwl, in the worlds_local folder. The server autosaves and rotates backups itself; the interval and number of copies are set with the -saveinterval and -backups parameters. In addition, copy the world off the VPS at least once a day: reinstalling the server or a mod bug can wipe out months of building. After game updates come out, the server must be updated through SteamCMD, otherwise clients on the new version won't be able to connect.
If you plan to run other games on the same machine, it's more convenient to manage them through a panel: see VPS for Pterodactyl. General advice on choosing hardware and location is collected on the VPS for a game server page, and the low-ping VPS selection will help you find a server closer to your players. Public servers are sometimes attacked, so if the server is listed publicly, choose a host with DDoS protection.