Run Valheim Dedicated Server as a Windows Service with FireDaemon Pro

Valheim Logo


TABLE OF CONTENTS

Introduction

Valheim is a brutal exploration and survival game. You can set up and run the Valheim Dedicated Server component as a Windows service with FireDaemon Pro. You can also use FireDaemon Pro to schedule updates to the dedicated server.


Download, Install, and Update SteamCMD

Download SteamCMD. Unpack the contents of the ZIP file into C:\SteamCMD. Then open an elevated Command Prompt (WIN+X and choose Command Prompt (Admin) or Terminal (Admin)), then copy / paste:


cd /D C:\SteamCMD
:: This updates SteamCMD
.\steamcmd +quit

Download and Valheim Dedicated Server

At the same Command Prompt, copy / paste the following to download and install Valheim Dedicated Server. The dedicated server is installed into C:\SteamCMD\steamapps\common\Valheim Dedicated Server:


:: This command downloads the Valheim Dedicated Server component from Steam
.\steamcmd +login anonymous +app_update 896660 validate +quit

Download and Install DirectX

Download and install DirectX End-User Runtime from Microsoft.


Download, Install, and Run FireDaemon Pro

Download and install FireDaemon Pro. Once the installation has been completed, double-click the FireDaemon Pro icon on your desktop to launch the FireDaemon Pro GUI.


Setup the Valheim Dedicated Server FireDaemon Pro Windows Service

In the FireDaemon Pro GUI type Ctrl+N to create a new service per the screenshot below then click the "tick" button to install the service. The FireDaemon Pro service will be installed and the Valheim Dedicated Server should now be running.


FireDaemon Pro Program tab settings for Valheim Dedicated Server


FieldValue
Service NameValheim Dedicated Server
Display NameValheim Dedicated Server
Tag
GameServer
Startup TypeAutomatic (Delayed Start)
ProgramC:\SteamCMD\steamapps\common\Valheim Dedicated Server\valheim_server.exe
Working DirectoryC:\SteamCMD\steamapps\common\Valheim Dedicated Server
Parameters-nographics -batchmode -name "My server" -port 2456 -world "Dedicated" -password "secret" -crossplay
TypeAlways Running Program


Setup a Scheduled FireDaemon Pro Service to Update Valheim Dedicated Server

Create a batch file called UpdateValheim.cmd in the folder C:\SteamCMD\steamapps\common\Valheim Dedicated Server containing the following lines:


@echo off

:: Stop the FireDaemon Pro service
sc stop "Valheim Dedicated Server"

:: Change directory to SteamCMD
cd /D C:\SteamCMD

:: Update the dedicated server
.\steamcmd +login anonymous +app_update 896660 validate +quit

:: Start the FireDaemon Pro service
sc start "Valheim Dedicated Server"


Open the FireDaemon Pro GUI. Type Ctrl+N to create a new service as follows:


FireDaemon Pro Program tab settings for Update Valheim Dedicated Server


FieldValue
Service NameUpdate Valheim Dedicated Server
Display NameUpdate Valheim Dedicated Server
Tag
GameUpdate
Startup TypeAutomatic (Delayed Start)
ProgramC:\SteamCMD\steamapps\common\Valheim Dedicated Server\UpdateValheim.cmd
Working DirectoryC:\SteamCMD\steamapps\common\Valheim Dedicated Server
TypeSelf Completing Task


Then create a schedule via the FireDaemon Pro Scheduling tab per the screenshot below to update Valheim Dedicated Server. Click the "+" button to create a new schedule. Note that your dedicated server will be shut down for the duration of the update. Change the Start Time of the schedule to a time that suits you. You can also create multiple schedules. Click the "tick" button, the service will be installed, and the batch file will be scheduled to be run at the time nominated in the schedule.


FireDaemon Pro Scheduling tab settings for Update Valheim Dedicated Server


And that's it! You should now have two FireDaemon Pro services setup and running. One runs the Valheim Dedicated Server, the second runs the update script periodically. Your FireDaemon Pro GUI should look similar to the following once both services are installed:


FireDaemon Pro showing Valheim Dedicated Server and Update Valheim Dedicated Server services running