top of page

Valheim Dedicated Server Setup

  • Writer: Sydnie Barnes
    Sydnie Barnes
  • 2 days ago
  • 3 min read
This took me way too long to build...
This took me way too long to build...


My core group of friends are all hopelessly addicted to Valheim. In the past, we made do with crude setups of local servers for our collaborative play needs. Since obtaining a machine that we can dedicate to running a server 24/7, we decided to finally tackle setting up a dedicated server.


Initially, we followed their official documentation here, but setup instructions we found to be a little cryptic. Thankfully, TroubleChute's video guide provided the more in-depth instructions we needed to help make it through to the end.


Setup

The first thing was to get the dedicated server installed on the host machine. Thankfully, any Steam account that's purchased Valheim will also have the dedicated server available to install as well, so this step was easy.


What's not mentioned in the official documentation is that you'll need to download SteamCMD in order to run the server anonymously (so I can also play on the server from a different machine)


To set it up correctly, an empty folder should be created on the desktop (e.g. ValheimTestServer)

After downloading SteamCMD, the contents should be extracted to that empty folder.

Next the installer should be run entering the following command:

login anonymous

After a successful login, update the app:

app_update 896660

Now open Steam and right click ‘Valheim Dedicated Server’ > Manage > Browse Local Files


Make a copy of start_headless_server.bat and name it something new and exciting. E.g. ‘ValheimTestServerStart.bat’

Now the server is ready to be configured. Yay!


Configuring the server


Modify the contents according to A Guide to Dedicated Servers - Valheim - configure the server name and password, as well as other parameters.


NOTE: I had to remove the crossplay flag as this was breaking mine 🤷‍♀️


Now create a shortcut to that batch file and place it on the desktop


Now, Valheim needs to be allowed through Windows Firewall on the host machine by setting up some Firewall rules.


Open Windows Firewall > Advanced settings


Select Inbound Rules and add 2 new rules


  • Port > TCP > Specified Local Ports: 2456-2458 > Allow > All > Name: ValheimServer

  • Port > UDP > Specified Local Ports: 2456-2458 > Allow > All > Name: ValheimServer


Select Outbound Rules and add 2 new rules


  • Port > TCP > Specified Local Ports: 2456-2458 > Allow > All > Name: ValheimServer

  • Port > UDP > Specified Local Ports: 2456-2458 > Allow > All > Name: ValheimServer


Now, port forwarding should be set up on the router if it's not already.


  1. Browse to the local router and sign in as admin (usually the default gateway 192.168.0.1)

  2. Select port forwarding

  3. Find the IP of the host machine - type ipconfig /all and find the internal IPv4 address.

  4. Open ports 2456-2458 for TCP and UDP

  5. Save and close


Now launch Valheim Dedicated server.


Let it run - once ‘Game Server Connected’ displays, it will allow connections!


Now the server is ready to be connected to. Let's test!


Connecting to the server on an internal network

To connect internally, open steam and go to View > Game Servers


Go to the favorites tab then click the plus and type in the internal IP address followed by the port

For example:

192.168.0.06:2456

NOTE: If this fails, try :2457 or :2458


It should show up like this if all is well.


The moment of truth arrives. Enter the password assigned in the batch file prior, then try to connect and choose a character


If you see a password box pop up again, enter the password once more. We should be golden from here!


Connect to Server on External network


To connect publicly is a slightly different story, but thankfully not too bad.


On the host machine, open a web browser and search ‘What is my IP’ to get the public IP address assigned to that machine.



Provide that IP for others to connect to instead of using your internal one. Follow the steps for an internal connection otherwise.


That's really it!


In conclusion


This was a great and fun little project to set up at home and get some good networking experience on the side. Now that I've done this, I feel much more comfortable with concepts like firewall rules and port forwarding... Now to create more game servers 🤔



Commentaires


bottom of page