Workload · Hosting a Valheim world

A Valheim dedicated server your whole crew can count on

To keep a Valheim world online for your friends, you run Iron Gate's free dedicated server program on a machine that stays on: install it with SteamCMD, start it from your own copy of the launch script with a world name and password, and either open ports 2456-2457 or switch on crossplay so players reach it through a relay. Iron Gate doesn't say how much CPU or memory it needs, so you find that out from your own world.

The short version
  1. The world stays up when the host player logs off
  2. Crossplay lets every platform in without port forwarding
  3. Valheim's own automatic backups, plus copies you keep off the server
  4. A whole machine: nobody else on it, no contract

Why your group outgrows hosting from a PC

When one friend hosts from their own computer, the world exists only while they're playing. The moment they log off, the rest of you are locked out of the base you built together. A dedicated server is the same game world, run by a program with no player attached, on a computer that never sleeps.

That program is free. Iron Gate ships it as "Valheim Dedicated Server" in Steam's Tools list, and on Linux you fetch it with SteamCMD, Valve's command-line installer, using app number 896660.

How big a server do you need?

Nobody can give you an official number, because Iron Gate doesn't publish one: its guide lists libraries and ports and says nothing about cores or gigabytes. So be wary of any page that quotes a precise figure as if it came from the developer.

What you can do is watch your own world. Play a normal evening with everyone online, ideally scattered across different biomes, and see how much memory the server process holds and how busy its cores get. Check again after a few weeks: as you build bigger bases and explore more of the map, the world file grows, and so does every save.

On a server you rent whole, the numbers you see are honest. No other customer is on the machine, so if memory runs short it's your world asking for more, and on our machines memory can be added later to the same server without moving it or changing its IP address.

Up and running in an evening

These steps assume an Ubuntu server and a user account you can sudo from. Iron Gate's guide asks for three extra packages besides what SteamCMD needs.

  1. Check the system is recent enough: Iron Gate needs GLIBC 2.29 and GLIBCXX 3.4.26 or newer. ldd --version shows the first; a current Ubuntu passes.
  2. Install SteamCMD (it lives in Ubuntu's multiverse section and needs 32-bit support switched on) along with libatomic1, libpulse0 and libpulse-dev.
  3. Create a separate user for the game so it never runs as root, then download the server into that user's home folder.
  4. Copy start_server.sh to a new name and edit the copy; updates overwrite the original.
  5. Start your copy and wait for the line 'Game server connected'. Your world is live.
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steamcmd libatomic1 libpulse0 libpulse-dev
sudo useradd -m -s /bin/bash viking
sudo -u viking /usr/games/steamcmd +force_install_dir /home/viking/valheim \
  +login anonymous +app_update 896660 validate +quit
sudo -u viking cp /home/viking/valheim/start_server.sh /home/viking/valheim/run_ours.sh

If the download stalls at the login step, the anonymous login may be the cause. In November 2024 players reported that SteamCMD briefly stopped returning this app to anonymous logins, and that a throwaway Steam account didn't help either. It started working again a few days later. If it happens to you, wait and retry. One player fixed it by deleting the steamapps folder in the install directory and running the download again.

The settings that matter on day one

Everything is set on one line of your copied script, the line that launches the server. Here is a launch line for a private world that also lets console friends in:

./valheim_server.x86_64 -name "Ashlands Crew" -port 2456 -world "Crew" -password "pick-something-long" -public 0 -crossplay -savedir /home/viking/worlds -saveinterval 1800 -backups 4
  • -name is what people see in the server list; -world is the save it loads, created fresh if it doesn't exist yet.
  • -password keeps strangers out. -public 0 hides the server from the browser so friends join by address or code; 1 lists it.
  • -crossplay switches to the PlayFab backend so players on any platform can join. Leave it off and the server is visible to Steam players alone.
  • -savedir puts your worlds in a folder you choose instead of the default ~/.config/unity3d/IronGate/Valheim.
  • -saveinterval is seconds between saves (1800, half an hour, by default); -backups is how many automatic backups to keep.

Letting your friends in

You have two ways in, and the choice changes what you need to open.

Steam backend (default)Crossplay (-crossplay)
Who can joinSteam players onlyPlayers on any platform
Ports to openYour port and the next one, 2456-2457 by defaultNone; traffic goes through a relay
How to connectServer list or IP and portJoin code, public IP plus port, or the list
Local IP joinsWorkDon't work

Iron Gate's guide names the ports but not the protocol; Valheim's game traffic runs over UDP, so a firewall rule such as sudo ufw allow 2456:2457/udp covers the Steam backend. With crossplay on, the port number still matters: it tells apart several servers sharing one public address.

Keeping your world safe

The server already makes backups on its own. With the default -backups 4, it keeps one copy two hours old and three more twelve hours apart. That covers a bad raid or a mistake, but not a dead disk, because the backups sit next to the world itself. Copy the save folder somewhere else on a schedule too.

Always stop the server the way Iron Gate asks: Ctrl+C in its window, which lets it save first. To keep the world running in the background and starting by itself after a reboot, save a service file like this as /etc/systemd/system/valheim.service, with your own user and paths:

[Unit]
Description=Valheim world
Wants=network-online.target
After=network-online.target

[Service]
User=viking
WorkingDirectory=/home/viking/valheim
ExecStart=/home/viking/valheim/run_ours.sh
KillSignal=SIGINT
TimeoutStopSec=120
Restart=on-failure

[Install]
WantedBy=multi-user.target

# then:
# sudo systemctl daemon-reload && sudo systemctl enable --now valheim

The unit sends SIGINT, the same signal as Ctrl+C, and waits up to two minutes for the save to finish (TimeoutStopSec); raise that if your world is large.

To choose who's in charge, add Platform User IDs, one per line, to adminlist.txt, bannedlist.txt or permittedlist.txt in the save folder. Careful with the last one: once anyone is on the permitted list, everyone else is turned away.

The server that fits

With bare metal game servers, your world gets a whole physical machine on HPE enterprise hardware, with a port nobody else shares at the switch and people to talk to by live chat, email or phone at any hour. A machine already in the rack is yours in about 30 minutes once the order is approved; payment verification can add to that.

The port is unmetered, so there's no traffic allowance for a busy weekend to burn through. There are two European cities (Amsterdam, Bucharest) and three American ones (New York, Miami, San Francisco); pick whichever sits closest to most of your group, and the locations page helps you compare them. There's no long contract: pay monthly and stop when the saga ends. If you already host a Palworld world, the same machine can carry both.

Questions people ask

Is the Valheim server software free?
Yes. Iron Gate distributes the dedicated server as a free Steam tool, and SteamCMD downloads it as app 896660. The only cost is the machine underneath it.
Do I have to forward ports?
Only on the Steam backend, where your port and the one after it (by default 2456 and 2457) must reach the server. Start it with -crossplay and players connect through a relay, so no forwarding is needed.
Where will I find my world files?
On Linux, look in ~/.config/unity3d/IronGate/Valheim inside the home folder of whichever account runs the server. If you used -savedir, they're in the folder you named instead, together with the admin, ban and permitted lists.
Can my friends on Xbox play on it?
Turn on -crossplay. Iron Gate's guide says that backend lets players from any platform join, while the default Steam backend admits Steam users only.
How do I update the server after a game patch?
Stop it cleanly, run the same SteamCMD command again to fetch the new build, and start it. Because you edited a copy of the launch script, your settings survive the update.

Give your Valheim world a home

A whole server near your crew, with no contract and a person on hand around the clock.

Start your world

Read next