Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Valheim Dedicated Server: Step-by-Step Setup

· 5 min read · Home Tech

In this article
  1. Why Run a Dedicated Server?
  2. What You Need Before Starting
  3. Step-by-Step: Installing the Server
  4. Configuring the Server
  5. Launching and Joining the Server
  6. Port Forwarding for Public Access
  7. Common Problems and Fixes
  8. Dedicated Server vs. Peer-to-Peer
  9. Frequently Asked Questions

To create a Valheim dedicated server, you need to install the dedicated server tool via Steam, configure its settings, and launch it so that you and your friends can join a persistent world. This guide walks through the entire process on Windows, including port forwarding and common troubleshooting.

Why Run a Dedicated Server?

A dedicated server keeps your Valheim world running 24/7, even when the host player logs off. Unlike a peer-to-peer game, where the host must be online and in-game, a dedicated server allows friends to join at any time. It also reduces lag because the server runs independently from the game client, and it makes backups and modding easier. For groups of 3–10 players, a dedicated server is the most reliable way to play together.

What You Need Before Starting

  • A Windows PC (or a Linux VPS) that can run the server. The official requirements are modest: a dual-core CPU, 2 GB RAM, and about 1 GB of free disk space. For 5+ players, 4 GB RAM is recommended.
  • A copy of Valheim on Steam (the server tool is free, but you must own the game to play).
  • Steam client installed and logged in.
  • A router that allows port forwarding (for public servers).

Step-by-Step: Installing the Server

  1. Open Steam and go to your Library. From the top menu, select Library.
  2. Filter by “Tools”. Click the dropdown that says “Games” and select “Tools”. You’ll see “Valheim Dedicated Server” in the list.
  3. Install the server. Right-click “Valheim Dedicated Server” and choose Install. Choose a location with enough space (e.g., C:\ValheimServer). The download is about 1 GB.
  4. Wait for the installation to finish. Once done, the server files are in the folder you selected, typically under steamapps\common\Valheim Dedicated Server.

Configuring the Server

Before launching, you need to set a server name and password. This is done in the start_headless_server.bat file (Windows) or via command-line arguments. Here’s the simplest method:

  1. Navigate to the server folder. For example: C:\Program Files (x86)\Steam\steamapps\common\Valheim Dedicated Server.
  2. Right-click start_headless_server.bat and choose “Edit”. This opens Notepad.
  3. Modify the line that starts with start valheim_server. Change -name "My server" to your desired name, and -password "secret" to a password of your choice (must be at least 5 characters). You can also change the world name with -world "Dedicated" – this creates a new world if it doesn’t exist.
  4. Save the file. Close Notepad.

Example line after editing:

start valheim_server -nographics -batchmode -name "My Viking World" -port 2456 -world "Dedicated" -password "myserverpass" -public 1

The -public 1 flag makes the server appear in the community server list. Use -public 0 to keep it unlisted (friends can still join via IP).

Launching and Joining the Server

  1. Double-click start_headless_server.bat. A command window opens and the server starts. It may take a minute to generate the world.
  2. Wait for the message “Game server connected” – this means the server is ready.
  3. To join from the same PC: Open Valheim, select “Join Game”, and enter localhost as the IP (or your local IP).
  4. To join from another PC on the same network: Use the host’s local IP (e.g., 192.168.1.10).
  5. To join over the internet: You need port forwarding (see next section) and use the public IP.

Port Forwarding for Public Access

Valheim uses UDP ports 2456–2458. You must forward these to the computer running the server. The exact steps depend on your router, but the general process is:

  1. Find your router’s IP. Usually 192.168.1.1 or 192.168.0.1. Open it in a browser and log in.
  2. Locate “Port Forwarding” (sometimes under “Advanced” or “NAT”).
  3. Create three rules: for UDP ports 2456, 2457, and 2458, pointing to the local IP of the server PC.
  4. Save and reboot the router if prompted.

Note: Some routers require you to assign a static IP to the server PC, otherwise the forwarding breaks when the IP changes. You can set a static IP in Windows network settings or use DHCP reservation.

Common Problems and Fixes

  • Server doesn’t start: Check that the .bat file is not blocked by Windows. Right-click it, select Properties, and check “Unblock”. Also ensure Steam is running.
  • Friends can’t join via IP: Verify port forwarding is correct. Test with canyouseeme.org (enter port 2456). If it fails, your ISP may be blocking inbound connections.
  • Password too short: Valheim requires a minimum of 5 characters. Use a longer password.
  • World not saving: The server saves automatically every 30 minutes, but you can force a save by typing save in the server console. Back up the worlds folder periodically.
  • High ping for remote players: Choose a server location close to the majority of players, or consider a paid hosting service if your upload speed is low.

Dedicated Server vs. Peer-to-Peer

If you only play with a few friends and the host is always online, peer-to-peer works fine. But a dedicated server is better if you want persistence, modding, or if the host has a weak connection. Dedicated servers also allow players to join without the host being in-game, which is ideal for large groups or community servers.

Frequently Asked Questions

Do I need to buy Valheim again for the server?

No. The dedicated server tool is free on Steam. You only need one copy of Valheim per player, not per server.

Can I run the server on Linux?

Yes. The server has a Linux version. You can install it via SteamCMD. The configuration is similar, but you’ll use a shell script instead of a .bat file.

How do I update the server when a new patch comes out?

On Windows, simply run the .bat file – Steam will update the server automatically if you have auto-updates enabled. For Linux, use SteamCMD to update the app ID 896660.

What are the minimum specs for a dedicated server?

Officially, 2 GB RAM and a dual-core CPU are enough for a few players. For 5–10 players, 4 GB RAM and a better CPU are recommended. The server is not graphics-intensive, so a dedicated GPU is not needed.

Can I use mods on a dedicated server?

Yes, but all players must have the same mods installed. Server-side mods are placed in the server’s BepInEx folder, and clients need matching mods to avoid desync.

How do I back up my world?

Navigate to the server folder, then worlds. Copy the .db and .fwl files for your world. Store them somewhere safe. You can also automate backups with a script.