How to Host a Valheim Server

The whole job, honestly: what hardware you need, how to install it, the ports that matter, the two rules that stop a server booting, and how to back up a world properly. Follow it and you will have a working server without paying anyone.

The setup, in order

1. Size the hardware for the world, not the group

Budget around 4GB of RAM for a fresh world, 6GB for an established one and 8GB for a long-running world with large bases and most of the map explored. Valheim is not heavily multi-threaded, so a fast core beats extra cores. Disk is modest: 10GB covers the server and a world comfortably, but backups accumulate, so leave headroom for them.

2. Install with steamcmd

The dedicated server is Steam app 896660 and it is free, and you do not need to own Valheim on the account that downloads it. Install steamcmd, pull the app, and run the server once so it generates its config directory. Then write a service unit so it comes back after a reboot, and expect to re-run the update after each game patch.

3. Set the name, world and password carefully

A public server needs a password of at least five characters, and here is the rule that catches people: the password must NOT appear anywhere inside the server name or the world name. Break it and the server refuses to start. The world name selects which save file to load, so a name with no save behind it silently generates a new empty world instead of loading yours.

4. Open the right ports

Three UDP ports, and no TCP at all:

  • UDP 2456 — the game itself. Without it nobody connects.
  • UDP 2457 — the server query. Without it the server runs perfectly and never appears in the browser.
  • UDP 2458 — crossplay. Without it Steam players connect and Xbox and Game Pass players do not.

Router interfaces default to TCP, and TCP rules for Valheim do nothing while looking correct. If your server is running but invisible, this is almost always the reason — see the troubleshooting page for the full ordered list.

5. Set up admins

Valheim has no RCON and no web panel, so there is no remote console to administer from. In-game admin commands are granted by putting SteamID64s, one per line, inadminlist.txtin the server’s config directory. There are matchingbannedlist.txtandpermittedlist.txtfiles for bans and whitelisting. The server reads them at start, so a change means a restart.

6. Back the world up, and test the restore

Valheim already does some of this for you: the server writes timestamped auto-backups beside the live save and keeps a few of them, tuned with the -backups and -backupshort/-backuplong arguments. What it does not do is get them OFF the machine, which is the part that matters when the disk is the thing that failed. A Valheim world is a.dband a.fwlin the worlds directory, and copying them is the entire backup. Schedule it hourly, keep more than one generation, copy them off the machine, and copy while the server is idle rather than mid-session.

Then actually restore one somewhere else once. A backup nobody has restored is a theory, and the failure mode that ends long-running worlds is discovering that on the day it matters.

7. If you want mods

Install BepInEx into the server directory, then put plugin.dllfiles in its plugins folder. Mods come from Thunderstore as .zip packages that you unpack yourself. The catch when self-hosting is that a game update can overwrite the install, so BepInEx is something you re-check after every patch alongside the server itself.

What this actually costs you

On the invoice, a VPS with enough RAM. In total, the recurring work: steamcmd after each patch, a backup schedule you wrote and have to trust, BepInEx re-checked when the game updates, and being the person who notices the world did not come back up. Whether that is worth the difference is a fair question and the VPS comparison takes it seriously rather than answering it for you.

Or skip the build

Same server, installed and patched for you, with all three ports published, hourly backups running and BepInEx a switch away. From $3.93/month, first month free if your Flux account is new.

Frequently asked questions

What are the hardware requirements for a Valheim server?

Memory is the constraint, and it grows with the world rather than the player count. A fresh world with a few vikings is comfortable on 4GB and 2 cores; a long-running world with large bases, many tamed creatures and a widely explored map wants 8GB. Valheim is not heavily multi-threaded, so clock speed matters more than core count, and 10GB of disk is enough before backups accumulate.

Do I need a database to run a Valheim server?

No. Valheim persists everything to two files per world, a .db holding the world and a .fwl holding its seed and metadata, plus character data held client-side. There is no database to install, tune or back up, which makes it markedly simpler to self-host than a game whose framework depends on MySQL.

Is there a control panel for Valheim?

Not from the game. Valheim ships no web panel and no RCON, so a self-hosted server is administered over SSH and through the process manager you set up yourself. In-game moderation is separate: it comes from putting SteamID64s in adminlist.txt, and those admins then use the in-game console.

Which ports does a Valheim server need?

UDP 2456 for the game and 2457 for the Steam server query, and UDP 2458 as well if crossplay is enabled. All of them are UDP; opening TCP does nothing. A server missing 2457 runs and accepts direct connections while never appearing in the browser, which is the most confusing of the port mistakes.

Is self-hosting Valheim cheaper than managed hosting?

On the invoice, sometimes. In total, rarely by much. A VPS with 8GB of RAM is not far off the price of a managed plan, and the difference buys you steamcmd updates after every patch, a backup schedule you have to write and test, and being the person who notices at midnight that the world did not come back up.