Hosting locally in Valheim
Load the game and follow these instructions:
- Create or load an existing world.
- Click “Start Server”
- Enter a password for your server. Once done, click start and it will load.
People can now join you by finding the server under “Join game” and entering the password.
Valheim dedicated server requirements
With Valheim, you can create a dedicated server on any PC. It’s usually on a secondary computer, but some might put it on the same machine they played from. Putting your server on the same machine you play from is typically not the best idea, but with a powerful PC and good internet connection, you should have few performance issues.
You will also need to know how to port forward your router so your friends can play.
How to set up a Valheim dedicated server
You can install the files remotely by downloading SteamCMD and creating a .bat file in the same folder as the extracted SteamCMD download. Using the code below will install the files for Valheim once executed. This is ideal if your not using the Steam client (IE on a dedicated machine). Using the code below it will install the files to the “C:\Valheim\” location.
start "" steamcmd.exe +login anonymous +force_install_dir "C:\Valheim" +app_update 896660 validate +quit
Starting the Server.
To start the server, create a batch file and call it whatever you need and copy the code below to it, editing it to your needs. Place the bat file in the same folder as the servers .exe.
Valheim does come pre-installed with a BAT file called “start_headless_server” which you can copy and edit to run the server.
Edit the file to your needs ensuring the password is at least five number or letter characters long. Valheim servers crash/do not function if the password is less than this.
echo "Starting server PRESS CTRL-C to exit"
REM Tip: Make a local copy of this script to avoid it being overwritten by steam.
REM NOTE: Minimum password length is 5 characters & Password cant be in the server name.
REM NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall.
valheim_server -nographics -batchmode -name "My server" -port 2456 -world "Dedicated" -password "secret"
Once done, run the bat file to start the server and give it a good 10 minutes to start fully. Once it starts new files/folders will appear in the directory.
With the amount of routers out there its impossible to list all the ways to adjust your router for port forwarding. Thankfully the website below provides all the go to info for this. You require ports 2456-2458 forwarded for Valheim but these can be changed in the startup script above so adjust it accordingly in your router.
We hope this guide provides some guidance on setting up your own Valheim server. Alternatively, you can always host your own via a hosting provider to cut out the manual handling. We provide a dedicated list of server hosts for this very reason.