HomeGuidesSetting Up a Valheim Dedicated Server: Everything …
General7 min read·March 6, 2026

Setting Up a Valheim Dedicated Server: Everything You Need to Know

Complete guide to hosting a Valheim dedicated server on a VPS. Covers hardware requirements, Linux and Windows setup, crossplay configuration, world backups, and mod support.

DM

Daniel Meier

Systems Administrator

Valheim took the survival genre by storm with its Viking-themed exploration, building, and boss fights. The procedurally generated world is massive, the building system is one of the best in any survival game, and the progression through biomes keeps groups engaged for hundreds of hours. A dedicated server means your Viking world persists whether you are online or not, and your friends can log in and build while you sleep.

The Valheim dedicated server is well-optimized and runs on modest hardware. Setup is straightforward on both Linux and Windows, and the server is stable enough to run for weeks without intervention once configured properly.

Server Requirements

Valheim is surprisingly light on server resources compared to other survival games. The server handles world simulation, mob AI, and player synchronization, but the heavy lifting of rendering happens on each player's client.

2 to 5 players: 2 CPU cores, 2 to 4 GB RAM, 5 GB storage. A small group exploring and building together. This is the sweet spot for Valheim and runs on the cheapest VPS plans. Budget 10 to 20 dollars per month.

5 to 10 players: 4 CPU cores, 4 to 8 GB RAM, 10 GB storage. More players means more simultaneous world interactions and more base areas loaded at once. Budget 20 to 35 dollars per month.

Valheim officially supports up to 10 players per server. You can modify this limit, but performance and gameplay quality degrade beyond 10. The game was designed around small group cooperation, and the server reflects that.

The world seed determines the map layout but the actual world data grows as players explore. A fully explored world with extensive building can reach several gigabytes, but this takes hundreds of hours of gameplay.

Linux Server Setup
System Preparation

Start with Ubuntu 22.04 or Debian 12. Update and install dependencies:

sudo apt update && sudo apt upgrade -y
sudo apt install -y lib32gcc-s1 lib32stdc++6 curl
sudo useradd -m -s /bin/bash valheim
sudo su - valheim
Install SteamCMD and Download Valheim Server

Install SteamCMD and download the Valheim dedicated server files:

mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar xzf -
./steamcmd.sh +force_install_dir /home/valheim/server +login anonymous +app_update 896660 validate +quit

App ID 896660 is the Valheim dedicated server. The download is about 1 GB. Much smaller than most game servers.

Server Configuration

Valheim's server configuration is done through startup parameters rather than a config file. Create a startup script:

nano ~/server/start_server.sh

Add the following:

#!/bin/bash
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970

echo "Starting Valheim Dedicated Server"

./valheim_server.x86_64 \
  -name "My Valheim Server" \
  -port 2456 \
  -world "MyWorld" \
  -password "YourPassword" \
  -savedir "/home/valheim/saves" \
  -public 0 \
  -crossplay

export LD_LIBRARY_PATH=$templdpath
chmod +x ~/server/start_server.sh

Key parameters explained:

-name: The server name that appears in the server browser. Make it descriptive for your group.

-port: The base port. Valheim uses three consecutive ports: 2456, 2457, and 2458. All three must be open.

-world: The world name. This determines the save file name. Changing this creates a new world.

-password: Server password. Must be at least 5 characters and cannot contain the server name.

-savedir: Where world saves are stored. Using a custom directory makes backups easier.

-public 0: Set to 0 for a private server (not listed in browser) or 1 for public.

-crossplay: Enables crossplay between Steam and Xbox/Microsoft Store versions.

Firewall Configuration

Open the three ports Valheim needs:

sudo ufw allow 2456:2458/udp
sudo ufw allow 2456:2458/tcp
sudo ufw allow 22/tcp
sudo ufw enable
Running as a Systemd Service

Create a service file for automatic startup and crash recovery:

sudo nano /etc/systemd/system/valheim.service
[Unit]
Description=Valheim Dedicated Server
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=valheim
WorkingDirectory=/home/valheim/server
ExecStartPre=/home/valheim/steamcmd/steamcmd.sh +force_install_dir /home/valheim/server +login anonymous +app_update 896660 +quit
ExecStart=/home/valheim/server/start_server.sh
Restart=on-failure
RestartSec=15

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl daemon-reload
sudo systemctl enable valheim
sudo systemctl start valheim
sudo systemctl status valheim

The ExecStartPre line automatically checks for updates every time the server starts or restarts. This keeps your server current without manual intervention.

Windows Server Setup

Connect to your Windows VPS via Remote Desktop. Download SteamCMD for Windows and run:

cd C:\SteamCMD
steamcmd.exe +force_install_dir C:\ValheimServer +login anonymous +app_update 896660 validate +quit

Create a start_server.bat file in the server directory:

@echo off
set SteamAppId=892970
valheim_server.exe -name "My Valheim Server" -port 2456 -world "MyWorld" -password "YourPassword" -savedir "C:\ValheimSaves" -public 0 -crossplay

Open the ports in Windows Firewall:

netsh advfirewall firewall add rule name="Valheim Server" dir=in action=allow protocol=UDP localport=2456-2458
netsh advfirewall firewall add rule name="Valheim Server TCP" dir=in action=allow protocol=TCP localport=2456-2458

Run the batch file to start the server. Use Task Scheduler for automatic startup on boot.

World Management and Backups
Understanding Valheim Saves

Valheim stores world data in two files: the .fwl file (world metadata) and the .db file (actual world data). Both files are essential. The .db file grows as players explore and build. Player character data is stored locally on each player's machine, not on the server.

The server auto-saves every 20 minutes by default. During a save, players may experience a brief stutter. This is normal and unavoidable. On NVMe storage, the stutter is barely noticeable. On slower storage, it can last a second or two.

Automated Backups

Create a backup script that preserves your world data:

#!/bin/bash
# save as /home/valheim/backup.sh
DATE=$(date +%Y%m%d-%H%M)
BACKUP_DIR="/home/valheim/backups"
SAVE_DIR="/home/valheim/saves/worlds_local"
mkdir -p $BACKUP_DIR

tar czf $BACKUP_DIR/valheim-$DATE.tar.gz -C $SAVE_DIR .

# Keep 14 days of backups
find $BACKUP_DIR -name "valheim-*.tar.gz" -mtime +14 -delete

echo "Backup completed: valheim-$DATE.tar.gz"
chmod +x /home/valheim/backup.sh

# Run every 2 hours via crontab
crontab -e
0 */2 * * * /home/valheim/backup.sh
Migrating a World

To move a world from a local game to your server, copy the .fwl and .db files from your local Valheim save directory to the server's save directory. On Windows, local saves are in AppData\LocalLow\IronGate\Valheim\worlds_local. Upload both files to your server's save directory and set the -world parameter to match the world name (without the file extension).

Modding with Valheim Plus and BepInEx

Valheim has an active modding community. The two main mod frameworks are:

BepInEx: A general-purpose Unity mod framework. Most Valheim mods require BepInEx as a base. Install it by extracting the BepInEx pack into your server directory.

Valheim Plus: A popular all-in-one mod that adds quality-of-life improvements, building tweaks, and gameplay adjustments. It includes its own BepInEx installation.

To install BepInEx on the server:

cd /home/valheim/server
curl -L -o bepinex.zip https://thunderstore.io/package/download/denikson/BepInExPack_Valheim/5.4.2202/
unzip -o bepinex.zip
chmod +x start_server_bepinex.sh

Important: all players must have the same mods installed as the server. Mismatched mods cause connection failures or desync. Distribute your mod list to all players and keep versions synchronized.

Performance Optimization

Keep the world focused: Valheim loads and simulates areas around each connected player. Players spread across the map force the server to simulate multiple distant areas simultaneously. Groups that stay relatively close together put less strain on the server.

Limit building complexity: Massive builds with thousands of pieces cause the server to track more objects. The building physics system calculates structural integrity for every piece, which becomes expensive with very large structures. If the server stutters near a large build, the build is likely the cause.

Schedule restarts: A weekly restart clears accumulated memory and resets any minor issues. Valheim servers are stable enough that daily restarts are unnecessary unless you notice performance degradation.

# Weekly restart every Monday at 4 AM
0 4 * * 1 sudo systemctl restart valheim

Monitor with htop: Watch CPU and RAM usage during peak player activity. Valheim's server process should stay well under 100% CPU on a modern processor. If CPU usage is consistently high, check for mod conflicts or excessive entity counts.

Troubleshooting

Players cannot find the server in the browser: Set -public 1 in the startup parameters. If it still does not appear, have players connect directly using the IP and port (e.g., 123.45.67.89:2457). Note that the connection port is 2457, one higher than the base port.

Incompatible version error: The server and client versions must match exactly. Update the server with SteamCMD and have players update their game through Steam. The ExecStartPre in the systemd service handles server updates automatically.

World not loading or corrupted: Restore from your most recent backup. Copy the .fwl and .db files from the backup to the save directory. If no backup exists, check for .old files in the save directory, which Valheim creates as automatic backups.

High latency for distant players: Choose a VPS location central to your player group. Valheim is sensitive to latency, and players with ping above 150ms will notice rubber-banding. If your group spans continents, pick a location that minimizes the worst-case ping.

BlastVPS offers VPS hosting with NVMe storage and locations across the US and Europe, giving your Valheim server low latency and reliable performance for your Viking adventures.

Ready to Deploy?

Get a high-performance VPS with instant setup, full root access, and 24/7 support.

DM

Written by Daniel Meier

Systems Administrator

Specializes in Windows & Linux server environments with a focus on security hardening.

Continue Reading

Linux VPS

Ubuntu Server Setup Guide: Securing and Optimizing Your VPS From Scratch

7 min read

General

xRDP Guide: How to Set Up a Linux Remote Desktop on Your VPS

7 min read

VPS Hosting

How to Set Up a Satisfactory Dedicated Server on a VPS

8 min read