Requirements

The following requirements are unofficial, but are the general consensus amongst official Helpers in the Valheim Discord. You may still be able to run a dedicated server using less than the listed requirements. This is just a guided starting point. Note that the more players you have, the higher these requirements will need to be to sustain performance.

  • Linux
    • 2vCPU or higher
    • At least 4 GB RAM
  • Windows (the Windows OS uses more resources, so requirements will be higher than Linux)
    • 2 GHz Quad Core CPU or higher
    • At least 8 GB RAM


Setting up and running the Server

Valheim Dedicated Server tool.jpg

1. Download the Valheim Dedicated Server Tool

  • When you purchased Valheim, the "Valheim Dedicated Server" tool was also added to your Steam library. Download and install the "Valheim Dedicated Server" tool

2. Configure the Server

  1. Go to the "Valheim Dedicated Server" application folder. If you installed it from Steam, you can right-click "Valheim Dedicated Server" in your library and select Manage > Browse Local Files
    • Note: The Valheim Dedicated Server Manual PDF file in this folder is also a good resource
  2. In the folder there is a BAT file named "start_headless_server"
    1. This file will be overwritten by Steam if it updates, so make a copy of it
    2. Right-click and edit the copy using Notepad (Alternatively, use Notepad++)
  3. Change the following values on the last line of this file
    • -name “My server”: The name of your server as it appears on the in-game community server browser. Leave this as "My server" or change to something else of your liking
    • -world “Dedicated”: The name of the Valheim World you wish to host on the server. This is also the name of the world file located in %UserProfile%\AppData\LocalLow\IronGate\Valheim\worlds. If you already have a world in mind, use its name here
    • -port 2456: This is the port that Valheim will connect to the server on. Leave this as its default value unless you know what you're doing
    • -password “secret”: The password used to access the Valheim world. Minimum password length is 5 characters
    • (Optional) -savedir [PATH]: Overrides the default save path where worlds and permission files (e.g. adminlist.txt) are stored
      • Example: -savedir "C:/Games/Valheim"
      • Default path for WINDOWS: “../%USERPROFILE%/AppData/LocalLow/ IronGate/Valheim”
      • Default path for LINUX: “~/.config/unity3d/IronGate/Valheim”
    • (Optional) -public 1: This shows (1) or hides (0) your server from the community server browser. Since 1 is the default, there is no need to include it. In other words, setting -public 1 is functionally meaningless. However, setting -public 0 will hide your server from the server browser and require players to connect to it using the "Join IP" button.
  4. Save your changes

3. Start the Server

  • Double-click the copied start_headless_server file you made in step #2 to run the server


Port Forwarding

To allow other players to connect to your server from the internet you will need to set up port forwarding. This is usually configured on your router so consult its documentation or read a guide to find the steps on how to do this. There is a website (https://portforward.com) that is a useful resource for this. The port numbers you need to forward are 2456-2457.


Connecting to the Server

  1. Start Valheim
  2. Select your character
  3. From the select world window, select the "Join Game" tab near the top
  4. Find your server's name in the Community servers list and connect to it, or...
  5. Select "Join IP"
  6. Enter the server IP and forwarded port
    • If you're playing the game on the same computer you are hosting the server on, use 127.0.0.1:2456
    • If you're playing the game and hosting it on two different computers, use the LAN (local) IP of the server computer. This usually starts with 192.168 and can be found in your router's list of connected devices. (Example: 192.168.0.2:2456)
    • If you're connecting to someone else's server, you may find their server name in the in-game server browser. Or, the host will need to provide the public IP and forwarded port. The host can discover their public IP by visiting https://whatismyipaddress.com/ and selecting the IPv4 address or by Googling "my ip"
  7. Select "Connect"
  8. Enter the server password


Additional Configuration

Admins, Bans, and Whitelist

Server hosts are able to whitelist, ban, and make an admin of any users with the permittedlist.txt, bannedlist.txt, and adminlist.txt files located in %UserProfile%\AppData\LocalLow\IronGate\Valheim.

Each file uses the steamID64 of a user to accurately identify their Steam account. This number can be found in several ways:

  • While in-game on your server, press F2 to bring up a menu that will show you connected players and their steamID64
  • Use a 3rd party tool like steamid.io to find a player's steamID64 using their name
  • In the server console, you will see clients and "session requests" from players using their steamID64's

Being an admin allows only the use of admin-specific console commands to manage your server (kick, ban, etc). It does not give access to any other commands such as cheats or debugmode. To make yourself an admin on your server, find your steamID64 using one of the above steps and add it to the adminlist.txt.

For example, if your steamID64 is "1234567890123456", the file should look like the following:

// List admin players ID  ONE per line
1234567890123456


Seeds

Dedicated seed.jpg

Currently, the server will create a random seed and give it the name you specify in the -world parameter of the start_headless_server.bat file detailed above, so if you want to host a server with a specific seed:

  1. Create the seed in singleplayer using a unique world name. For example,
    • Name: "Dedicated"
    • Seed: "pangea"
  2. Make sure to start this new world at least once to get the game to create the necessary files
  3. Change the -world parameter in your copied start_headless_server.bat to your chosen world name (not the seed name). In this example, "Dedicated"

If your server is a different computer, you can find the world files in %UserProfile%\AppData\LocalLow\IronGate\Valheim\worlds. Using the example above, they will be named Dedicated.db and Dedicated.fwl. Simply copy/paste these files to the same directory on your server and update your start_headless_server.bat file's -world parameter to your chosen world name (not the seed name).

Community content is available under CC-BY-SA unless otherwise noted.