How to Set Up a Valheim Dedicated Server
A Valheim dedicated server keeps your world online when the usual host logs off. Friends can build, sail, and explore on their own schedules, while the world lives on one machine instead of whichever player happened to start the session.
This guide is for setting up that machine yourself. It covers Windows and Linux, the two UDP ports Valheim actually uses, Steam versus crossplay networking, world files, backups, and the mistakes that most often leave a healthy server unreachable.
Skip the home setup and configure a managed Valheim server
Valheim 1.0 arrives on September 9, 2026
Iron Gate has confirmed that Valheim 1.0 and the Deep North arrive on September 9. The release covers PC, Linux, Mac, Xbox, PlayStation 5 and Nintendo Switch 2, with full crossplay between those platforms. That makes crossplay configuration more important for a dedicated server than it was during Early Access.
Final dedicated-server migration notes have not been published yet, so do not assume that a mod or an unattended update will be harmless. Before launch day:
- Make an off-machine copy of the complete world and permission files.
- Update the server and every client together so the group does not split across incompatible builds.
- Check every BepInEx mod against its author's stated 1.0 compatibility before loading the production world.
- Keep the last pre-1.0 backup until the group has explored, built, saved and restarted successfully on the new version.
The setup below describes the current live dedicated server and will remain the safe baseline unless Iron Gate changes the launch arguments for 1.0. The official release-date announcement confirms the date, platforms, Deep North and full crossplay.
What the server needs
- A machine that stays on. An old desktop, mini PC, or Linux box works. Allow at least 4 GB of free RAM for a normal vanilla world, with more headroom for a heavily explored world or BepInEx mods.
- A stable connection. Upload speed is rarely the hard part for a small group, but packet loss and Wi-Fi instability are. Use Ethernet if possible.
- A reachable network. The Steam backend needs port forwarding. Crossplay uses a relay and can work without it, which is useful behind CGNAT.
- SSD storage and backups. The install is small, but the world is valuable. Keep copies somewhere other than the server machine.
Windows setup through Steam
In Steam, open the Library filter and enable Tools. Install Valheim Dedicated Server, then use Manage and Browse local files to open its folder. Copy start_headless_server.bat before editing it, because an update can replace the original.
The launch line needs a server name, world name, password, port, and visibility. The important arguments are -name, -world, -password, -port 2456, and -public 1. The password must be at least five characters and cannot appear inside the server name. Save the file and run your copied batch file. Allow the server through Windows Firewall when prompted.
Linux setup with SteamCMD
Valheim's dedicated-server app ID is 896660 and supports anonymous SteamCMD login. Install SteamCMD from your distribution, create a separate unprivileged user for the game, choose an install directory, and download app 896660. The server binary is valheim_server.x86_64.
Launch it with -nographics -batchmode followed by the same name, world, password, port, and public arguments used on Windows. The official Linux build also needs libatomic and PulseAudio libraries. Run the process under systemd or another service manager so it restarts after a crash or machine reboot.
Ports: use 2456 and 2457, not just one rule
With the Steam backend, Valheim uses the selected UDP port and the next UDP port. At the default setting that is UDP 2456–2457. Forward both ports from your router to the server machine, allow both through the machine's firewall, and make sure the launch script still says -port 2456.
If the server works from inside your home but friends cannot reach it, check the router rule, the server machine's private IP, Windows or Linux firewall rules, and whether your ISP uses CGNAT. A changing private address can silently point an old router rule at the wrong device, so reserve that address in DHCP.
Steam backend or crossplay?
The default Steam backend is for Steam clients. Add -crossplay to use Valheim's PlayFab backend when Xbox, Microsoft Store, or other supported platforms need to join. Crossplay servers provide a join code and use a relay, so they do not need home-router port forwarding.
There is one surprising limitation: a crossplay server cannot be reached through a local or loopback address. Use its public address, join code, or server-list entry even when the client is on the same network.
Move an existing world
A Valheim world normally consists of matching .db and .fwl files. Stop both the game and the dedicated server before copying them. Put both files in the server's worlds directory and set -world to the filename without the extension. A mismatched or missing pair can make the server create a fresh world with the same name.
Our free world migration checker confirms that before you upload: drop the two files in and it reads them in your browser, checks that the pair matches, that you did not pick the .old backups, and that the world format is one it recognizes. Nothing is uploaded to us.
If you use -savedir, the worlds and permission files live below that path instead of the platform default. This is a clean way to keep the entire server state in one directory for backups.
Backups and updates
Valheim keeps automatic rolling backups. The official defaults retain four, with a short backup after two hours and longer backups twelve hours apart. Those copies are helpful, but they are still on the same disk. Regularly copy the save directory to another machine or storage service while the server is stopped.
When Valheim updates, clients usually update before a manually managed server does. If players see an incompatible-version message, stop the process, run the Steam or SteamCMD update, and start it again. Keep your edited launch script outside the path that the update replaces.
Common connection failures
- Server starts but nobody outside can join: forward both UDP ports, check the machine firewall, and rule out CGNAT.
- Server disappeared after an update: update the server binary and confirm your copied launch script still exists.
- A fresh world appears: check the world filename, both save files, and the directory selected by -savedir.
- Xbox cannot join: enable -crossplay and share the join code.
- Password is rejected: use at least five characters and do not include the password inside the server name.
When renting is the simpler option
Self-hosting is a good fit when you already have a machine, a reliable connection, and you enjoy maintaining it. The hidden costs are electricity, router work, updates, backups, and the person in the group who becomes permanent on-call support.
A managed host runs the same dedicated-server software in a datacenter and handles the machine around it. If you would rather skip SteamCMD and port forwarding, compare our Valheim server hosting plans. They include a fixed address, DDoS protection, file access, and a control panel, with no automatic renewal.
The command names, default port pair, crossplay behavior, and backup defaults above are documented in the official Valheim dedicated-server guide.