HomeStart / GuidesAnleitungen / Running a Valheim dedicated server on a Linux VPS (SteamCMD, systemd, crossplay)/ Einen Valheim-Dedicated-Server auf einem Linux-VPS betreiben (SteamCMD, systemd, Crossplay)

Running a Valheim dedicated server on a Linux VPS (SteamCMD, systemd, crossplay)Einen Valheim-Dedicated-Server auf einem Linux-VPS betreiben (SteamCMD, systemd, Crossplay)

The Valheim server is free, runs headless on Linux, and has three details that will eat your evening if nobody tells you: the app ID is not the one you expect, the ports are UDP, and it needs SIGINT to save.Der Valheim-Server ist kostenlos, läuft headless unter Linux und hat drei Details, die dir den Abend fressen, wenn dir das niemand vorher sagt: Die App-ID ist nicht die, die du erwartest, die Ports sind UDP, und er braucht SIGINT, um zu speichern.

What you are installingWas du installierst

The dedicated server is a separate Steam application from the game. You do not need a second copy of Valheim and you do not need to be logged in as yourself:Der Dedicated Server ist eine eigene Steam-Anwendung, getrennt vom Spiel. Du brauchst keine zweite Kopie von Valheim, und du musst nicht als du selbst eingeloggt sein:

The server caps at 10 players, which is the game's own limit, not a hosting one.Der Server deckelt bei 10 Spielern, was das eigene Limit des Spiels ist, nicht eines des Hostings.

Sizing it honestlyEhrlich dimensionieren

Valheim's world simulation leans hard on single-thread performance. Extra cores do very little; clock speed and steady CPU do a lot. That means a modest VPS with decent per-core performance beats a wide, slow one for this workload.Die Weltsimulation von Valheim setzt stark auf Single-Thread-Performance. Zusätzliche Kerne bringen sehr wenig; Taktrate und gleichmäßige CPU bringen viel. Das heißt, ein bescheidener VPS mit ordentlicher Pro-Kern-Leistung schlägt bei dieser Last einen breiten, langsamen.

For memory, 4 GB is a realistic floor for a small group. A brand-new world with two people will run in less; a two-year-old world with a large base, a lot of dropped items and terrain modification will not. The world file grows steadily over months, so size for where the world is going.Beim Arbeitsspeicher sind 4 GB eine realistische Untergrenze für eine kleine Gruppe. Eine nagelneue Welt mit zwei Leuten läuft auch mit weniger; eine zwei Jahre alte Welt mit einer großen Basis, vielen abgelegten Items und Terrain-Veränderung nicht. Die Weltdatei wächst über Monate stetig, dimensioniere also dafür, wohin sich die Welt entwickelt.

Step 1: the machineSchritt 1: die Maschine

Deploy an Ubuntu LTS image, then do the security basics before anything is exposed: non-root user, SSH key, password login off, firewall default deny. We wrote those up as connect to your VPS over SSH and secure your VPS.Setze ein Ubuntu-LTS-Image auf und erledige dann die Sicherheitsgrundlagen, bevor irgendetwas exponiert ist: Non-Root-User, SSH-Key, Passwort-Login aus, Firewall standardmäßig blockierend. Wir haben das aufgeschrieben unter über SSH mit deinem VPS verbinden und deinen VPS absichern.

SteamCMD is 32-bit, so on a 64-bit Debian or Ubuntu you need the multilib runtime even though the server binary itself is 64-bit:SteamCMD ist 32-Bit, daher brauchst du auf einem 64-Bit-Debian oder -Ubuntu die Multilib-Runtime, obwohl das Server-Binary selbst 64-Bit ist:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 curl tar
sudo useradd -m -s /bin/bash valheim

Step 2: install with SteamCMDSchritt 2: Installation mit SteamCMD

Never run a game server as root. Everything below happens as the valheim user.Betreibe einen Game-Server niemals als root. Alles Folgende geschieht als der Nutzer valheim.

sudo -u valheim -i
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sSL https://media.steampowered.com/client/installer/steamcmd_linux.tar.gz | tar zxf -
./steamcmd.sh +force_install_dir /home/valheim/server \
              +login anonymous \
              +app_update 896660 validate \
              +quit

The same command updates the server later. Run it after every game patch — clients on a newer build simply cannot connect to an older server.Derselbe Befehl aktualisiert den Server später. Führe ihn nach jedem Spiel-Patch aus — Clients mit einem neueren Build können sich schlicht nicht mit einem älteren Server verbinden.

Step 3: the start scriptSchritt 3: das Startskript

This is where the classic hour disappears. Save as /home/valheim/server/start.sh:Hier verschwindet klassischerweise eine Stunde. Speichere es als /home/valheim/server/start.sh:

#!/bin/bash
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970          # the GAME id, not the server id

./valheim_server.x86_64 \
  -nographics -batchmode \
  -name "My Server" \
  -port 2456 \
  -world "Midgard" \
  -password "correcthorse" \
  -crossplay \
  -public 1 \
  -savedir /home/valheim/data

export LD_LIBRARY_PATH=$templdpath

SteamAppId must be 892970, the game's ID, not the server's. Set it wrong or leave it out and the server starts, prints nothing obviously wrong, and never becomes joinable.SteamAppId muss 892970 sein, die ID des Spiels, nicht die des Servers. Setzt du sie falsch oder lässt sie weg, startet der Server, gibt nichts offensichtlich Falsches aus und wird nie beitretbar.

The password rules are enforced and undocumented in-game: at least five characters, and it must not appear inside the server name or the world name. Break either rule and the process exits at startup with a message that is easy to miss in the Unity log noise.Die Passwortregeln werden erzwungen und sind im Spiel nicht dokumentiert: mindestens fünf Zeichen, und es darf nicht im Servernamen oder im Weltnamen vorkommen. Verstößt du gegen eine der beiden Regeln, beendet sich der Prozess beim Start mit einer Meldung, die im Unity-Log-Rauschen leicht zu übersehen ist.

Step 4: ports, and why your friends cannot see itSchritt 4: Ports, und warum deine Freunde ihn nicht sehen

Two UDP ports matter: 2456 (game) and 2457 (Steam query). Older guides list 2458 as well; it is harmless to open and not needed.Zwei UDP-Ports zählen: 2456 (Spiel) und 2457 (Steam-Query). Ältere Anleitungen führen auch 2458 auf; das zu öffnen ist harmlos und nicht nötig.

sudo ufw allow 2456:2457/udp

UDP, not TCP. A firewall rule that opens 2456 as TCP is the single most common cause of "the server is running but nobody can join". If the process is up, the world loaded, and the server browser shows nothing, check the protocol before you change anything else.UDP, nicht TCP. Eine Firewall-Regel, die 2456 als TCP öffnet, ist die mit Abstand häufigste Ursache für „der Server läuft, aber niemand kann beitreten“. Läuft der Prozess, ist die Welt geladen, und der Server-Browser zeigt nichts, prüfe das Protokoll, bevor du sonst etwas änderst.

If your VPS gives you NAT IPv4 rather than an address of your own, you cannot open arbitrary ports — you get a fixed set of forwarded ones. Two ways through that: ask for a dedicated IPv4 (on our plans that is available on request by e-mail rather than as a self-service add-on), or use crossplay, which hands out a join code and routes the connection for you instead of relying on the direct address. Background on the trade-off in NAT IPv4 vs a dedicated IP and NAT IPv4, ports and forwarding.Gibt dir dein VPS NAT-IPv4 statt einer eigenen Adresse, kannst du keine beliebigen Ports öffnen — du bekommst einen festen Satz weitergeleiteter. Zwei Wege daran vorbei: eine dedizierte IPv4 anfragen (bei unseren Tarifen auf Anfrage per E-Mail verfügbar, nicht als Self-Service-Add-on), oder Crossplay nutzen, das einen Beitrittscode ausgibt und die Verbindung für dich routet, statt sich auf die direkte Adresse zu verlassen. Hintergrund zu dieser Abwägung in NAT IPv4 vs. dedizierte IP und NAT IPv4, Ports und Weiterleitung.

Step 5: systemd, with the stop signal that mattersSchritt 5: systemd, mit dem Stopp-Signal, auf das es ankommt

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

[Service]
Type=simple
User=valheim
WorkingDirectory=/home/valheim/server
ExecStart=/home/valheim/server/start.sh
Restart=on-failure
RestartSec=10
KillSignal=SIGINT
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target

KillSignal=SIGINT is the important line. The server saves the world on a clean interrupt; killed with the default SIGTERM it can go down mid-save and hand you back a world missing the last stretch of play. TimeoutStopSec=120 gives that save room to finish on a big world.KillSignal=SIGINT ist die wichtige Zeile. Der Server speichert die Welt bei einem sauberen Interrupt; mit dem Standard SIGTERM beendet, kann er mitten im Speichern abbrechen und dir eine Welt zurückgeben, der das letzte Stück Spielzeit fehlt. TimeoutStopSec=120 gibt diesem Speichervorgang bei einer großen Welt genug Zeit, fertig zu werden.

Then sudo systemctl enable --now valheim and watch it with journalctl -u valheim -f.Dann sudo systemctl enable --now valheim, und beobachte ihn mit journalctl -u valheim -f.

Step 6: saves, admins and backupsSchritt 6: Spielstände, Admins und Backups

With -savedir set as above the world lives under /home/valheim/data/worlds_local/. Two files per world and you need both:Mit -savedir wie oben gesetzt liegt die Welt unter /home/valheim/data/worlds_local/. Zwei Dateien pro Welt, und du brauchst beide:

Alongside them sit adminlist.txt, permittedlist.txt and bannedlist.txt, one SteamID64 per line. Add yourself to adminlist.txt and restart to get the console commands.Daneben liegen adminlist.txt, permittedlist.txt und bannedlist.txt, eine SteamID64 pro Zeile. Trag dich selbst in adminlist.txt ein und starte neu, um die Konsolenbefehle zu bekommen.

The server writes its own rolling backups (-backups, -backupshort, -backuplong tune how many and how often), which is genuinely useful — but they land on the same disk as the world. That protects you from a corrupted save, not from losing the machine. Copy them somewhere else on a schedule; back up your VPS covers what that looks like and what is not included by default anywhere.Der Server schreibt seine eigenen rollierenden Backups (-backups, -backupshort, -backuplong stellen ein, wie viele und wie oft), was wirklich nützlich ist — aber sie landen auf derselben Festplatte wie die Welt. Das schützt dich vor einem beschädigten Spielstand, nicht vor dem Verlust der Maschine. Kopiere sie nach einem Zeitplan woandershin; Backup deines VPS beschreibt, wie das aussieht und was standardmäßig nirgends enthalten ist.

Step 7: mods, brieflySchritt 7: Mods, kurz

BepInEx is the loader almost everything builds on. The rule that catches people: server-side mods usually require every client to run the same version, so a mod update that lands for one player kicks the rest until they catch up. Pin your versions, tell your group before you change anything, and keep an unmodded backup of the world from before you started.BepInEx ist der Loader, auf dem fast alles aufbaut. Die Regel, die Leute erwischt: serverseitige Mods verlangen meist, dass jeder Client dieselbe Version fährt, sodass ein Mod-Update, das bei einem Spieler landet, die anderen rauswirft, bis sie nachziehen. Pinne deine Versionen, informiere deine Gruppe, bevor du etwas änderst, und bewahre ein ungemoddetes Backup der Welt von vor dem Start auf.

On overnight.hostBei overnight.host

Full disclosure: this is what we sell. Size by RAM rather than by price — a world for a few players wants roughly 4 GB, so take the tier that gives you that instead of the cheapest one.Zur vollen Transparenz: Das ist, was wir verkaufen. Dimensioniere nach RAM, nicht nach Preis — eine Welt für ein paar Spieler will etwa 4 GB, also nimm den Tarif, der das liefert, statt den billigsten.

Linux KVM VPS — EUR 4.99 to EUR 59.99 a month, on our own single-tenant bare metal in Dallas, TX and Charlotte, NC. Full hardware virtualisation (KVM), your own kernel, full root. Six tiers, vps-starter to vps-ultra. Starter is 1 vCPU, 1 GiB RAM, 25 GB disk.Linux-KVM-VPS — 4,99 bis 59,99 EUR im Monat, auf unserer eigenen Single-Tenant-Bare-Metal-Hardware in Dallas, TX und Charlotte, NC. Vollständige Hardware-Virtualisierung (KVM), eigener Kernel, volles Root. Sechs Tarife, vps-starter bis vps-ultra. Starter hat 1 vCPU, 1 GiB RAM, 25 GB Speicher.

You order in the shop, pay by card (Stripe) or SEPA bank transfer, and your login details are e-mailed to you once the service is set up. Support is e-mail, run by one person, with no guaranteed response time. All prices are final totals under the German small-business rule (§19 UStG); no VAT is added or shown.Du bestellst im Shop, zahlst per Karte (Stripe) oder SEPA-Überweisung, und deine Zugangsdaten werden dir per E-Mail zugeschickt, sobald der Dienst eingerichtet ist. Support läuft per E-Mail, von einer einzelnen Person betrieben, ohne garantierte Reaktionszeit. Alle Preise sind Endpreise. Gemäß § 19 UStG wird keine Umsatzsteuer ausgewiesen.

Order vps-starter → · Linux KVM VPS overviewvps-starter bestellen → · Übersicht Linux-KVM-VPS

Written by the person who runs overnight.host: a small, honest hosting company on dedicated bare metal — Linux VPS, game servers, web hosting. Live status at up.overnight.host.Geschrieben von der Person, die overnight.host betreibt: ein kleines, ehrliches Hosting-Unternehmen auf dedizierter Bare-Metal-Hardware — Linux-VPS, Gameserver, Webhosting. Live-Status unter up.overnight.host.

Technical guidance is informational. Plans, specifications and final prices are listed in the shop and can be ordered directly; VPS, game server, web hosting, one-click app and automation plans are provisioned automatically after payment. Custom configurations are still arranged by e-mail.Technische Hinweise dienen der Information. Pläne, Spezifikationen und Endpreise stehen im Shop und können direkt bestellt werden; VPS-, Gameserver-, Webhosting-, One-Click-App- und Automatisierungs-Pläne werden nach der Zahlung automatisch bereitgestellt. Sonderkonfigurationen werden weiterhin per E-Mail vereinbart.

FAQFAQ

How much RAM does a Valheim server need?Wie viel RAM braucht ein Valheim-Server?

About 4 GB for a small group on a healthy world. Less will run a fresh world with two players; more is worth it once the base is large or the world is old. Memory use tracks world size and build density more than player count.Etwa 4 GB für eine kleine Gruppe auf einer gesunden Welt. Weniger lässt eine frische Welt mit zwei Spielern laufen; mehr lohnt sich, sobald die Basis groß oder die Welt alt ist. Der Speicherverbrauch folgt eher der Weltgröße und der Bebauungsdichte als der Spielerzahl.

Which ports does Valheim use?Welche Ports nutzt Valheim?

2456 and 2457 over UDP — the game port and the Steam query port. Some setups also list 2458. If the server is running but invisible, check that the rule is UDP and not TCP.2456 und 2457 über UDP — der Spiel-Port und der Steam-Query-Port. Manche Setups führen auch 2458 auf. Läuft der Server, ist aber unsichtbar, prüfe, ob die Regel UDP ist und nicht TCP.

Do I need to own the game to run the server?Muss ich das Spiel besitzen, um den Server zu betreiben?

No. The dedicated server is a separate free Steam application (896660) and installs with +login anonymous. You do need the game to play, of course.Nein. Der Dedicated Server ist eine eigene kostenlose Steam-Anwendung (896660) und installiert sich mit +login anonymous. Um mitzuspielen, brauchst du das Spiel natürlich schon.

Why does my server start and then immediately stop?Warum startet mein Server und stoppt dann sofort wieder?

Nine times out of ten it is the password: it must be at least five characters and must not appear inside the server name or the world name. After that, check that SteamAppId is set to 892970.Neunmal von zehn ist es das Passwort: Es muss mindestens fünf Zeichen haben und darf nicht im Servernamen oder im Weltnamen vorkommen. Prüfe danach, ob SteamAppId auf 892970 gesetzt ist.

Does crossplay change how I connect?Ändert Crossplay, wie ich mich verbinde?

Yes. With -crossplay the server registers through the cross-platform service and players join with a code rather than by address, which is also the practical workaround when you cannot open arbitrary ports.Ja. Mit -crossplay registriert sich der Server über den plattformübergreifenden Dienst, und Spieler treten per Code statt per Adresse bei — das ist auch der praktische Workaround, wenn du keine beliebigen Ports öffnen kannst.

Ready to order?Bereit zu bestellen?

Prices are final totals; no VAT is shown (§19 UStG). Need something the shop does not list? Email us for a written offer.Alle Preise sind Endpreise ohne ausgewiesene USt. (§19 UStG). Du brauchst etwas, das nicht im Shop steht? Schreib uns für ein schriftliches Angebot.

Order now →Jetzt bestellen → Request a custom configIndividuelle Konfiguration anfragen