
Host a Valheim Dedicated Server
A brutal exploration and survival game for 1-10 players, set in a procedurally-generated purgatory inspired by viking culture. Battle, build, and conquer your way to a saga worthy of Odin’s patronage!
Hardware Requirements
Here's what you need to run a Valheim dedicated server.
Economy
Small world, 1-3 players
Standard
Developed world, 3-6 players
Pro
Large world with builds, 6-10 players
Start hosting from your own computer
Run a Valheim server on your desktop, laptop, VPS, or dedicated machine — GameCP automates Docker setup, resource allocation, and Valheim configuration instantly. Automatic port forwarding means your friends can connect without touching your router. Start local, scale to a VPS when you're ready.
Setup in 4 Steps
Skip the manual SteamCMD installation, port forwarding, and systemd configuration. Install on your own computer and start hosting instantly.
The Manual Way vs. GameCP
Manual Setup
- ✗Install SteamCMD manually
- ✗Configure 2+ firewall ports and router settings
- ✗Write systemd service files
- ✗SSH into server to edit configs
- ✗Requires a VPS or dedicated server
- ✗30-60 minutes if experienced
With GameCP
- One-click SteamCMD install
- Automatic port forwarding — no router config
- Host from your own PC, VPS, or dedicated server
- Docker container with auto-restart
- Visual config editor in browser
- Under 5 minutes total
Under the Hood
The full manual process to host a Valheim dedicated server on a VPS. Or install GameCP on your own computer and skip all of this.
Configure & Prepare
Set your server settings, then install Docker, SteamCMD, and pull the Valheim container image.
# Update system and install Docker sudo apt update && sudo apt install -y docker.io sudo systemctl enable --now docker # Create game server directory sudo mkdir -p /opt/gameserver # Install SteamCMD sudo mkdir -p /opt/steamcmd curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | sudo tar zxvf - -C /opt/steamcmd # Server configuration export PUBLIC_SERVER="1" export ENABLE_CROSSPLAY="1" export WORLD="Dedicated" export BACKUP_INTERVAL="1800" export BACKUP_COUNT="4" export BACKUP_SHORTTIME="7200" export BACKUP_LONGTIME="43200" export AUTO_UPDATE="1" # Pull the container image docker pull ghcr.io/ptero-eggs/games:valheim
Install Server Files via SteamCMD
Download the Valheim dedicated server using Steam App ID 896660.
# Download Valheim server files (App ID: 896660) /opt/steamcmd/steamcmd.sh \ +force_install_dir /opt/gameserver \ +login anonymous \ +app_update 896660 validate \ +quit
Open Firewall Ports
Valheim requires 2 ports to be open for game traffic and queries.
sudo ufw allow 2456/both sudo ufw allow 2457/udp
Launch the Server
Start the Valheim server using the configuration from Step 1.
docker run -d \ --name valheim-server \ -p 2456:2456/both \ -p 2457:2457/udp \ -e PUBLIC_SERVER="1" \ -e ENABLE_CROSSPLAY="1" \ -e WORLD="Dedicated" \ -e BACKUP_INTERVAL="1800" \ -e BACKUP_COUNT="4" \ -e BACKUP_SHORTTIME="7200" \ -e BACKUP_LONGTIME="43200" \ -e AUTO_UPDATE="1" \ -v /opt/gameserver:/opt/gameserver \ -w /opt/gameserver \ ghcr.io/ptero-eggs/games:valheim \ ./valheim_server.x86_64 -nographics -batchmode -name "" -port 2456 -world "Dedicated" -password "" -public 1 -saveinterval 1800 -backups 4 -backupshort 7200 -backuplong 43200 > >(sed -uE "") & trap "" 15; wait $!
Alternative startup profiles:
- Crossplay Enabled — Forces crossplay on. Xbox and PC players can join. Uses PlayFab networking instead of Steam.
- Steam Only (No Crossplay) — Steam-exclusive server. Lower latency for PC players. Uses Steam networking directly.
GameCP lets you switch between these profiles with one click.
Or skip all of this
GameCP automates every step above: Docker, SteamCMD, port forwarding, startup, and config. Install on your own PC and deploy a Valheim server in under 5 minutes.
Deploy with GameCPMore Hosting Guides
Explore step-by-step setup guides for other popular games supported by GameCP.
Ready to Host Your Valheim Server?
Install GameCP on your own computer and start hosting in minutes. Automatic port forwarding, zero config — your friends connect instantly.
No credit card required · Free tier available · Install local, scale later