Valheim servers: How to play multiplayer with a dedicated server

Valheim
Valheim (Image credit: Iron Gate Studio)

While Valheim can be played on your own, it's just a lot more fun to play with friends — or, sometimes, even total strangers. Many hands make light work, as the old adage goes, so it makes sense to get a bunch of people in your world at the same time. The obvious problem is that it's not always easy to line up schedules, especially when trying to take down the many bosses of Valheim, which makes setting up a dedicated server much more attractive. That way, you and your friends can jump on at any time since the server will always be running! Here's how to get it set up.

Products used in this guide

  • Survive like a Viking: Valheim ($20 at Steam)

How to set up a Valheim dedicated multiplayer server

  1. Open Steam, navigate to the Library tab and search for Valheim.
  2. Install Valheim Dedicated Server. This is a separate free download from the game Valheim.

Valheim Dedicated Server Install (Image credit: Windows Central)
  1. Once it's finished downloading and installing, right-click in the Valheim Dedicated Server entry in your Steam Library and select properties.
  2. Select local files on the left side of the screen, then click browse to locate the directory where the server is installed. For reference, it's typically installed in "C:\Program Files (x86)\Steams\steamapps\common\Valheim dedicated server" on a Windows 10 PC.

Valheim Dedicated Server Local Files (Image credit: Windows Central)
  1. Right-click on "start_headless_server.bat" and select Edit. This will open the server's settings file in Notepad.

Valheim Dedicated Server Edit (Image credit: Windows Central)
  1. You'll want to edit the bottom line to customize your server. The highlighted parts in the image below are what need to be customized.

Valheim Dedicated Server Settings File (Image credit: Windows Central)
  1. Change "My Server" to the name you want for your server. Give it a unique name so your friends can find it.
  2. Change "Dedicated" to the name of the world you're playing in. Valheim Dedicated Server will automatically look for worlds in the same folder that Valheim stores them in
  3. If you're hosting a dedicated server, make sure to copy the "C:\Users\YourWindowsUsername\AppData\LocalLow\IronGate\Valheim\" folder from the computer you're playing the game on to the same location on your server so that the server can find the worlds you want to play in.
  4. Change "secret" to the password of your choice. We recommend setting a password to avoid griefers entering your server and destroying your stuff.
  5. If you want a friends-only server, leave the 0 public setting as-is. If you want this dedicated server to appear in the list of community servers, change this number to 1.
  6. Save the file and close Notepad.
  7. Back in the Valheim Dedicated Server folder, double-click on "start_headless_server.bat" to start the server.
  8. The first time you run the dedicated server, Windows Firewall should ask you to allow the connection. Check the boxes next to private and public to allow Valheim Dedicated Server to talk to your private at-home network and the Internet.

Valheim Dedicated Server Firewall (Image credit: Windows Central)
  1. A command prompt window will appear and show you a running log of what's happening on the server. Once everything has started, open Valheim and search for your server in the Join Server tab.
  2. Your server will only appear under the Friends listing if you set the public option to 0 in the config file. Otherwise, your server will appear under the Community Servers section if it's a public server.
  3. If you and your friends are unable to find the server, you may need to add exceptions to your home router for ports 2456, 2457, and 2458. Consult your router's documentation for the best ways to do this.

Once you've got your dedicated server running, you can leave it be until the next time Valheim updates! If your server crashes or your computer gets turned off somehow, you can always start the server back up by running the "start_headless_server.bat" file located in the application directory.

How to update a Valheim dedicated multiplayer server

Valheim Muliplayer Resting

Source: Zackery Cuevas / Windows Central (Image credit: Source: Zackery Cuevas / Windows Central)

Since Valheim is in Early Access, it's receiving a lot of updates regularly. When Valheim updates, you'll need to stop your dedicated server and let Steam update the application files. But it's not just a matter of closing the command prompt window, as you could end up corrupting your world thanks to a bug in Valheim.

  1. Make sure all players have exited the server before making any changes.
  2. With the command prompt dedicated server window open, press the Control and C keys at the same time to initiate a shutdown.
  3. You may be asked to confirm server termination. Press Y to confirm.
  4. The window will close automatically when the server has been shut down.
  5. In Steam, go to your Downloads and select the up arrow on the Valheim Dedicated Server to initiate an update.
  6. Once the update is complete, run the "start_headless_server.bat" file located in the application directory.

Dedicated servers are the best way to run a huge Valheim world that's easy for everyone to play. That's because a dedicated server is designed to run all the time and allow people to play when it's most convenient for them. It's recommended that you have a decent modern computer to run the dedicated server, as it'll need a good bit of processing power and memory to process everything Valheim players can do in the game.

If you're dealing with lots of stuttering or slowdowns while playing, you might want to consider picking up one of the best gaming PCs to get an upgraded experience.

Nicholas Sutrich

Nick started with DOS and NES and uses those fond memories of floppy disks and cartridges to fuel his opinions on modern tech. Whether it's VR, smart home gadgets, or something else that beeps and boops, he's been writing about it since 2011. Reach him on Twitter or Instagram @Gwanatu