Overview
Simple batch file to install, start, and stop Valheim dedicated servers. This works with Windows 10.
Summary
I created a simple batch file to install/update, start, and stop dedicated servers running on Windows 10.
[link]Feel free to use and change to fit your needs.
Don’t forget to change starting variables. Comments should explain everything required.
It follows a simple set of steps.
- Install or Update Valheim’s dedicated server using SteamCMD.
- Start the server in a separate process.
- Gracefully stop the server with CTRL+C.
The script provides a separate log for your server to record install/update, start, and stop.
If you want to understand the basic requirements and troubleshoot your dedicated server, I recommend “Frosty’s Valheim Windows Server Guide[pastebin.com]“.
I see no reason to reproduce (copy/paste) the good work of others. My guide only focuses on a script to automate basic operations.
I also recommend these instructions, “Required Ports for Steam“. They are not specific to Valheim, but will help you solve some potential firewall issues.
Troubleshooting
It’s been widely reported that Valheim’s server search is not resolving all servers. This means you may not see your dedicated server in game, under the community list of servers. This will make it difficult for you and your friends to join the server.
There is a current workaround.
As the server host, you need to…
(1) Search “My IP” in Google.
(2) Provide your IP address to your players.
All players need to…
(3) Open up the Steam client (It doesn’t matter if Valheim is running).
(4) Select the View menu on the top left and select the Servers option.
(5) In the Steam server browser, select the Favorites tab.
(6) Select the “Add a Server” button.
(7) Enter the IP address of the dedicated server with the port appended with a colon (:) to the end.
Like the image, the format for the IP address with the port is something like 0.0.0.1:0000. This is just an example. Your IP will be something different. The port will likely be 2457 or another you decide to use.
(8) Refresh, and the dedicated server should appear in the list. Not responding means the server was not found. Check your Firewall settings again.
(9) Select the server and then it and press the Connect button. You will be asked to enter the password.
Valheim will open and you may have to re-enter the password in-game.
If your dedicated server is setup with the proper firewall permissions, you and friends should be able to connect.
This is not ideal if your ISP issues dynamic IP addresses to you (likely). Your IP address will change and you will need to update the above information.
Changelog
Valheim Server Control v2.0
10 FEB 2021
- Incorporated Valheim 0.143.5 dedicated server patch.
- Removed menu as it is no longer necessary to ensure server stop.
Valheim Server Control v1.0
08 FEB 2021
- Initial script.