Game servers by the hour. Pay only when you play.

How to set up a Valheim dedicated server (2026)

A Valheim dedicated server lets you and up to 10 friends share one world that stays online when you log off. This guide covers both paths: deploy one on 2hours.gg in about 5 minutes with the world saved for you, or install and run the server binary yourself. Either way the facts are the same: install app 896660, the server presents as app 892970, and it listens on 2456 and 2457.

The fast way: deploy by the hour

You do not have to own a spare PC or leave your own machine running. Deploy a Valheim server on 2hours.gg, pick a world name, and it boots in about 5 minutes. The world is saved to your account between sessions, so you build across nights, not just within one. You pay by the hour, so there is nothing running when nobody is playing.

  • Players: Up to 10 in a session, the game cap. Tiers offer 4, 8, and 10 seats.
  • Saved world: Your world snapshots while you play and resumes next time from the Resume a saved world picker.
  • No setup: No steamcmd, no launch flags, no port forwarding. Pick a world name and go.

App ids and ports

If you run it yourself, these are the numbers that matter. The install app id and the app id the server presents as are different, which trips people up.

install app id     896660   (installs anonymously, no login)
server presents as 892970   (SteamAppId=892970 at launch)

2456/udp           game traffic, players connect here
2457/udp           Steam query / A2S, the server browser

The join password rule

Valheim will not start without a password, and the password has two rules people miss. It must be at least 5 characters, and it cannot be a substring of the server name. If you name the server Vikings and set the password vikings123, the server refuses to boot. On 2hours.gg you can leave the field empty and we generate a valid password for you, shown on your server card.

  • Length: 5 to 64 characters, no spaces.
  • Not in the name: The password cannot appear inside the server name.

Run it yourself

Install anonymously with steamcmd, then launch the binary from the install directory. Set SteamAppId=892970 and point LD_LIBRARY_PATH at the bundled libs, or the server will not start. Public 1 is what makes the server answer the Steam query port and show in the browser; it is still password gated.

# install (anonymous, no Steam login)
steamcmd +login anonymous +app_update 896660 validate +quit

# launch from the install dir
export SteamAppId=892970
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
./valheim_server.x86_64 -name "My Server" -port 2456 -world Dedicated -password mysecret -public 1

Worlds and saves

The server keeps worlds under savedir/worlds_local as a .db plus a .fwl file. Back up both together. On 2hours.gg this is handled for you: the world is saved to your account and you pick it again on your next deploy, so you never manage files.

Deploy a Valheim server by the hour

See also

← Back to all guides