Valheim Dedicated Server: Setup, Requirements and Ports (1.0 Guide)

A Valheim dedicated server is a copy of your world that runs on its own, around the clock, for up to 10 players, whether or not the person who made it is online. To set one up, install the free Valheim Dedicated Server tool from Steam (or app 896660 through SteamCMD), put a server name, world and password on its launch line, and open UDP ports 2456–2457. It runs on Windows, Linux and macOS and wants 4–8 GB of RAM. Below is every step for Valheim 1.0, then crossplay, moving your world, admin access and the problems people actually run into.

Does Valheim have a dedicated server?

Yes. Iron Gate ships a free dedicated server program that runs on Windows, Linux and macOS, separate from the game. It’s one of two ways to host, and people mix them up with a third term. Start Server hosts the world from your own game. A dedicated server runs it on its own. A community server isn’t a third type: it’s any server listed publicly in the game’s Community list.

Start Server (from your game) Dedicated server
What keeps the world running The host’s game. The world closes when they quit The server program, on its own
Players Up to 10 Up to 10
Can friends play without the host? No Yes
Hardware The host’s PC runs the game and the world A spare PC, a VPS or a hosted server
Modifiers, backups, admins Set in the game’s menus Start parameters and three text files

What does “community server” mean in Valheim? Only that it’s public. A dedicated server started with -public 1 (the default) shows up in the Community list on the Join Game tab, whether it’s a vanilla co-op world or a roleplay server. With -public 0 it’s hidden and players join by address. If your group plays at different times, or the host’s PC can’t carry the game and the world at once, you want a dedicated server.

Valheim dedicated server requirements

A Valheim dedicated server needs a quad-core CPU around 3 GHz, 4–8 GB of RAM for the server alone, a few GB of SSD space and Windows, Linux or macOS. Memory is the number that grows. A fresh world uses about 2 GB, and each area your players are active in adds roughly 100–300 MB, so an old world with big builds needs more than a new one.

Minimum Recommended
CPU 4 cores, 2.8 GHz 6 cores, 3.4 GHz or faster
RAM (server only) 2 GB (a fresh world, barely) 4 GB or more; 8 GB for a full clan, big builds or mods
Storage 2 GB 4 GB or more, on an SSD
OS Windows 7 / Server 2016 or newer, Linux 5 or newer with glibc, macOS 10.15 or newer
Network UDP 2456–2457 reachable from the internet, or crossplay (no forwarding)
  • Clock speed beats core count. The community Docker project measured one thread doing about 70% of the work once players connect, so two fast cores do better than six slow ones. World generation is the CPU spike: it happens whenever someone explores new land.
  • Linux needs a few libraries: libatomic1, libpulse-dev and libpulse0, plus glibc 2.29 and GLIBCXX 3.4.26 or newer. On an older distro, run it in Docker instead (below).
  • Hosting on your gaming PC works for a small group, but the game and the server each want their own RAM. Keep the server on patch 1.0.20 or later: it fixed the server running at an uncapped frame rate, burning CPU, when V-Sync was on in a game client on the same computer.

How to set up a Valheim dedicated server

There are three routes: the Steam tool on Windows, SteamCMD on Windows or Linux, or a Docker image on Linux. All three install the same server program (Steam app 896660) and finish the same way. You put a server name, world and password on a launch line, start it, and wait for the console to print Game server connected. That message means it’s ready for players.

Option A: Windows, with the Steam tool

  1. In your Steam library, open the dropdown at the top left, tick Tools, scroll to Valheim Dedicated Server and click Install.
  2. Right-click it and choose Manage → Browse local files.
  3. Make a copy of start_headless_server.bat and edit the copy. Steam resets the original every time the tool updates, which is the classic “my settings disappeared” cause. Steam’s Play button only launches the original, so start your copy by double-clicking it.
  4. Set your launch line. A complete script looks like this:
    @echo off
    set SteamAppId=892970
    echo "Starting server PRESS CTRL-C to exit"
    valheim_server.exe -nographics -batchmode -name "My server" -port 2456 -world "Dedicated" -password "Secret" -public 1
  5. Run it. If Windows Firewall asks, tick every box so the server can reach the internet.
  6. To stop it, click the window and press Ctrl+C. Closing it with the X can leave it running in the background, and killing the process skips the final save, which is how progress gets “reverted”.

Option B: SteamCMD on Windows or Linux

  1. Install SteamCMD, then download the server. The same command updates it later:
    steamcmd +force_install_dir /home/valheim/server +login anonymous +app_update 896660 validate +quit

    On Windows, use a folder such as C:\valheim-server instead.

  2. On Debian or Ubuntu, install the libraries: sudo apt install libatomic1 libpulse-dev libpulse0.
  3. Copy start_server.sh to a new name and set the launch line:
    #!/bin/sh
    export templdpath=$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
    export SteamAppId=892970
    echo "Starting server PRESS CTRL-C to exit"
    ./valheim_server.x86_64 -name "My server" -port 2456 -nographics -batchmode -world "Dedicated" -password "Secret" -public 1
    export LD_LIBRARY_PATH=$templdpath
  4. Make it executable (chmod +x) and run it. Stop it with Ctrl+C, or send it SIGINT or SIGTERM from a service manager so it saves on the way out.

The password must be at least 5 characters (shorter and the server refuses to start), and the note in Valheim’s own start script adds that it can’t be part of the server name. Every launch option, from world modifiers to backup timing, is explained in Valheim server settings explained.

Option C: Docker (lloesche/valheim-server)

There’s no official Docker image, but the community one most people run is lloesche/valheim-server, now maintained as community-valheim-tools/valheim-server-docker. It downloads the server, checks for updates every 15 minutes while nobody is online, backs up worlds_local every hour and can switch on BepInEx for mods.

docker run -d --name valheim-server --cap-add=sys_nice --stop-timeout 120 \
  -p 2456-2457:2456-2457/udp \
  -v $HOME/valheim-server/config:/config \
  -v $HOME/valheim-server/data:/opt/valheim \
  -e SERVER_NAME="My server" -e WORLD_NAME="Dedicated" -e SERVER_PASS="Secret" \
  ghcr.io/community-valheim-tools/valheim-server

The server also ships its own docker_start_server.sh for distros whose glibc is too old: run ./docker_start_server.sh start_server.sh. Prefer a web panel on your own machine? AMP, a paid game server manager, supports Valheim too.

Keeping it running 24/7

A dedicated server stays up as long as the program and the machine do. On Linux, run it as a systemd service or a Docker container that restarts on boot; the Docker project ships a ready-made valheim.service. On Windows, the PC has to stay on and awake, and the window has to stay open.

Valheim server ports and port forwarding

Valheim’s dedicated server uses UDP, not TCP: port 2456 for game traffic and 2457 for the Steam query that lists it in the server browser. Forward both, UDP only, from your router to the server’s local IP, and allow them through the firewall. Change the base with -port; the server always takes that port and the next one. Crossplay servers need no forwarding.

Port Protocol Used for Forward it?
2456 UDP Game traffic. Players join with address:2456 Yes (Steam backend)
2457 UDP Steam query: server list and heartbeat Yes (Steam backend)
2458 UDP Not in the official guide’s range, but the note in Valheim’s own start_server.sh says to forward 2456–2458. The Docker project says crossplay opens it and some mods use port +2 Harmless to add
  1. Reserve a fixed local IP for the server PC in your router (DHCP reservation), so the forward doesn’t break after a reboot.
  2. Create a port forwarding rule: UDP 2456–2457 to that IP (2456–2458 if you follow the start script’s note). Valheim doesn’t use UPnP, so the router won’t do it for you.
  3. Allow the ports through the firewall. Windows, in an admin Command Prompt:
    netsh advfirewall firewall add rule name="Valheim Server" dir=in action=allow protocol=UDP localport=2456-2457

    Linux with ufw: sudo ufw allow 2456:2457/udp

  4. Test with a friend outside your network. Online port checkers often test TCP only, so a real join is the reliable test.

Still nothing? Check for CGNAT. Compare the WAN IP your router shows with the one you get from searching “what is my IP”. If they differ, or the router’s address starts with 100, your ISP shares one public IP between customers and forwarding can’t work from your side. Ask the ISP for a public IP, switch the server to crossplay (the relay works behind CGNAT; pick an unusual port in case a neighbour on the same ISP already uses 2456), or use Valheim server hosting, where the server already has a public address.

Crossplay: letting Xbox, PlayStation and Switch 2 players join

Add -crossplay to the launch line and the server moves from Steam’s backend to PlayFab, so players on any platform can join: Steam, Xbox, PlayStation 5, Nintendo Switch 2 and the Mac and Microsoft stores. Traffic goes through a relay, so no port forwarding is needed, and the server gets a join code. Console players can join a dedicated server, but they can’t run one.

  • How players connect: by your public IP and port, by the join code, or from the server list. Not by local or loopback IP, even on your own network.
  • The cost is latency. The relay is an extra hop, so crossplay servers lag and disconnect more than direct ones, more so the further players are from the relay.
  • Mods: consoles can’t install mods, and many PC mods don’t support crossplay. A modded server is usually a Steam-only server.
  • Switching modes: if you flip a server between crossplay and the Steam backend, players may need to remove it from their recent list and add it again.
  • Several crossplay servers on one machine? Give each a unique -instanceid so they get separate PlayFab IDs.

How to join a Valheim dedicated server

Players join from the Join Game tab after picking a character. Public servers appear in the Community list; private ones are added with Join IP, using the address and game port, for example 203.0.113.25:2456. Friends on your network use the server’s local IP, and someone playing on the server PC itself uses 127.0.0.1:2456. Crossplay servers also take the join code.

  1. Start Valheim and choose your character.
  2. Open the Join Game tab and find the server in the Community list, or click Join IP.
  3. Enter the public IP and port (or the join code on a crossplay server) and click Connect.
  4. Enter the server password.

Finding your server’s address: friends outside your home use your public IP (search “what is my IP” on the server’s network). On a hosted server, the address is in the control panel.

How to make yourself admin on a Valheim dedicated server

Admins are set in adminlist.txt, a plain text file in the server’s save folder next to bannedlist.txt and permittedlist.txt. Add one player ID per line in the format [Platform]_[User ID], exactly as the F2 panel in game or the server log shows it. Admins can kick, ban, save and change world modifiers from the F5 console. Cheats are a separate story.

  • Default save folder, where the three lists live: %USERPROFILE%\AppData\LocalLow\IronGate\Valheim on Windows, ~/.config/unity3d/IronGate/Valheim on Linux. -savedir moves it.
  • Putting anyone in permittedlist.txt turns it into a whitelist: everyone not on it is locked out.
  • To use the console, add -console to Valheim’s launch options in Steam, join, and press F5.
  • Cheat commands (devcommands) don’t work on a vanilla dedicated server, admin or not. The full list, and the mod admins use to get them, is in Valheim server commands.

Moving your world to a dedicated server (and picking a seed)

Yes, you can turn an existing world into a dedicated server: copy it from your PC into the server’s worlds_local folder and set -world to its name. Since Valheim 1.0 a world is a folder of chunk files rather than a single .db and .fwl pair, so copy the whole folder. A pre-1.0 world still works: the game converts it on first load and makes a backup first.

Where World save location
Windows %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local
Linux ~/.config/unity3d/IronGate/Valheim/worlds_local
macOS ~/Library/Application Support/IronGate/Valheim/worlds_local
Steam Cloud worlds Under Steam’s userdata folder, in [your ID]/892970, not in worlds_local
  1. Stop the server with Ctrl+C and quit the game, so neither is writing to the world.
  2. Copy the world: the whole folder for a 1.0 world, or both the .db and .fwl files for an older one. Zip it before uploading; a broken transfer shows up as a world with your seed but none of your buildings.
  3. Put it in the server’s worlds_local and set -world to the folder name (or the file name without the extension).
  4. Start the server and check the console for Load world followed by your world’s name.

Don’t run the same world on the server and in your game at the same time. The two copies drift apart and one side’s progress is lost.

Choosing or finding the world seed

The server gives a brand-new world a random seed. To use a seed you like, create the world in the game with that seed, load it once, then move it to the server as above. To find the seed of a server’s world, copy the world into your own worlds_local and look at the world list in the main menu: Valheim shows each world’s seed next to its name.

World modifiers and other server settings

Everything else is a start parameter too. World modifiers came to dedicated servers in patch 0.217.22: -preset picks a difficulty preset, -modifier sets one slider, and -setkey turns on options like nomap or passivemobs. Saving and backups work the same way, with -saveinterval and -backups. Every value is listed in Valheim server settings explained.

-preset hard -modifier raids none -setkey nomap

Admins can also change modifiers on a running world from the F5 console, for example setworldmodifier raids none.

How to add mods to a Valheim dedicated server

Valheim has no official mod support, so server mods run through BepInEx, usually the BepInExPack Valheim package from Thunderstore. Install the pack into the server folder, drop plugins into BepInEx/plugins, and make sure every player runs the same mods at the same versions, except server-side-only ones. Full steps, the Linux script and crossplay caveats are in how to add mods to a Valheim server.

  • Windows: the pack’s contents go at the top level of the server folder, next to valheim_server.exe.
  • Linux: start the server with the pack’s start_server_bepinex.sh instead of start_server.sh.
  • r2modman or Thunderstore Mod Manager: add %* to the end of the launch line in start_headless_server.bat, or the manager’s parameters are dropped.
  • Did it load? If BepInEx/LogOutput.log isn’t created when the server starts, no mods are running.

How to update a Valheim dedicated server

When Valheim patches, players on the new version can’t join a server on the old one; they get an incompatible version error. Update the server the way you installed it: let Steam update the Valheim Dedicated Server tool, or stop the server and run the same SteamCMD app_update 896660 validate command again. Back up worlds_local first, especially on a modded server.

  • The Docker image updates itself when no players are connected.
  • Your edited copy of the start script survives an update; the original is reset.
  • Valheim 1.0 has patched fast: 1.0.10 to 1.0.20 in five weeks. Patch 1.0.17 fixed a rare bug that could erase objects in part of a world when a large save chunk was split, so staying current matters.
  • The server keeps its own backups: by default four, one 2 hours old and three 12 hours apart (-backups, -backupshort, -backuplong). Since 1.0 each backup is its own folder.

Common Valheim server problems and fixes

Most Valheim server problems come from five things: a version mismatch after a patch, ports that aren’t really open, a password shorter than 5 characters, closing the server instead of pressing Ctrl+C, and lag from the player who runs an area. The table below covers the errors people search for most. Lag gets its own section after it, because the cause surprises most server owners.

Problem Most likely cause Fix
“Failed to connect” / can’t connect to a friend’s server Server not running, UDP 2456–2457 not forwarded, firewall, or CGNAT Wait for “Game server connected”, check the forward and firewall, or use crossplay
“Incompatible version” when joining Server and player on different builds, or a player on a Steam beta branch Update the server; players switch back to the default branch under Steam’s Betas
Server not in the Community list -public 0, or Steam hasn’t listed it yet (it checks every few minutes) Join by IP, or wait a few minutes with -public 1
Server won’t start Password under 5 characters; on Linux, missing libraries or an old glibc A longer password that isn’t part of the server name; install the libraries or use Docker
Can’t join with the local IP The server runs -crossplay Use the public IP and port, or the join code
Black screen when joining a modded server A mod built with an outdated ServerSync Update that mod; JereKuusela’s Server Sync Fix is a stopgap
Progress rolled back after a restart The server was killed instead of stopped Always stop with Ctrl+C or SIGINT/SIGTERM; lower -saveinterval
“Game server connected” never appears, servers seem down The server can’t reach Steam: no internet or DNS, or a Steam outage Check the connection; during an outage, wait or switch to crossplay
Settings gone after an update You edited the original start script Edit a copy

Why is my Valheim server lagging?

A Valheim dedicated server doesn’t simulate the world itself. Each loaded area is run by one of the players in it, and the server relays the results. If that player’s PC is weak or busy, everyone nearby sees it: chests open late, doors stick, trees fall slowly. Let the strongest PC enter busy areas first, or have the slow player leave and come back so another player takes over the area.

  • Save hitches: the world pauses briefly on each save. 1.0 shortened them by writing only the chunks that changed.
  • Draw Distance: 1.0 added a graphics setting that also sets the simulation distance. Shorter means less work for the player running the area.
  • Split groups: players spread across the map load many areas at once.
  • RAM: an old world with huge builds can outgrow 4 GB. Watch memory use before buying a bigger CPU.

Skip the setup: rent a Valheim server

Running your own Valheim dedicated server means a PC that never sleeps, forwarded ports and a launch line you retype after every mistake. If you’d rather just play, Valheim server hosting on GameTeam is ready in minutes: you pay per GB of RAM, from $0.49/GB a week, slots are unlimited, there’s nothing to forward, and a built-in AI copilot does the fiddly parts when you ask.

Type “make combat hard, turn off raids and back up the world first” and it makes the backup, edits the start parameters and restarts. Ask “why can’t my friends join?” and it reads the log, spots the version mismatch and updates the server. Valheim’s 10-player limit is the game’s own; we never charge per slot.

FAQ

Does Valheim have a server?

Yes. The Valheim Dedicated Server tool is free in Steam’s Tools section (or app 896660 through SteamCMD). You can also host from your own game with Start Server, but then the world closes when you quit.

Is a Valheim server TCP or UDP?

UDP. Forward UDP 2456 (game) and 2457 (Steam query), or whatever -port and the next port are. Nothing on TCP needs forwarding.

How many players can join a Valheim server?

10. Iron Gate builds Valheim for 1 to 10 players per world, on a dedicated server and with Start Server alike. Mods exist that raise it, but the game is made for 10.

Can you join a Valheim server without the host?

On a dedicated server, yes: the world runs on its own and anyone with the address and password can play. On a world hosted with Start Server, no.

Can you host a Valheim server for free?

Yes, if you run it yourself: the server software is free, and the only costs are a PC that stays on and its electricity. Hosted servers cost money; on GameTeam a 4 GB server is $1.96 a week.

How much does a dedicated Valheim server cost?

Self-hosting costs the hardware and power. Hosted Valheim servers are usually priced by RAM or slots; on GameTeam it’s $0.49 per GB a week on Budget ($1.99/GB billed monthly), so 8 GB is $3.92 a week with unlimited slots.

Can multiple people host a Valheim server?

Several people can be admins, and anyone with the world files can host the world. But only one machine should run it at a time. Two copies running at once drift apart, and one side’s progress is lost.

Where can I find Valheim servers to join?

In the game: open Join Game and browse the Community list. Many communities also post their server address and password on Discord or Reddit; add those with Join IP.

Which host is best for Valheim servers?

Look for a location close to your players, at least 4 GB of RAM you can raise later, no per-slot pricing, BepInEx support if you mod, and backups you can restore yourself. Fast single cores matter more than many cores.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *