guide · PC

Valheim: dedicated server setup, ports and crossplay

Build a persistent world for your group. Find the Steam server tool, protect your startup settings, choose a networking backend, and check access before inviting friends.

Valheim official gameplay screenshot
Official Valheim imagery. Illustrative, not a screenshot of this procedure. Media credits

1. Install the server tool, not a second game client

In your Steam Library, include Tools in the library filter, then find Valheim Dedicated Server and install it. This is the dedicated-server application, separate from starting a world inside your normal game session. A dedicated server keeps the world available while the server application is running. It does not remove the need to maintain the host machine or its network connection. Decide which computer will host the world before you begin, and keep server administration separate from ordinary player access.

2. Copy the startup script before editing

Open the server installation folder from Steam's Manage menu. On Windows, the startup file is start_headless_server.bat; on Linux it is start_server.sh. Make a copy and edit that copy. Steam can replace the original startup file during an update, so changing only the original can lose your settings. Set the server name, world name and password in the launch arguments. The world argument selects the world to load or create. Use the copied script when you launch; the Steam shortcut still targets the original file. Do not place a real server password in screenshots or publicly shared configuration files.

3. Choose Steam networking or crossplay

For the Steam backend, Iron Gate documents ports 2456 and 2457 as the default range: the configured port and the next port. Router forwarding must match the server's chosen range. The developer cannot supply one router procedure for every model, so use your router or ISP documentation for the exact configuration. Adding -crossplay selects the PlayFab backend. That backend relays traffic and does not require router port forwarding for outside access. Omitting the flag uses the Steam backend, which the guide limits to Steam players. These are different networking paths; instructions for one should not be copied blindly to the other.

4. Use the correct address when joining

For a crossplay server, use its public IP and port, a join code, or the server list. The official guide specifically excludes local and loopback addresses for that backend. A failed connection to 127.0.0.1 therefore does not prove a crossplay server is offline. Wait for the server console to report a successful connection before asking friends to join. When diagnosing a failure, record the backend, address type and configured ports first. That gives you a concrete starting point instead of repeatedly changing unrelated router and game settings.

5. Restrict access and shut down cleanly

The permission files distinguish administrators, banned players and permitted players. Add a platform user ID on each line rather than relying on a character name. Treat the permitted list carefully: once it is used, players absent from the list cannot join. Keep administrator access limited to people who actually maintain the server. Stop the server with Ctrl+C in its command window, as the developer recommends. The server guide also describes save and backup arguments. Review those options and your host's backup routine before the world becomes important to your group. This article follows the captured developer documentation; it is not a benchmark or a claim that we tested your hosting configuration.

Did this answer your question?

Report a correction

More Valheim

Game hub