bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward
eco Beginner Tutorial/How-to

Valheim Server: How Much RAM for 10 Players and How to Install Mods

calendar_month Sep 27, 2026 schedule 22 min read visibility 63 views
Сервер Valheim: сколько RAM на 10 игроков и как ставить моды
info

Need a server for this guide? We offer dedicated servers and VPS in 50+ countries with instant setup.

Need a server for this guide?

Deploy a VPS or dedicated server in minutes.

Valheim Server: How Much RAM for 10 Players and How to Install Mods

TL;DR

For a Valheim dedicated server with 10 players, 4 GB of RAM is enough with a small number of mods, but a practical reserve for 2026 is 6–8 GB RAM, 2–4 fast vCPUs, and an SSD with at least 40 GB. Below, the server is installed on Ubuntu 24.04 LTS via SteamCMD, run under a separate user, protected with a firewall and fail2ban, and mods are installed through BepInExPack Valheim with world backups before every update.

  • Minimum working configuration: 2 vCPU, 4 GB RAM, 40 GB NVMe SSD.
  • Recommended option for 10 players and a modpack: 4 vCPU, 8 GB RAM, 60–80 GB NVMe SSD.
  • UDP ports 2456–2458 are usually required for connections; TCP ports are not required for game traffic itself.
  • World data is stored separately from application files and must be regularly copied to external storage.
  • BepInEx is installed in the Valheim directory, while server-side DLL mods go into BepInEx/plugins.
  • Valheim and mods should only be updated after a backup and version compatibility check.

1. TL;DR

This section intentionally repeats the short answer in a format suitable for quick reference: if up to 10 people play on the server simultaneously, consider not only the nominal amount of RAM, but also a reserve for the operating system, mods, and temporary world load peaks.

Scenario CPU RAM Disk
Vanilla Valheim, 2–5 players 2 vCPU 4 GB 40 GB NVMe SSD
Up to 10 players, lightweight mods 3–4 vCPU 6 GB 50 GB NVMe SSD
Up to 10 players, large modpack 4 high-frequency vCPU 8 GB 60–80 GB NVMe SSD
More than 10 players or multiple worlds 4–8 vCPU 8–16 GB 80 GB or more

2. Contents

The guide is intended for a clean VPS running Ubuntu Server 24.04 LTS with x86_64 architecture. Commands are run as a user with sudo privileges unless otherwise specified.

The server version of Valheim and BepInEx change over time. The examples use SteamCMD and the Linux installation approach current for 2026, but always check specific mod versions on their release pages. Do not mix DLLs from an old game version with a new server without testing.

3. What We Are Setting Up and Why

Diagram: 3. What We Are Setting Up and Why
Diagram: 3. What We Are Setting Up and Why

The Purpose of a Valheim Dedicated Server

Valheim is a cooperative survival game in which the world continues to exist regardless of whether the world owner is in the game. If you run the server on a home computer, it will depend on electricity, home internet, NAT, and whether the computer is turned on. A dedicated server on a VPS runs around the clock, and players connect to a single permanent address.

This article creates a Linux server with a separate valheim user. Game files will be located in /opt/valheim/server, the startup configuration will be in a systemd unit, and saves will be in /opt/valheim/data. This separation simplifies updates, backups, and world recovery.

For ten players, RAM is not the only important factor. Performance is affected by the clock speed of one or two CPU cores, network latency to players, disk speed, the number of active objects in the world, and mods. Peak usage usually occurs during new area generation, mass object loading, and world saving.

What You Will Get

  • Automatic server startup after a VPS reboot.
  • Access to the world via a domain name or IP address.
  • Firewall access restricted to only the required ports.
  • BepInEx installation for server-side mods.
  • A separate startup file with the world name, password, and server visibility.
  • Daily local and external backups of saves.
  • Commands for viewing logs, checking ports, and diagnosing memory shortages.

Cloud-Managed and Self-Hosted

Cloud-managed hosting provides a ready-made control panel: the user selects a game, clicks the start button, and gets access to logs and a file manager. This is convenient if the server is needed for a short period or the administrator does not want to manage Linux. Drawbacks may include mod restrictions, paid additional resources, dependency on panel features, and less control over backups.

A self-hosted VPS requires more manual configuration, but gives you control over the OS, systemd, firewall, file structure, backup schedule, and mod selection. A VPS is suitable for a small permanent group of friends if you are ready to monitor updates and security yourself.

A home server remains an alternative. It can be cheaper if you already have the equipment, but public play requires stable upload bandwidth, port forwarding, a public IP or tunnel, and protection against outages. For players from different regions, it is usually easier to place a VPS closer to the majority of participants.

Mod Considerations

Valheim mods can be client-side, server-side, or combined. A client-side mod changes the interface or local behavior and may not be required on the server. A server-side mod runs in the dedicated server process. A combined mod must be installed on both the server and every client using a compatible version.

BepInEx is a plugin loader, not a universal compatibility guarantee. Simply running BepInEx does not mean that every mod will work on Linux or on a headless server. Before installation, read the mod requirements, Valheim version, dependency list, and dedicated server comments.

4. What VPS Configuration Is Needed for This Task

Diagram: 4. What VPS Configuration Is Needed for This Task
Diagram: 4. What VPS Configuration Is Needed for This Task

How Much RAM Does Valheim Need for 10 Players

There is no fixed official figure for “RAM per player.” Usage depends on the game version, world size, number of explored areas, number of buildings, animals, items, mods, and how long the process has been running. For a clean server with ten players, it is reasonable to start with 4–6 GB of RAM, but 6–8 GB provides a significantly larger reserve.

On a VPS with 4 GB of RAM, leave at least 700–1000 MB for the system and service processes. If you install large mods, add monitoring, a backup agent, or multiple game instances, the reserve will disappear quickly. Swap helps survive a brief peak, but it does not replace physical memory: with constantly active swap, the game process will start experiencing delays.

Practical Configuration

Component Minimum Recommended for 10 Players
CPU 2 high-frequency vCPU 4 vCPU, modern architecture
RAM 4 GB 8 GB
Disk 40 GB SSD 60–80 GB NVMe SSD
Network 100 Mbps, no strict traffic limit 1 Gbps port, sufficient monthly traffic
OS Ubuntu Server 24.04 LTS x86_64 Ubuntu Server 24.04 LTS x86_64

One possible option is a VPS with these specifications: 4 vCPU, 8 GB RAM, NVMe SSD starting at 60 GB, and a public IPv4 address. For a game server, it is advisable to confirm that the plan does not have a strict outgoing traffic limit and that incoming UDP is allowed.

When Dedicated Hardware Is Needed

A separate physical server is not required solely because of ten players. A VPS will be more practical if one world is running, there are no heavy modpacks, and virtual CPUs are acceptable. Dedicated hardware should be considered for multiple independent worlds, a large number of simultaneous players, heavy server-side mods, requirements for guaranteed performance, or the need to fully isolate resources from neighbors.

For one Valheim server with ten players, dedicated hardware will often be excessive. Its advantages become apparent when you use spare resources for multiple game services, CI, monitoring, or file storage. In that case, consider not only RAM but also CPU reserves for each process.

Choosing a Location

Choose a region based on latency to the main player group, not only geographical distance. Latency of 30–60 ms is usually comfortable, but route stability and the absence of packet loss matter more than the difference between 40 and 50 ms. Check the route with the ping and mtr commands from several client networks.

If players are in different countries, place the server closer to the center of their distribution. Valheim usually does not require ultra-low latency like a competitive shooter, but latency spikes, packet loss, and a congested channel lead to desynchronization and delays when interacting with objects.

5. Server Preparation

Diagram: 5. Server Preparation
Diagram: 5. Server Preparation

SSH Login and User Creation

After the VPS is provisioned, connect using the temporary administrative user. Do not run the game server as root: an error in a mod or script would then receive excessive permissions on the file system.

# Update the package index and install updates
sudo apt update && sudo apt full-upgrade -y

# Create a separate system user for Valheim
sudo adduser --disabled-password --gecos "" valheim

# Create the application directory and assign ownership
sudo install -d -o valheim -g valheim /opt/valheim/server /opt/valheim/data /opt/valheim/backups

# Add the administrative user to the sudo group
sudo usermod -aG sudo deploy

Replace deploy with the actual name of your administrative user. If the provider issued only root access, create a regular user and add them to the sudo group before disabling root access.

SSH Keys

Generate an Ed25519 key on your local computer if you do not already have one. A secure passphrase reduces the risk of compromise if the private key file is stolen.

# Run on your workstation
ssh-keygen -t ed25519 -C "valheim-admin"

# Copy the public key to the server
ssh-copy-id deploy@SERVER_IP

# Test key-based login
ssh deploy@SERVER_IP

After testing, open the SSH configuration and disable password login and direct root login. Before restarting the service, keep the current SSH session open and test a new one.

# Open the SSH configuration
sudoedit /etc/ssh/sshd_config.d/10-hardening.conf
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes
AllowUsers deploy
# Check syntax and reload SSH settings
sudo sshd -t && sudo systemctl reload ssh

Firewall

Valheim Dedicated Server uses a port range starting with the base port, 2456 by default. In practice, open UDP 2456–2458. Restrict SSH to your IP if it is static; otherwise, leave SSH open for the addresses from which you administer the server and be sure to use keys.

# Install basic packages, UFW, and fail2ban
sudo apt install -y ca-certificates curl wget unzip tar jq htop tmux \
    ufw fail2ban chrony rsync restic unattended-upgrades

# Allow SSH and game UDP ports
sudo ufw allow from YOUR_ADMIN_IP to any port 22 proto tcp
sudo ufw allow 2456:2458/udp

# Enable the firewall with a deny-incoming policy
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw --force enable

# Check rules
sudo ufw status verbose

If your administrative IP changes, you can use sudo ufw allow 22/tcp instead of a rule with a specific address, but this will increase the number of automated scans. Game ports do not need to be opened over TCP “just in case”: use the protocol specified by the documentation and actual logs.

Configuring fail2ban

Fail2ban analyzes logs and temporarily blocks addresses with repeated failed SSH login attempts. It does not protect Valheim against game attacks and does not replace updates, but it reduces noise from password guessing attempts.

# Create a local jail configuration for SSH
sudo tee /etc/fail2ban/jail.d/sshd.local >/dev/null <<'EOF'
[sshd]
enabled = true
port = 22
backend = systemd
maxretry = 5
findtime = 10m
bantime = 1h
EOF

# Start fail2ban and enable it at boot
sudo systemctl enable --now fail2ban

# Check the SSH protection status
sudo fail2ban-client status sshd

Swap and Basic Utilities

On a VPS with 4–8 GB of RAM, you can create a 2 GB swap file. This does not speed up the game, but it reduces the risk of the process crashing during a short spike. Do not set excessive swap on a slow disk, and monitor the vm.swappiness value.

# Create a 2 GB swap file if swap is not yet configured
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

# Make swap persistent after reboot
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

# Check memory and swap
free -h
swapon --show

Check the time on the server: correct clock settings are required for logs, certificates, and backup schedules.

# Enable time synchronization
sudo systemctl enable --now chrony

# Check clock status
timedatectl status

6. Installing Valheim and Mods — Step by Step

Diagram: 6. Installing Valheim and Mods — Step by Step
Diagram: 6. Installing Valheim and Mods — Step by Step

Step 1. Installing SteamCMD

SteamCMD is used for the Linux dedicated server. On Ubuntu 24.04, enable the i386 architecture because some SteamCMD libraries have 32-bit dependencies. The commands below install SteamCMD from the Ubuntu repository.

# Enable the 32-bit architecture for SteamCMD dependencies
sudo dpkg --add-architecture i386

# Update the package list
sudo apt update

# Install SteamCMD and required libraries
sudo apt install -y steamcmd libc6:i386 libstdc++6:i386

On some Ubuntu images, the SteamCMD package asks you to accept the license interactively. If installation ends with a license error, repeat the command in an interactive SSH session and accept the terms.

Step 2. Creating the Directory and Downloading the Server

The Valheim Dedicated Server application has Steam App ID 896660. Run SteamCMD as the valheim user so that all files immediately receive the correct owner.

# Download or update the Valheim dedicated server
sudo -u valheim /usr/games/steamcmd \
    +force_install_dir /opt/valheim/server \
    +login anonymous \
    +app_update 896660 validate \
    +quit

SteamCMD will download the latest available server version from the public branch. The validate command checks file integrity and may take several minutes. Running this command again is used for updates.

Step 3. Preparing the Save Directory

It is better to place server saves in a separate directory. This allows you to update or replace application files without affecting the world. On Linux, Valheim uses the VALHEIM_INSTALL_ROOT variable so the process knows where the server data is located.

# Check that the server executable exists
sudo -u valheim test -x /opt/valheim/server/valheim_server.x86_64 \
    && echo "Valheim server binary is present"

# Check directory ownership
sudo chown -R valheim:valheim /opt/valheim/server /opt/valheim/data

# Create a directory for logs
sudo install -d -o valheim -g valheim /var/log/valheim

Step 4. First Launch Without systemd

Before creating a permanent service, it is useful to perform a short manual launch. This lets you see dependency errors or incorrect arguments directly in the terminal.

# Start a test server in a separate session as the valheim user
sudo -u valheim env VALHEIM_INSTALL_ROOT=/opt/valheim/server \
    /opt/valheim/server/valheim_server.x86_64 \
    -name "Valheim Test" \
    -port 2456 \
    -world "DedicatedWorld" \
    -password "ChangeThisPassword123" \
    -public 1

The password must meet the game's requirements and must not match your SSH password or provider control panel password. To stop the test process, use Ctrl+C. Do not put the real password in public logs, command history, or an article.

Step 5. Installing BepInExPack Valheim

A Linux-compatible BepInExPack Valheim build is required for a modded server. Download the archive only from the project's official page on Thunderstore or from another source linked by the release author. It is not possible to reliably pin the URL of a specific version in a general article: it changes when new builds are released.

Download the archive to your local computer, verify the checksum if the author publishes one, and transfer it to the server. The archive name below is illustrative; replace it with the actual name of the downloaded file.

# On the local computer, transfer the BepInEx archive to the server
scp BepInExPack_Valheim-.zip deploy@SERVER_IP:/tmp/

# On the server, create a temporary directory for extraction
sudo install -d -o valheim -g valheim /tmp/bepinex-valheim

# Extract the archive into the temporary directory
sudo unzip -q /tmp/BepInExPack_Valheim-.zip -d /tmp/bepinex-valheim

# Review the archive structure before copying
find /tmp/bepinex-valheim -maxdepth 3 -type f | sort | head -50

Different releases may contain an additional directory such as BepInExPack_Valheim. Copy the contents of the directory that contains BepInEx, doorstop_config.ini, and the loader file. An example with a common structure:

# Copy loader files to the dedicated server directory
sudo cp -a /tmp/bepinex-valheim/BepInExPack_Valheim/. /opt/valheim/server/

# Correct ownership of all modded server files
sudo chown -R valheim:valheim /opt/valheim/server

# Check that the plugins directory exists
sudo -u valheim mkdir -p /opt/valheim/server/BepInEx/plugins

Always check the path inside the archive with the find command. If you copy the outer directory in its entirety to the wrong location, Valheim will start without BepInEx and make it appear that the mod “does not work.”

Step 6. Installing a Server Mod

Install each mod according to the author's instructions. Usually, the DLL file is placed in /opt/valheim/server/BepInEx/plugins, and the configuration appears in BepInEx/config after the first launch. Dependencies, such as a common library, are also copied into the appropriate directory.

# Transfer the DLL mod to the server from the local computer
scp ExampleServerMod.dll deploy@SERVER_IP:/tmp/

# Copy the mod to the plugins directory as root
sudo install -o valheim -g valheim -m 0644 \
    /tmp/ExampleServerMod.dll \
    /opt/valheim/server/BepInEx/plugins/ExampleServerMod.dll

# Check the list of installed plugins
sudo -u valheim find /opt/valheim/server/BepInEx/plugins \
    -maxdepth 1 -type f -name '.dll' -printf '%f\n'

Do not download random DLL files from forum attachments and do not install mods with identical names without verifying their source. A plugin has the permissions of the Valheim process and can potentially read or modify files accessible to the valheim user.

Step 7. Matching Mods with Clients

Create a simple list: mod name, exact version, dependencies, whether it is required by the client, whether it is required by the server, and installation date. Command and content mods often require an identical set on all clients. If the DLL version on the client differs from the server version, RPC errors, missing items, or inability to connect may occur.

# Save an inventory of mod files before updating
sudo -u valheim find /opt/valheim/server/BepInEx \
    -type f \( -name '.dll' -o -name '.cfg' \) -print0 \
    | sort -z | xargs -0 sha256sum \
    | sudo tee /opt/valheim/data/mod-files.sha256

7. Configuration, Startup, and Verification

Diagram: 7. Configuration, Startup, and Verification
Diagram: 7. Configuration, Startup, and Verification

Environment variables file

The password and world settings should not be stored directly in a systemd unit accessible to all users. Create the /etc/valheim/valheim.env file with permissions limited to root and the valheim group. Systemd will be able to read it at startup, while a regular user will not see the secret without administrative privileges.

# Create a protected configuration directory
sudo install -d -o root -g valheim -m 0750 /etc/valheim

# Create the environment variables file
sudo tee /etc/valheim/valheim.env >/dev/null <<'EOF'
VALHEIM_NAME=Friends Valheim
VALHEIM_PORT=2456
VALHEIM_WORLD=DedicatedWorld
VALHEIM_PASSWORD=replace-with-a-long-game-password
VALHEIM_PUBLIC=1
VALHEIM_SAVE_DIR=/opt/valheim/data
EOF

# Prevent other users from reading the file
sudo chown root:valheim /etc/valheim/valheim.env
sudo chmod 0640 /etc/valheim/valheim.env

Do not use spaces, quotation marks, or characters that may be interpreted by the shell in the password unless you understand the rules for systemd environment files. The game server password must not be shorter than the minimum requirement of the current Valheim version.

Systemd unit

Systemd provides automatic startup after reboot, graceful shutdown, and access to logs through journalctl. The Restart=on-failure setting is useful for unexpected crashes, but it should not mask an incompatible mod: analyze the logs first.

# Create the dedicated server service
sudo tee /etc/systemd/system/valheim.service >/dev/null <<'EOF'
[Unit]
Description=Valheim Dedicated Server
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=valheim
Group=valheim
WorkingDirectory=/opt/valheim/server
EnvironmentFile=/etc/valheim/valheim.env
Environment=VALHEIM_INSTALL_ROOT=/opt/valheim/server
ExecStart=/opt/valheim/server/valheim_server.x86_64 -name "${VALHEIM_NAME}" -port ${VALHEIM_PORT} -world "${VALHEIM_WORLD}" -password "${VALHEIM_PASSWORD}" -public ${VALHEIM_PUBLIC} -savedir "${VALHEIM_SAVE_DIR}"
Restart=on-failure
RestartSec=15
KillSignal=SIGINT
TimeoutStopSec=120
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

# Reload systemd unit files
sudo systemctl daemon-reload

# Start the server and enable it at boot
sudo systemctl enable --now valheim.service

# Check service status
sudo systemctl status valheim.service --no-pager

If a specific server build does not accept the -savedir parameter, remove it from ExecStart and set the save directory through a supported variable or version-specific mechanism. Check the actual help output of the binary itself rather than copying arguments from instructions for another version.

Logs and process verification

# View the last 100 log lines
sudo journalctl -u valheim.service -n 100 --no-pager

# Follow the log in real time
sudo journalctl -u valheim.service -f

# Check the running process and memory usage
ps -o pid,user,%cpu,%mem,rss,etime,cmd -C valheim_server.x86_64
free -h
df -h /opt/valheim

# Check whether game UDP ports are listening
sudo ss -lunp | grep -E '2456|2457|2458'

A successful startup does not always mean that the server is accessible from the internet. Locally, verify that the process is listening on the ports, then ensure that UFW and the provider's network firewall allow UDP 2456–2458. On the client, connect through the server list or by directly adding the address in the Steam interface.

Resource verification

During testing, start several clients, load new areas, and observe peak RSS and swap values. If RAM usage consistently exceeds 85–90 percent, first remove unused mods and check for memory leaks, then upgrade the plan.

# Install interactive process monitoring tools
sudo apt install -y sysstat

# Check CPU load, memory, and swap
vmstat 5 12

# View CPU load and disk activity
iostat -xz 5 6

Mod configuration management

After the first startup, BepInEx usually creates configs in /opt/valheim/server/BepInEx/config. Stop the server before editing if the mod does not support hot changes. Copy configs to a separate directory or version control system without secrets.

# Stop the server before changing configuration
sudo systemctl stop valheim.service

# Create a snapshot of mod configuration
sudo tar -C /opt/valheim/server -czf \
    /opt/valheim/data/bepinex-config-$(date +%F-%H%M).tar.gz \
    BepInEx/config BepInEx/plugins

# Start the server after changes
sudo systemctl start valheim.service

TLS and HTTPS for a service page

Valheim does not use HTTPS for game connections, so a TLS certificate is not needed for the game's UDP ports. If you publish a separate status webpage, webhook, or monitoring panel, do not expose it directly without protection. The simplest option is a Caddy reverse proxy with an automatic certificate for the domain.

Do not place the Valheim password or administrative APIs in a public status endpoint. Use separate authentication, IP restrictions, or a VPN for the panel. If the web service is not needed, do not install Caddy at all: the absence of an unnecessary public service reduces the attack surface.

# Install Caddy from the project's official repository
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl

curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' \
    | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg

curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' \
    | sudo tee /etc/apt/sources.list.d/caddy-stable.list

sudo apt update && sudo apt install -y caddy
# /etc/caddy/Caddyfile
status.example.org {
    reverse_proxy 127.0.0.1:8080
    encode gzip
}
# Validate the configuration and reload Caddy
sudo caddy validate --config /etc/caddy/Caddyfile
sudo systemctl reload caddy

# Open HTTPS only if the web service is actually needed
sudo ufw allow 443/tcp

To obtain a certificate, the domain must point to the VPS and incoming TCP port 443 must be accessible. Do not open port 80 unless necessary if the selected certificate issuance method does not require it; Caddy typically uses it for automatic HTTP validation and redirection.

8. Backups and Maintenance

Diagram: 8. Backups and Maintenance
Diagram: 8. Backups and Maintenance

What to save

World files, characters, and server settings are critically important. Depending on the Valheim version and startup parameters, they are located in the directory specified by -savedir, while a standard configuration may use the user's profile directory. Always determine the actual path from startup parameters and file modification times.

  • World files with the .db and .fwl extensions.
  • Character files, if the server or environment stores them locally.
  • /etc/valheim/valheim.env, but only in encrypted storage.
  • BepInEx/config and the list of DLL plugins.
  • The systemd unit and firewall settings.
  • The list of Valheim, BepInEx, and mod versions.

A backup on the same disk does not protect against disk failure, directory deletion, or VPS compromise. The minimum approach is a daily local copy plus a copy in external S3-compatible storage or on a separate server. Test restoration: an archive that has never been opened cannot be considered a verified backup.

Graceful shutdown before copying

The world may be written during gameplay. Before a full backup, it is better to stop the service, copy the data, and start it again. For ten players, a short maintenance window is usually preferable to a potentially corrupted save.

# Create a directory for daily archives
sudo install -d -o valheim -g valheim -m 0750 /opt/valheim/backups

# Stop the server and wait for the process to finish
sudo systemctl stop valheim.service

# Archive saves and mod configuration
sudo tar -C /opt/valheim -czf \
    /opt/valheim/backups/valheim-$(date +%F-%H%M).tar.gz \
    data server/BepInEx/config server/BepInEx/plugins

# Start the server after copying is complete
sudo systemctl start valheim.service

# Delete local archives older than 14 days
sudo find /opt/valheim/backups -type f -name '.tar.gz' -mtime +14 -delete

This archival scenario must be run with permissions that allow stopping the systemd service and reading the directory. For automation, create a separate root script with a fixed path rather than allowing the game user to run arbitrary commands as root.

Simple script for cron

# Create the backup script
sudo tee /usr/local/sbin/backup-valheim.sh >/dev/null <<'EOF'
#!/usr/bin/env bash
set -euo pipefail

SERVICE="valheim.service"
ROOT="/opt/valheim"
DEST="$ROOT/backups"
STAMP="$(date +%F-%H%M%S)"
ARCHIVE="$DEST/valheim-$STAMP.tar.gz"

mkdir -p "$DEST"
systemctl stop "$SERVICE"
trap 'systemctl start "$SERVICE"' EXIT

tar -C "$ROOT" -czf "$ARCHIVE" \
    data server/BepInEx/config server/BepInEx/plugins

find "$DEST" -type f -name 'valheim-.tar.gz' -mtime +14 -delete
EOF

# Restrict script execution and make it executable
sudo chown root:root /usr/local/sbin/backup-valheim.sh
sudo chmod 0750 /usr/local/sbin/backup-valheim.sh

# Add daily execution at 04:15
echo '15 4    root /usr/local/sbin/backup-valheim.sh >> /var/log/valheim-backup.log 2>&1' \
    | sudo tee /etc/cron.d/valheim-backup

The script uses trap, so the service will be started even if an error occurs after it is stopped, but you should still check notifications and archive sizes. If the archive must be sent to S3, add restic after the local archive. The restic repository should have a separate password and must not store it in plain text in a shared directory.

Restic to external storage

# Initialization is performed once with protected variables
export AWS_ACCESS_KEY_ID='replace-me'
export AWS_SECRET_ACCESS_KEY='replace-me'
export RESTIC_PASSWORD='replace-with-a-long-repository-password'
export RESTIC_REPOSITORY='s3:https://s3.example.org/valheim-backups'

# Create the restic repository
sudo -E restic init

# Upload saves and configuration
sudo -E restic backup /opt/valheim/data /opt/valheim/server/BepInEx/config

# Remove old restore points and check the repository
sudo -E restic forget --keep-daily 14 --keep-weekly 8 --keep-monthly 6 --prune
sudo -E restic check

For ongoing use, store restic variables in a file with 0600 permissions or use a secrets manager. Do not add such a file to Git or pass keys on the command line if they may end up in shell history or the process list.

Updating Valheim and mods

Valheim does not have a traditional rolling update for a single game world: one process version and one set of files run at a time. Use a maintenance window. Notify players, stop the server, create a backup, update files through SteamCMD, then update incompatible mods one at a time.

# Stop the server before updating
sudo systemctl stop valheim.service

# Update the dedicated server and verify files
sudo -u valheim /usr/games/steamcmd \
    +force_install_dir /opt/valheim/server \
    +login anonymous \
    +app_update 896660 validate \
    +quit

# Review new errors before running normally
sudo systemctl start valheim.service
sudo journalctl -u valheim.service -n 150 --no-pager

If the game has updated but a mod has not, it is safer to temporarily remove the problematic plugin and start a vanilla server than to try using an incompatible DLL on the main world. For experiments, create a copy of the world with a different name and test the modpack on it.

9. Troubleshooting and FAQ

The server is not visible in the list, although the service is running. What should I check?

First, run systemctl status valheim and make sure the process is not restarting in a loop. Then check ss -lunp | grep 2456, the ufw status rules, and the provider's external firewall. Open UDP 2456–2458, verify the correct public IPv4, and do not use a TCP rule instead of UDP. If the server is hidden, check the -public 1 parameter and try connecting directly through Steam.

What is the minimum suitable VPS configuration for 10 players?

For vanilla Valheim and a small group, a VPS with 2 vCPU, 4 GB RAM, an SSD of at least 40 GB, and a public IPv4 will work. This is the lower limit, not a comfortable universal standard: during world generation and when using mods, available memory may run out quickly. A safer choice is 4 vCPU and 8 GB RAM. Keep at least 1–2 GB in reserve, monitor swap, and upgrade the plan based on measurements rather than guesses.

What should I choose for this task — VPS or dedicated?

For one Valheim world with ten players, a VPS is usually sufficient. It is cheaper, easier to scale, and does not require managing a physical server. Dedicated is justified if multiple worlds, heavy modpacks, other games are running, or guaranteed performance without interference from neighboring virtual machines is required. First measure CPU steal time, RAM, disk latency, and network loss on the VPS; move to dedicated if these specific metrics are causing the problem.

The mod is installed, but BepInEx does not load it. What is the reason?

Check the DLL location: the server plugin should usually be placed directly in /opt/valheim/server/BepInEx/plugins, not in a nested directory inside the archive. Review the journalctl -u valheim log and files in BepInEx/LogOutput.log. Check the owner, Linux build architecture, dependencies, and compatibility with the current Valheim version. After changing plugins, fully restart the service rather than simply reconnecting with the client.

Players are getting disconnected, and lag and desynchronization occur. What should I measure?

First compare CPU load, RSS, swap, and disk latency at the time of the issue: vmstat 5, iostat -xz 5, and journalctl. From the client, run mtr -rw SERVER_IP to identify packet loss and route spikes. Within the game, thousands of structures, items, animals, or a mod creating a large number of objects can also be the cause. Increasing RAM will not fix packet loss or an overloaded single CPU.

After rebooting, the world starts empty or rolls back. How can I restore it?

Do not continue playing in the corrupted state so that you do not overwrite the working copy. Stop the service and determine the actual save directory from ExecStart, the VALHEIM_SAVE_DIR variable, and logs. Compare the dates of the .db and .fwl files, then restore the latest verified pair from the archive. After restoration, start the server with the same world name and the same mods used when creating the backup.

Can mods be installed only on the server?

Sometimes, but it depends on the type of mod. Server plugins that change rules, commands, or world saving may work only on the dedicated server. Mods that add a client interface, visual effects, or new network messages usually require installation on all clients. Follow the instructions for the specific project. Keep identical DLL and dependency versions, otherwise some players may encounter login errors or an incorrect world state.

Is HTTPS required for a Valheim game server?

No. The game dedicated server uses its own network protocols and UDP ports, while HTTPS neither encrypts nor serves this traffic. TLS is needed only for a separate web panel, status endpoint, webhook, or monitoring if they are accessible through a domain. Such a service should be proxied through Caddy or another reverse proxy, administrative routes should be closed, and game secrets should not be published. If there is no web interface, it is sufficient not to open TCP 80 and 443.

10. Conclusions and next steps

Diagram: 10. Conclusions and next steps
Diagram: 10. Conclusions and next steps

For Valheim with ten players, a practical benchmark is a VPS with 4 vCPU, 8 GB RAM, and a fast SSD. The server is installed through SteamCMD, runs as a separate user under systemd, and mods are enabled through BepInEx with mandatory compatibility checks.

Next, configure monitoring for RAM, CPU, disk, and network loss, then regularly verify backup restoration. As the world or modpack grows, first test changes on a copy of the save, and only then update the production server. If multiple worlds or other services are added, separate them into systemd services and review resource limits.

Was this guide helpful?

Your feedback helps us improve our guides.

Share this post:

Send this guide to someone who may find it useful.

Telegram VKVK WhatsApp Facebook LinkedIn XX

Valheim server: how much RAM for 10 players and how to install mods
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.