Valheim has captured the hearts of gamers with its unique blend of exploration, survival mechanics, and cooperative gameplay. While playing on public servers is enjoyable, setting up your own dedicated server comes with a host of benefits. From increased control over gameplay settings to the ability to play with a handpicked group of friends, a dedicated server opens up a world of possibilities.
How do you set up a dedicated server for Valheim? Valheim took the survival game space by storm upon its release, breaking new concurrent player records every few days for quite some time. And it’s clear that a lot of the appeal comes down to how easily you can set up your own Valheim dedicated server and play together with your friends.
If you’re a bit confused about the whole idea of dedicated server hosting, or how to set up or join a dedicated server, this is exactly the guide for you. Below we’ll walk you through how to turn your current world into a dedicated server, how to port-forward and allow ports through your firewall, how to make yourself admin, and how your friends can join your game once it’s all set up and ready to play.
How to play Valheim multiplayer
If you just want to play Valheim in basic multiplayer, then you don’t need to bother with setting up a dedicated server. All you need to do to host a multiplayer session is tick the “Start Server” button on the world selection screen in Valheim.
You can also choose to make it a Community Server with the button below, which means it will show up in the Join Game screen for other players (but only those with the password can join).
Once the world has loaded, you can invite your friends either through the Steam overlay or by sending them the Join Code for your server. You can see your Join Code at the top of the pause menu screen.
Why Opt for a Dedicated Server?
You might be wondering, why go through the trouble of setting up a dedicated server when there are public servers readily available? The answer lies in customization and control. With a dedicated server, you have the power to tailor gameplay according to your preferences. Adjust the difficulty, regulate who can join your realm, and even experiment with mods that add a twist to the Viking experience.
Things You’ll Need
Before embarking on your dedicated server journey, gather the following essentials:
- A capable computer to serve as the host
- A stable internet connection
- The Valheim game purchased and installed via Steam
- Basic understanding of networking concepts
Step 1: Preparing Your Hardware
Setting up a dedicated server begins with choosing the right hardware. While Valheim isn’t overly demanding, a computer with decent processing power and ample RAM is crucial. Opt for a machine that can run 24/7 without overheating.
Step 2: Installing Valheim Server
Head over to the “Tools” section in your Steam library and install the Valheim Dedicated Server. This standalone application allows you to run a server without launching the game itself.
Download and install the Valheim Dedicated Server tool on Steam, on the PC that you want to host the server. Everyone who owns Valheim on Steam will also have a copy of the Valheim Dedicated Server tool in their Steam Library, so a quick search for “Valheim” in your library will bring it up.
2.1 Edit the “start_headless_server” file.
Once the Valheim Dedicated Server tool is installed, right-click it in your Steam Library and go to “Manage -> Browse Local Files”. There you’ll find a file named “start_headless_server”. Make a backup of this file somewhere safe on your PC, and then open up the original file in Notepad.
Find the line that starts with “valheim_server” and change what’s in the quotes after the following words:
- -name: Enter a name for your server.
- -world: Enter a name for your world. If you’re using an existing world, enter that world’s name.
- -password: Enter a password that is distinct from the server and world names.
2.2 (Optional) Copy the existing world files to your host machine.
If you want to turn your current Valheim world into a dedicated server, then you need to make sure your world files are on the PC that is hosting the server. If you’re hosting and playing on the same machine, you can skip this step.
Open up Windows Explorer and type “%userprofile%\appdata\locallow\irongate\valheim” (without the quotes) into the search box.
Then copy all of the files related to your desired world, and paste them into the equivalent worlds folder on your host machine.
2.3 Find your IP Address.
To find your IP Address, hit “Start+R”, type “cmd”, and hit Enter. In the window that appears, type “ipconfig” and hit Enter.
Make a note of the following two IP Addresses:
- Default Gateway (for most people it is “192.168.0.1” or “192.168.1.1”)
- IPv4 Address
If you want players outside of your local area network to join your server, then you should also make a note of your External IP Address to send them. To find this, just go to What Is My IP Address and use the address it prints for you.
2.4 Set up Port Forwarding for friends outside your house.
In order for players who aren’t in your own house to start playing on your dedicated server, you need to do two more things:
- Log into your router account and set up Port Forwarding for ports 2456-2458.
- Allow ports 2456-2458 through your machine’s Firewall.
To set up Port Forwarding, open up a browser window and type in your Default Gateway IP Address. Then hit Enter to bring up your router tool. Login to your router and then set up Port Forwarding for the ports 2456-2458, for both TCP and UDP. The process depends on your router, so be sure to search online for how to Port Forward on your specific network and router type.
2.5 Allow the Ports through your Firewall.
Next you need to let those ports through your Firewall. To do so, follow these steps:
- Hit Start+R and type in “wf.msc”, then hit Enter to bring up your Firewall Advanced Settings.
- Click on “Inbound Rules”, then right-click it and select “New Rule”.
- Select “Port”, then “TCP”, and type in the specific local ports “2456-2458”. Select “Allow the Connection”, keep all the boxes on the next screen ticked, and give the rule a name and click Finish.
- Repeat the process to set up another rule for the same ports, but this time using “UDP” instead of “TCP”.
2.6 Run the server!
Now you can run the Valheim Dedicated Server tool. Wait until a message appears in the console that says “Game Server Connected”. You and your friends can now join the server!
Note: if you’re running the server on a different machine than you’re playing the game on, then don’t run the tool through Steam itself. Just find that “start_headless_server” file again in Windows Explorer, and double-click it to run the server. This way, you won’t run into issues with Steam thinking you’re running two games at once on the same account. You can create a shortcut for the file on your desktop for easier access in future.
Step 3: Port Forwarding and Firewall Settings
To make your server accessible to others, you’ll need to configure port forwarding on your router. Additionally, adjust your firewall settings to allow Valheim traffic.
Step 4: Configuring Server Settings
Edit the server’s configuration files to modify gameplay parameters such as world name, password protection, and player limits. These files are found in the server’s installation directory.
Step 5: Backups and Maintenance
Regularly back up your server world to prevent data loss. Perform maintenance tasks such as updating mods, adjusting settings based on player feedback, and ensuring overall server stability.
Troubleshooting Common Issues
Unable to Connect to the Server
If players are having trouble connecting, double-check your port forwarding settings and firewall rules. Ensure that the server is running and that the correct IP and port are used.
Server Lag and Performance Issues
Lag can be caused by various factors, including hardware limitations and network congestion. Optimize the server’s performance by reducing graphics settings and limiting the number of players if necessary.
Mod Compatibility Problems
If mods are causing issues, ensure they are up to date and compatible with the current version of Valheim. Mods that worked previously might become incompatible after game updates.
Tips for Customizing Gameplay
Experiment with server settings to find the perfect balance of challenge and enjoyment. Adjust factors like enemy difficulty, resource availability, and day/night cycle duration.
Exploring Community Mods
The Valheim modding community is thriving, offering a plethora of mods that can enhance your gameplay experience. From quality-of-life improvements to total conversion mods, there’s something for everyone.
Staying Updated with Game Patches
Keep an eye on Valheim’s official patch notes. Game updates can introduce new content, fix bugs, and sometimes require server-side adjustments to maintain compatibility.
Setting up your own Valheim dedicated server might seem like a complex endeavor, but with the right guidance, it’s a rewarding one. The ability to shape your Viking adventure according to your preferences is a game-changer. Whether you’re exploring the world with friends or delving into the depths solo, a dedicated server adds a new layer of immersion to Valheim’s captivating universe.