How to run SteamCMD as a Windows Service with FireDaemon Pro.
SteamCMD is a tool provided by Valve that allows you to install and update many game servers. FireDaemon Pro can be used to run your game server as a Windows service. StreamCMD can be run as a Launch Event by FireDaemon Pro as part of your overall game server startup process to ensure game server updates are downloaded and applied in advance of the main game server starting. This guide will show you how to set up SteamCMD with FireDaemon Pro as a Launch Event.
1. Download SteamCMD
Download SteamCMD from the Steam website. Extract the SteamCMD .zip file on your hard drive. For the purposes of this guide, we will use C:\SteamCMD.
2. Download FireDaemon Pro
Download and install FireDaemon Pro into the directory of your choice, typically C:\Program Files\FireDaemon.
3. Setup your game server
Before continuing, your game server must be already setup and configured under FireDaemon Pro. If you have not done that yet, do so now before continuing with this guide. The FireDaemon knowledgebase contains guides for many game servers; check and see if a guide for your game exists.
4. Configure FireDaemon Pro to launch SteamCMD prior to your game server launching
While configuring your FireDaemon service for your game server, in the Events tab, click Insert in the Launch Events section per the screenshot below:
5. Launch Event settings
Disposition: When the Launch Event Program will be run. Leave this as Before Program Launch.
Executable: The path to your steamcmd.exe file. For the purposes of this guide, the path is C:\SteamCMD\steamcmd.exe.
Working Directory: The directory containing your steamcmd.exe file. For the purposes of this guide, the path is C:\SteamCMD.
For your parameters, enter and edit as necessary the update command for the game server you are running.
6. Take care when using the "validate" directive
When updating your game server, the "validate" directive will cause SteamCMD to replace all downloaded files with new versions downloaded from Steam's servers. If you have customised any core game server configuration files, they will be overwritten during the verification process. To avoid this, simply remove the "validate" directive from the Parameters command list below.
7. For games that do not require a username and password
+login anonymous +force_install_dir "C:\Path To Your Server" +app_update #### validate +quit
Replace "C:\Path To Your Server" with the path to your game server and replace #### with the Steam Application ID (app ID) of your game server. To find the app ID, look here.
8. For games that require a username and password
For games that require a username and password to be updated, enter the following in the Parameters field:
+login USERNAME PASSWORD +force_install_dir "C:\Path To Your Server" +app_update #### validate +quit
Replace USERNAME with your Steam account username and PASSWORD with your Steam account password. Please be aware that if you are using your personal Steam account, you will be logged out when the server updates itself. Replace "C:\Path To Your Server" with the path to your game server and replace #### with the app ID of your game server. To find the app id, look here.
To give SteamCMD enough time to update all files type 7200000 in the Execution Time field. 7200000ms is equal to 2 hours (2 hours x 60 minutes x 60 seconds x 1000ms). If your game server needs more time to update then increase this value. Note that if the game server update takes less time or does not need updating then the time to run the Launch Event will be limited to the actual amount of time that steamcmd.exe requires to run prior to running your game server. Run Detached should always be left unchecked.
Then click OK. Your FireDaemon Pro service configuration should now look like the screenshot below. Every time your service starts, it will check if there's an update and verify your files.