Valheim Dedicated Server Hosting: Setup, World Backups, Mod Management, and Performance Tuning

Published 14 min read
valheimgame-serverhostingdockerbackupsmoddingbepinex

Valheim dedicated servers are lightweight compared to most survival games, but world save corruption and mod conflicts cause the most common hosting failures. A properly configured Valheim server runs reliably for months with automated backups, managed mod updates, and minimal maintenance. This guide covers server installation, world backup strategy, BepInEx mod management, Docker deployment, and performance optimization.

As of early 2026, Valheim has sold over 14 million copies and maintains a dedicated community of players running private servers. The Ashlands and Deep North content updates have increased server resource requirements by approximately 40% compared to the original 2021 release. Servers that were stable at 2 GB RAM now need 4 GB for full-world exploration.

---

Hardware Requirements

Server SizePlayersCPURAMStorageNetwork

Small (2-4 players)42 cores4 GB5 GB SSD10 Mbps
Medium (5-8 players)84 cores8 GB10 GB SSD25 Mbps
Large (9-15 players)154 cores8 GB15 GB SSD50 Mbps
Modded (any size)104 cores8-16 GB20 GB SSD50 Mbps

Valheim RAM usage scales with world exploration. A fresh world uses 2 GB. A fully explored world with extensive building uses 4-6 GB. Heavily modded worlds with custom content can reach 8-12 GB.

---

Server Installation

<h1>Create server user</h1>

sudo useradd -m -s /bin/bash valheim

sudo su - valheim

<h1>Install SteamCMD</h1>

mkdir steamcmd && cd steamcmd

curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar xz

<h1>Install Valheim Dedicated Server</h1>

./steamcmd.sh +force_install_dir /home/valheim/server \

+login anonymous \

+app_update 896660 validate \

+quit

Launch Script

#!/bin/bash

<h1>start_valheim.sh</h1>

export SteamAppId=892970

export LD_LIBRARY_PATH="/home/valheim/server/linux64:$LD_LIBRARY_PATH"

/home/valheim/server/valheim_server.x86_64 \

-name "My Valheim Server" \

-port 2456 \

-world "MyWorld" \

-password "server_password" \

-savedir "/home/valheim/saves" \

-public 1 \

-saveinterval 1800 \

-backups 4 \

-backupshort 7200 \

-backuplong 43200

---

World Backup Strategy

Valheim world data is stored in two critical files: the .db file (world data) and the .fwl file (world metadata). Both must be backed up together.

#!/bin/bash

<h1>backup_valheim.sh</h1>

WORLD_NAME="MyWorld"

SAVE_DIR="/home/valheim/saves/worlds_local"

BACKUP_DIR="/home/valheim/backups"

TIMESTAMP=$(date +%Y%m%d_%H%M%S)

<h1>Create backup directory</h1>

mkdir -p "$BACKUP_DIR"

<h1>Backup world files</h1>

cp "$SAVE_DIR/${WORLD_NAME}.db" "$BACKUP_DIR/${WORLD_NAME}_${TIMESTAMP}.db"

cp "$SAVE_DIR/${WORLD_NAME}.fwl" "$BACKUP_DIR/${WORLD_NAME}_${TIMESTAMP}.fwl"

<h1>Compress backup</h1>

tar -czf "$BACKUP_DIR/${WORLD_NAME}_${TIMESTAMP}.tar.gz" \

-C "$BACKUP_DIR" \

"${WORLD_NAME}_${TIMESTAMP}.db" \

"${WORLD_NAME}_${TIMESTAMP}.fwl"

<h1>Remove uncompressed files</h1>

rm "$BACKUP_DIR/${WORLD_NAME}_${TIMESTAMP}.db"

rm "$BACKUP_DIR/${WORLD_NAME}_${TIMESTAMP}.fwl"

<h1>Retain last 30 backups</h1>

ls -1t "$BACKUP_DIR/${WORLD_NAME}"_*.tar.gz

tail -n +31
xargs rm -f

<h1>Optional: upload to offsite storage</h1>

<h1>rclone copy "$BACKUP_DIR/${WORLD_NAME}_${TIMESTAMP}.tar.gz" remote:valheim-backups/</h1>

echo "Backup completed: ${WORLD_NAME}_${TIMESTAMP}.tar.gz"

<h1>Cron job: backup every 2 hours</h1>

crontab -e

0 */2 * * * /home/valheim/backup_valheim.sh >> /home/valheim/backup.log 2>&1

Backup TypeFrequencyRetentionStorage per Backup

Automatic (in-game)First after 2 hours, then every 12 hours4 rolling backups5-50 MB
Scripted (external)Every 2 hours30 backups (60 hours)5-50 MB compressed
Offsite (cloud)Daily90 days5-50 MB compressed

---

Docker Deployment

<h1>docker-compose.yml</h1>

services:

valheim:

image: lloesche/valheim-server:latest

container_name: valheim

restart: unless-stopped

ports:

- "2456-2457:2456-2457/udp"

environment:

SERVER_NAME: "My Valheim Server"

WORLD_NAME: "MyWorld"

SERVER_PASS: "server_password"

SERVER_PUBLIC: "true"

BACKUPS_MAX_AGE: "3"

BACKUPS_MAX_COUNT: "30"

BACKUPS_CRON: "0 */2 * * *"

UPDATE_CRON: "0 5 * * *"

TZ: "America/New_York"

volumes:

- valheim-config:/config

- valheim-data:/opt/valheim

cap_add:

- SYS_NICE

volumes:

valheim-config:

valheim-data:

<h1>Start server</h1>

docker compose up -d

<h1>View logs</h1>

docker compose logs -f valheim

<h1>Update server</h1>

docker compose pull && docker compose up -d

---

Mod Management with BepInEx

<h1>Install BepInExPack_Valheim from Thunderstore</h1>

<h1>Take the current version from https://thunderstore.io/package/denikson/BepInExPack_Valheim/</h1>

BEPINEX_PACK_VERSION="<current-version>" # e.g. copy from the package page

cd /home/valheim/server

curl -fL "https://thunderstore.io/package/download/denikson/BepInExPack_Valheim/${BEPINEX_PACK_VERSION}/" \

-o bepinexpack.zip

TMP_DIR=$(mktemp -d)

unzip -o bepinexpack.zip -d "$TMP_DIR"

cp -r "$TMP_DIR"/BepInExPack_Valheim/. /home/valheim/server/

rm -rf "$TMP_DIR" bepinexpack.zip

chmod +x /home/valheim/server/start_server_bepinex.sh

<h1>Launch the server with the pack's start_server_bepinex.sh (copied from the pack)</h1>

<h1>instead of the vanilla start script so BepInEx loads</h1>

<h1>Install mods by placing DLLs in plugins directory</h1>

mkdir -p BepInEx/plugins

<h1>Copy mod .dll files to BepInEx/plugins/</h1>

Popular ModPurposeServer RequiredPerformance Impact

ValheimPlusQoL improvementsYesLow
BetterNetworkingConnection stabilityYesPositive
EpicLootRPG loot systemYesMedium
PlantEverythingExpanded farmingYesLow
JotunnMod framework/APIYesLow

---

Performance Optimization

IssueCauseSolution

Lag spikes every 30 minWorld save I/OUse NVMe storage, increase saveinterval
Desync with 10+ playersNetwork buffer too smallIncrease net.core.rmem_max
High RAM usageExtensive explorationIncrease RAM allocation, or start new world
Slow terrain loadingDisk I/O bottleneckMigrate from HDD to SSD/NVMe
Mod-related crashesVersion incompatibilityPin mod versions, test updates separately

For monitoring your Valheim server alongside other game servers, see our game server monitoring guide. Teams running multiple game servers should read our VPS monitoring and alerting guide. For comprehensive backup strategies beyond game servers, check our backup and disaster recovery guide.

---

Frequently Asked Questions

How many players can a Valheim server handle?

Valheim officially supports up to 10 players per server. Community mods can increase this to 30-64 players, but performance degrades significantly above 15 concurrent players. The game engine was not designed for large player counts, and network desync becomes noticeable above 10 players. For the best experience, keep player counts at or below the official limit.

How do I restore from a backup?

Stop the server first. Extract the backup archive to get the .db and .fwl files. Copy them to the worlds_local directory, replacing the existing files. Start the server. The world will load from the backup point. Always keep multiple backups because a single corrupted backup with no fallback means permanent world loss.

Do all players need the same mods?

For server-side-only mods (BetterNetworking, server configuration mods), no. For mods that add new content, items, or change game mechanics (ValheimPlus, EpicLoot), yes, all players need the same mods and versions installed. Distribute a mod pack to your players with pinned versions to avoid compatibility issues.

How do I keep the server updated?

Valheim updates automatically if using the Docker image with UPDATE_CRON set. For manual installations, run the SteamCMD install command again (app_update 896660 validate). Schedule updates during off-peak hours. After major game updates, verify all mods are compatible before starting the server, as outdated mods cause crashes.

Should I use a dedicated server or host from a client?

Always use a dedicated server for persistent worlds. Client-hosted games require the host to be online for anyone to play, have worse network performance for non-host players, and risk world corruption if the host disconnects unexpectedly. A dedicated server runs 24/7, provides consistent performance for all players, and can be backed up independently.