You can make a dedicated Valheim server on a Windows or Linux PC by installing Iron Gate’s Valheim Dedicated Server, editing a copied launch script, and running it directly. A Steam-backend server normally needs router forwarding for ports 2456 and 2457. Add the -crossplay launch option instead to use Valheim’s PlayFab relay, which lets Steam, Microsoft Store, and Xbox players connect without inbound port forwarding.
This guide covers installation, launch arguments, Steam and cross-platform networking, save backups, permissions, Docker, and the exact checks that tell you the server is ready. The instructions follow Iron Gate’s dedicated-server guide and its crossplay FAQ.
What do you need before making a Valheim server?
You need a PC that can remain on while friends play, an installed copy of Valheim for testing, and permission to create firewall and (for Steam networking) router rules. The dedicated server is a separate tool; players do not need to install that tool on every computer.
- Steam on Windows: install Valheim Dedicated Server from Steam Library > Tools.
- Microsoft Store on Windows: use the Server folder included with the game. The official FAQ lists
C:XboxGamesValheimContentServeras the usual location. - Linux: install the server files and the required libraries
libatomic1,libpulse-dev, andlibpulse0. The server requires GLIBC_2.29 and GLIBCXX_3.4.26. - Networking: a wired connection is optional. Wi-Fi can work, while a Cat6 Ethernet cable can provide a more consistent link between the host PC and router.
An Xbox console can join a dedicated server when crossplay is enabled, but an Xbox console cannot run the dedicated-server software itself.
How do you install Valheim Dedicated Server?
Steam installation on Windows
- Open Steam and select Library.
- Use the library filter and enable Tools.
- Find Valheim Dedicated Server and select Install. The official manual is included with the download.
- Right-click the installed tool, choose Manage > Browse local files, and leave this folder open for the next steps.
Microsoft Store installation
Microsoft Store players receive a Server folder with the game. Open C:XboxGamesValheimContentServer unless your installation uses a different library location. The startup file is StartHeadlessServer.bat.
Why should you copy the startup script before editing it?
Steam updates can reset the original startup file. Make a copy and edit that copy so an update does not erase your server name, world, password, or networking choice.
- In the server folder, copy
start_headless_server.baton Windows orstart_server.shon Linux. - Give the copy a clear name, such as
my-valheim-server.batormy-valheim-server.sh. - Edit the copied file with a plain-text editor.
- Launch the copied file directly. Do not rely on Steam’s shortcut, which points to the original script.
On Linux, make the copied script executable if necessary with chmod +x my-valheim-server.sh.
Which launch arguments are required?
A practical starting command contains a server name, port, world name, password, and visibility setting:
-name "My Valheim server" -port 2456 -world "Dedicated" -password "use-a-unique-password" -public 1
| Argument | What it controls | Example or important detail |
|---|---|---|
-name |
The name shown in the server browser | "My Valheim server" |
-port |
The base network port | 2456 by default; the next port is also used by Steam networking |
-world |
The world to create or load | "Dedicated"; use the exact existing world name to load it |
-password |
The password required to enter | Use a unique password rather than one reused elsewhere |
-public |
Whether the server appears in the browser | 1 lists it; 0 keeps it unlisted for Join IP connections |
Keep the quotation marks around values containing spaces. A password must meet Valheim’s in-game password requirements; if the server refuses to start, check the console for the specific validation message.
Useful optional arguments
Iron Gate’s command reference also supports these settings:
-crossplayswitches from the Steam backend to the PlayFab relay.-savedirmoves world, backup, and permission files to a directory you choose.-logFilewrites console output to a named log file.-presetand-modifierselect world settings.-setkeyapplies the world-modifier checkboxes used by the game’s world settings.-saveintervalchanges the automatic-save interval in seconds.-backups,-backupshort, and-backuplongcontrol the number and timing of automatic backups.
Should you use Steam networking or crossplay?
Choose Steam networking when everyone uses Steam and you want the conventional direct-connection setup. Choose crossplay when Microsoft Store or Xbox players must join, or when you do not want to configure inbound router ports.
| Feature | Steam backend | Crossplay backend |
|---|---|---|
| Launch setting | Do not add -crossplay |
Add -crossplay |
| Platforms that can join | Steam players | Steam, Microsoft Store, and Xbox players |
| Internet port forwarding | Required for players outside your home network | Not required for outside access because PlayFab relays the connection |
| Connection methods | Server browser or Join IP | Server browser, public IP and port, or a join code |
| Local or loopback addresses | Usable according to your network setup | Local and loopback IP addresses do not work with this backend |
For Steam networking, forward the configured base port and the following port. With the default -port 2456, that means UDP ports 2456–2457. Router menus differ by manufacturer and internet provider, so use your router or ISP’s port-forwarding instructions and point both ports to the host PC’s local address.
How do you configure the Windows launch file?
- Open your copied
.batfile in a text editor. - Replace its existing startup line with your chosen arguments. For example:
valheim_server -nographics -batchmode -name "My Valheim server" -port 2456 -world "Dedicated" -password "use-a-unique-password" -public 1
Keep the executable and any options already supplied by the official file unless you know why you are changing them. Add -crossplay to the same line for cross-platform access.
- Save the file.
- Double-click the copied file to run it directly.
- If Windows Firewall prompts you, allow the server through the networks on which friends will connect. A blocked firewall rule can prevent connections even when the launch arguments are correct.
How do you configure and run the Linux server?
- Install the required libraries:
libatomic1,libpulse-dev, andlibpulse0. - Confirm that the distribution provides GLIBC_2.29 and GLIBCXX_3.4.26 or newer.
- Copy
start_server.sh, edit the copy, and add your arguments in the command line. - Make it executable with
chmod +x my-valheim-server.sh. - Start it from the server directory with
./my-valheim-server.sh.
Older Linux installations that do not meet the library requirements can use Iron Gate’s included Docker script. The default Docker data volume is named valheim_server_data; set DOCKER_DATA_VOLUME if you want the world and configuration stored in a different Docker volume.
How do you know the server is ready?
Watch the server console after launching the script. It is ready when the console displays “Game server connected”. Iron Gate describes that message as the point at which the server is up and accepting connections.
The first start can take longer while the world is created. Do not close the window during that process. To stop cleanly, focus the server console and press CTRL+C. Avoid closing the window with the X button; Iron Gate warns that doing so can leave the server process running in the background.
How do saves and automatic backups work?
By default, Windows stores the server’s Valheim data under ../%USERPROFILE%/AppData/LocalLow/IronGate/Valheim. Linux uses ~/.config/unity3d/IronGate/Valheim. Use -savedir when you want those files on another disk or in a location managed by your backup system.
The default automatic save interval is 1,800 seconds, or 30 minutes. The default backup policy keeps four backups: one made two hours earlier and three additional backups at 12-hour intervals.
| Setting | Default | Purpose |
|---|---|---|
-saveinterval |
1800 seconds |
How often the world is saved automatically |
-backups |
4 |
Total number of automatic backups retained |
-backupshort |
7200 seconds |
Interval for the short-term backup, equal to two hours |
-backuplong |
43200 seconds |
Interval for the long-term backups, equal to 12 hours |
These are rolling server backups, not a substitute for an offline copy. Periodically stop the server cleanly and copy the world and permission files to another drive or machine, especially before changing world modifiers or installing updates.
How do you make yourself an admin or restrict access?
Permission files are in the server save directory. Add one case-sensitive platform user ID per line to the appropriate file:
adminlist.txtgrants administrator privileges.bannedlist.txtblocks listed users.permittedlist.txtcreates an allowlist. When it contains entries, everyone else is excluded.
You can obtain a user ID from the server log or the in-game F2 panel. Save the text file and restart the server if a change does not take effect immediately. In-game administrator commands documented by Iron Gate include Kick, Ban, Unban, and Banned.
How do friends join a Valheim server?
Joining a listed Steam server
Set -public 1, wait for “Game server connected,” and have Steam players search the server name in Join Game. If the server is not listed, use Join IP with the host’s public address and the configured port after forwarding the required ports.
Joining an unlisted server
Use -public 0 to keep the server out of the browser. Give Steam players the public IP address and base port, such as 203.0.113.25:2456. The example address is only a format illustration; use your own current public address.
Joining with crossplay
- Start the server with
-crossplay. - On the host, open the pause menu to reveal the server’s Join code.
- Send the code to friends.
- Friends choose Join Game > Add server and paste the code.
Crossplay users can also use the server browser or public IP and port, but the crossplay backend does not accept local or loopback IP addresses. The join code is usually the simplest option for friends on different platforms.
What should you check when nobody can connect?
The console never says “Game server connected”
- Check that the copied script points to the correct server executable and that the world name and password are valid.
- On Linux, verify the required libraries and GLIBC/GLIBCXX versions.
- Look for a second server process left behind after closing a window. Stop it cleanly with
CTRL+Cbefore trying again.
Steam players cannot reach the server from the internet
- Confirm that you forwarded both the configured port and the next port; the defaults are 2456 and 2457.
- Point the forwarding rule at the host PC’s current local IP address.
- Allow the server through the operating system firewall.
- Test from outside the home network. A local test may not work on routers that lack NAT loopback.
Crossplay players cannot join
- Confirm that every restart uses the copied script containing
-crossplay. - Use the join code or public address rather than a local or loopback address.
- Make sure the host has reached “Game server connected” before friends attempt to join.
The server disappeared after an update
Steam updates can restore the original startup script. Reopen the server folder, confirm that your personal copy still contains the required arguments, and launch that copy directly. Keep a separate backup of the script so you can restore it quickly after future updates.
Which Valheim hosting approach fits your group?
A home-hosted server gives you direct control over files, backups, permissions, and world settings, but the host PC must stay available and Steam networking requires router and firewall work. Managed hosting removes most scripting and router configuration and is useful when no player wants to leave a home machine running, but you trade some low-level control for a recurring service arrangement.
| Decision factor | Home PC | Managed server |
|---|---|---|
| Platform reach | Steam-only or crossplay, depending on -crossplay |
Depends on the provider’s supported backend |
| Control | Full access to launch flags, saves, logs, and permission files | Usually controlled through a panel, with provider-specific file access |
| Router work | Required for Steam-backend internet access; avoided with crossplay relay | Normally handled by the provider |
| Maintenance | You handle updates, firewall rules, backups, and uptime | The provider handles infrastructure; you still manage game settings and world data |
| Cost pattern | No separate hosting fee, but uses your electricity and hardware | Recurring fee in exchange for an always-on machine and support |
| Permissions and backups | Directly edit the text files and backup policy | Available controls vary by provider and plan |
For a small group that plays at predictable times, a home PC with crossplay is often the least complicated route. For a world expected to be available around the clock, a managed server can be more convenient if its backup, access-control, and cross-platform features meet your needs.
Frequently Asked Questions
Can an Xbox console host a dedicated Valheim server?
No. Xbox can join a dedicated server when the host enables crossplay, but the dedicated-server program must run on a Windows or Linux PC (or a compatible Docker setup).
Why does a crossplay join code work for a friend but not from the same house?
Crossplay uses the PlayFab relay and does not accept local or loopback IP addresses. Use the generated join code or the server’s public connection method instead of the host PC’s private address.
Can I move a Valheim world to another computer?
Yes. Stop the server, copy the world files from the configured save directory, and place them in the corresponding Valheim save location on the new host. Keep the world name and launch arguments aligned so the server loads the intended files.
What happens if I put one ID in permittedlist.txt?
That file becomes an allowlist: only the listed, case-sensitive platform IDs can enter. Remove the file’s entries or add every intended player if you no longer want exclusive access.