How to set up a dedicated server from Valheim

Valheim is the latest survival crafting game to take the Steam player base by storm, and that’s largely thanks to the game’s multiplayer and PvP functionality. If you want to get into action with your friends, follow our guide how to set up your own Valheim dedicated server


On this page:

How to set up a dedicated server from Valheim

Follow these steps exactly to set up your own custom Valheim dedicated server quickly and easily:

Outside of Valheim, open your Steam library and search for “Valheim Dedicated Server”If you own Valheim, you also own this little tool that comes with it.

Download and install the Valheim Dedicated Server tool, just like any Steam game. But don’t run it yet! First, right-click on the tool in your Steam library and go to “Manage -> Browse Local Files”

In the window that appears, find the file named “start_headless_server”, make a copy of it and keep the copy somewhere else so you have a backup in case something goes wrong.

Then return to the first version of the file, right-click on it and click “Edit”. In the file, find the line that begins with “valheim_server” and change the following parts:

  • -name “My server”
    • Give your server a name between the quotation marks.
  • port 2456
    • Change the port number to the number you use for Port Forwarding. To check what this number is, log into your router and select “Port Forwarding”.
  • -world “Dedicated”
    • Name your world. It cannot contain words that are used in the server name.
  • password “Secret”
    • Give your server a password to make it private, or leave it blank to make it public.

Valheim dedicated server.jpg

These are the four sections you will need to modify in the “start_headless_server” file to set up your own custom Valheim dedicated server.

Now save the file, close it and run the Valheim Dedicated Server tool in Steam. Wait for the window to finish loading and printing lines. Once you see the line “Game server connected”, you can go back to Valheim and you should see the world appear in your list of worlds so you can join and start playing!

If you want to stop your Valheim dedicated serverthen check if there is a server window telling you to press any key to stop the server. If there is one, focus on that window and press any key to close the server. If there is no such window, either click the “X” in the main server window, or go to the Valheim Dedicated Server tool page on Steam and click “Stop”.

And yes, you can run the special server tool in the background and play Valheim on the same PC. You don’t have to run them on separate machines.


How to find and join a Valheim dedicated server

If you are having trouble locating the Valheim dedicated server you want to join, and you have double-checked the server settings to make sure everything is correct and working properly, try the following solution:

  • Open Steam. Click on “View” in the top left corner and then click on “Servers”.
  • Click the “Favorites” tab and then click “Add a server”.
  • Enter the IP address of the server, end with a colon, then add the port number.
    • For example: 999.999.999.999:0000 – where the 9’s is the IP address and the 0’s is the port number.
  • Click on “Add this address to favorites, and you should see your server appear as a new item in your favorite servers list.
  • From now on you can join the server by selecting it from this list and clicking “Connect”. If the server requires a password, you must enter it first, but then you will be sent to a game of Valheim with your friends!

If you or your friends are new to Valheim, learn the basics with our guides on how to use and upgrade the Workbench, as well as how to fix broken tools and weapons!


How to play Valheim multiplayer without a dedicated server

A dedicated server is nice, but you should know that it is not necessary to do this to play a multiplayer game in Valheim. All you need to do to jump into a game with a friend is select the world you want to create in the multiplayer game, click the Start Server button, join the game, then invite your friends through Steam (‘Shift + Tab’ to open the Steam overlay, right click on your friend and click on “Invite to game”).

So why bother with all this dedicated server stuff? The main reason is that a dedicated server works on its own without anyone having to be in the game. Without a dedicated server, one player is always the host, which means they have to stay in the game for the server to run. The moment they leave, everyone is kicked out. That won’t happen with dedicated servers!


That’s just about all you need to know about creating and joining a dedicated server. You don’t need to rent a server when the Valheim developers have made it so easy to create your own server with their Valheim Dedicated Server tool!

While you’re here you may want to check out our Valheim console commands and cheats guide as it teaches you how to use commands to control your server, give kicks and bans and a whole lot more.

Elsewhere, there’s our Valheim Building Guide, which walks you through things like construction waste, structural integrity, chimney making, and much more.

Source