Git Product home page Git Product logo

c0nw0nk / steamcmd-autoupdate-any-gameserver Goto Github PK

View Code? Open in Web Editor NEW
140.0 14.0 28.0 29 KB

Windows SteamCMD to autoupdate and install any game server steam cmd settings configurable lots of useful features. This batch script will keep your game servers automaticly updated updating intervals announce the server is shutting down for updates etc all configurable.

Batchfile 100.00%
game-server curl steamcmd interval vbscript powershell autoupdate windows-powershell steam steam-api

steamcmd-autoupdate-any-gameserver's Introduction

SteamCMD-AutoUpdate-Any-Gameserver

Windows SteamCMD to automaticly update and install any game server

I am sure all of you on windows have been seeking for this for a long time.

This will work for all game servers and keep them all automaticly updated. You may also use this to freshly and easly install game servers too. Inside my script i have written a little a detail on each function and what it is executing and the result. For those of you who are command line enthusiasts like myself.

Why did i bother to make this ?

I got borred and when i get borred i have to do something productive this being the result. (I am a workaholic)

It is a command line file what you should replace your existing .bat / .cmd scripts with, One automatic updater per each game server you wish to run.

Features :

steam.cmd is only dependant upon VBScript.

steam-curl.cmd is dependant upon CURL, VBScript and Windows Powershell.

Will download extract and install steamcmd.exe if it does not exist in the directory specified from http://media.steampowered.com/installer/steamcmd.zip

Works with both 32bit and 64bit architecture.

Install game server.

Keep server updated on a interval (interval of updates is defined in seconds).

Should work with both Normal versions of Windows and Server versions.

Suppress application hung messages to prevent server crash problems.

Announces to players ingame that the server is shutting down/restarting for updates.

Requirements :

You need to have a SteamDEV API key you can obtain one from the following link :

http://steamcommunity.com/dev/apikey

Certain servers for specific games require you to use a login on SteamCMD so specify your login in the script.

SteamCMD.exe downloaded from :

http://media.steampowered.com/installer/steamcmd.zip

F.A.Q

I edited beyond the "Do not edit" point and now it does not work ? I told you in the file not to touch anything beyond that point. (Just redownload the script to get a default working version.)

Known bugs / issues :

If your game server is to crash you may have to wait for the next automatic update check as defined by the interval so the script checks if the game server is infact running or not. (Current soloution is to keep the update interval to a max of 10-15mins so if your server crashes it is not offline for long) set interval=60 (1 minute)

Certain Appid's for installation of game server will be different to the update id due to Steam's DEV API not containing the latest avaliable server version (yet!?)

Example :

http://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v2/?key=YOURKEYHERE&appid=740&format=json

How to use :

Choose either steam.cmd or steam-CURL.cmd

The steam.cmd file uses VBScript and steam-curl.cmd is dependant on CURL and Windows Powershell.

Both will automaticly download and install game servers upon running either script.

There are two different appid's you might have to specify for your game server to automaticly update. Since some games for example CS:GO has a seperate appid for the updater url than the appid you would use to install the game server as show below.

Install CS:GO server appid = 740

set appid=740

Auto Update URL appid = 730

set update_appid=730

You will know if you have to set a different appid for the update url if the contents of your latest-version.txt show this.

{
    "game": {

    }
}

To get the correct Auto Updater APPID just go to the store page for the game in question and it will be at the end of the URL link.

http://store.steampowered.com/app/730/

Configuration : (EDIT | steam.cmd file)

In order to configure the script just edit the "*.cmd" file and define your install directory and server type.

Please drop a reply if you have a question / issue i shall try to help you as much as i can.

CURL (Generic) 32bit and 64bit executable from | http://curl.haxx.se/download.html#Win32

steamcmd-autoupdate-any-gameserver's People

Contributors

c0nw0nk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steamcmd-autoupdate-any-gameserver's Issues

I can't make non-absolute directory configuration.

:: This is the directory you wish to install and keep your server updated to ::
set install_directory=.\

:: This is for the directory where you installed steamcmd ::
:: http://media.steampowered.com/installer/steamcmd.zip ::
set steamcmd_path=.\steamcmd.exe

:: This is the path to the exe of the game server this allows us to close and run the server for and after a update ::
:: Other command line variables for srcds can be found here https://developer.valvesoftware.com/wiki/Command_Line_Options ::
:: Example ::
:: set exe_path=C:\game-servers\CSGO\srcds.exe -game csgo -console -nocrashdialog -port 27015 +clientport 27005 +map de_dust2 ::
set exe_path=.\reflexded.exe

seems that all works besides launching the server.

AutoUpdate failing to detect Steam patch

Game is ARK: Survival Evolved. GameID 346110 is the client and 376030 is the Dedicated Server.

Only 346110 can populate a version check, it seems the devs haven't filled anything in for the Dedicated server on 376030.

Is there another method that can be used?
What field of the data changes when a new patch is applied?

Mix this with Firedaemon

Sorry I am a bit new to this site. But I was curious if you had any idea on how maybe to incorporate this script with firedaemon. Basically I currently have 2 ark servers that are semi automated with firedaemon. Your script checks steamcmd for updates, and I was wondering if maybe there was a way to setup this script so that say, on update check, where update is available, it would send a broadcast using remote rcon, maybe through executing another batch script with a console based remote rcon program. Said broadcast would let the server know updates are coming within 5 minutes. Then at 5 minutes it would save the world using the prebuilt rcon command in ark, and then kill the process.

Script cannot work, The system cannot find the file specified.

I tried to use the script (tried both versions), but endless upgrade cycle occurs, and I see the following error message:

The system cannot find the file specified.
FINDSTR: No search strings
ERROR: The search filter cannot be recognized.
Redirecting stderr to 'C:\home\steamcmd\logs\stderr.txt'

steam.cmd (or steam-CURL.cmd) configuration:
@echo OFF
set steamkey=HERE_IS_MY_STEAM_KEY
set login=anonymous
set install_directory=C:\home\servers\myserver
set steamcmd_path=C:\home\steamcmd\steamcmd.exe
set exe_path=C:\home\servers\myserver\srcds.exe -game csgo -console -usercon -secure -maxplayers_override 26 -tickrate 128 -nohltv +sv_pure 0 +game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_dust2
set servername=myserver
set appid=740
set update_appid=730
set interval=60
set suppress_errors=true

If I tried to start the server from cmd, it works!

c:\home\servers\myserver>srcds.exe -game csgo -console -usercon -secure -maxplayers_override 26 -tickrate 128 -nohltv +sv_pure 0 +game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_dust2

What could be the problem?

Thanks!

[NEVERMIND] Installing to the wrong location.

~~I have SteamCMD setup on my NAS, running Debian Stretch, to keep my games up to date for my whole network. Here is my Steam script for it:~

@sSteamCmdForcePlatformType windows
login REMOVED
force_install_dir /mnt/NetworkHDD/Media/Games/steam-wine/
set_download_throttle 4096
app_update 379720
app_update 71340
app_update 200940
app_update 204360
app_update 205950
app_update 212480
app_update 213670
app_update 219950
app_update 379720
@sSteamCmdForcePlatformType linux
force_install_dir /mnt/NetworkHDD/Media/Games/steam/
app_update 220
app_update 380
app_update 400
app_update 420
app_update 620
app_update 105600
app_update 206420
app_update 209080
app_update 236870
app_update 237930
app_update 245170
app_update 301910
app_update 311690
app_update 332200
app_update 369070
app_update 375750
app_update 462770
app_update 238370
app_update 8870
app_update 319630
quit

It updates the games fine, detecting what versions they are and determining if they need updates. The problem is whatever files it downloads, either for new games or updates, it puts them in the root of the library, instead of the subdirectory for that specific game. So the Doom files are put in:

/mnt/NetworkHDD/Media/Games/steam-wine/

instead of:

/mnt/NetworkHDD/Media/Games/steam-wine/steamapps/Doom/

Otherwise, it's reading the appmanifests just fine.

EDIT: Nevermind, I messed up and thought this was SteamCMD's github.

Updater doesnt select the srcds window to input the warning text.

Windows Server 2012 R2

What seems to happen is when there is a detected update, it fails to select the srcds window and sometimes selects stuff on the desktop and opens them.
I did not edit below your line, in fact I changed as little number of settings as i could to get it to work. This is for the non-curl version.

troubles with configs loading

Server can't catch .cfg's from its own directory while starting.

cannot open file 'dedicatedserver.cfg'

And I can't exec it without full directory path.

loadconfig server1
cannot open file 'server1.cfg'

ERROR: The search filter cannot be recognized

ERROR: The search filter can not be recognized
Redirecting stderr to "C:\Users\Administrator\Desktop\steamcmd\logs\stderr.txt"
.....(Continues through update)....
ERROR: The search filter cannot be recognized
Invalid Format

`@ECHO OFF

::==============================::
:: SteamCMD Auto Updater 1.6 ::
:: Credits ::
:: C0nw0nk ::
::==============================::
:: https://github.com/C0nw0nk/SteamCMD-AutoUpdate-Any-Gameserver ::

:: This is the SteamDEV api key required for automatic updates ::
:: If you do not have one you may obtain your API key from here = http://steamcommunity.com/dev/apikey ::
set steamkey={SteamKeyIsEntered}

:: This is the required login for SteamCMD to download updates ::
:: example = login=C0nw0nk Password ::
:: For most game servers you do not require this and can leave it as anonymous ::
:: Certain game servers you have to use a username and password to install them ::
set login=anonymous

:: This is the directory you wish to install and keep your server updated to ::
set install_directory=C:\Users\Administrator\Desktop\SteamCMD-game-servers\Squad

:: This is for the directory where you installed steamcmd ::
:: http://media.steampowered.com/installer/steamcmd.zip ::
set steamcmd_path=C:\Users\Administrator\Desktop\steamcmd\steamcmd.exe

:: This is the path to the exe of the game server this allows us to close and run the server for and after a update ::
:: Other command line variables for srcds can be found here https://developer.valvesoftware.com/wiki/Command_Line_Options ::
:: Example ::
:: set exe_path=C:\game-servers\CSGO\srcds.exe -game csgo -console -nocrashdialog -port 27015 +clientport 27005 +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2 ::
set exe_path=C:\Users\Administrator\Desktop\SteamCMD-game-servers\Squad\SquadServer.exe "MULTIHOME=64.237.34.58 Port=7787 QueryPort=27165 FIXEDMAXPLAYERS=72 FIXEDMAXTICKRATE=15 RANDOM=ALWAYS -log"

:: This is the title of your server this will help you know what server this auto updater is running for ::
set servername=NSA Squad Server

:: This is the app ID of the game server you are installing / running ::
set appid=403240

:: This is the app ID the url will check for updates on that game ::
:: Some games this is the same as the installation appid other games it is a different numeric value ::
:: if your latest-version.txt file is empty you need to make this value different to the installation appid, just go to the steam store page and get the appid from the end url ::
set update_appid=393380

:: Automatic Updating Interval (in seconds) this will set how often you check the steam servers for a new update ::
:: I recommend 5-10 mins maximum ::
:: Default value 60 seconds 1 minute ::
set interval=60

:: Suppress application error messages, Usualy when your game server crashes you get flagged the following error ::
:: "srcds.exe has stopped working. Windows can check online for a solution to the problem" ::
:: and even after disabling error reporting and the message above you will get the following message instead ::
:: "srcds.exe has stopped working. A problem caused the program to stop working correctly. Please close the program" ::
:: With the following setting the script will prevent all these errors and get your server back online as soon as a crash occurs ::
:: set to false to disable this feature ::
:: Use -nocrashdialog in exe_path to also help suppress server crashes ::
set suppress_errors=true

:: CURL Directory you may define the installation path of CURL if you moved the executables to another directory ::
:: Example ::
:: set curl_dir=C:\path\curl

:: CURL 32bit executable name ::
:: Downloaded from http://curl.haxx.se/download.html#Win32 ::
set curl32bit=curl-32bit.exe
:: CURL 64bit executable name ::
:: Downloaded from http://curl.haxx.se/download.html#Win64 ::
set curl64bit=curl-64bit.exe`

I get the error with both the CURL and VBScript version. I am using this script for multiple servers so I know it works, but I get this error with Squad.

Auto start without login

Hello!

I have an Darkest Hour (Red orchestra ostfront mod). I use Windows Server 2019.

How to start the CMD without login?

I have created a scheduled task but it doesn't work. When power on the Windows server without logging in, the CMD runs and the game server is up, but does not restart and update it when an update is available. I have to login to the windows server and finish the task and run the CMD manually, or power off the server and turn it on again.

Thank you very much!

Auto update Hellion?

Hi so hellion has a little bit of a diffrent way of starting and shutting off the server.

It starts by using a bat file named Start_ALL.bat containing:
start cmd /c call "Start_DEFAULT.bat"

The Start_DEFAULT.bat contains:
@title Game Server DEFAULT
@HELLION_Dedicated.exe

And then it uses another two batch files you need to stop it.
Stop_ALL.bat contains:
start cmd /c call "Stop_DEFAULT.bat"

And Stop_DEFAULT.bat contains:
HELLION_Dedicated.exe -shutdown

Now your script works great with starting it up but would it be possible to add a function to execute a command so it executes the shutdown batch and then updates it?

SteamCMD AutoUpdate need help

Hi !!

I tested your script from "steamcmd"
It seems to validate and download an update, but it does not stop and does not restart the server, it does not send a chat message, and there are some errors ..
I tested with a server "RUST" and a server "Conan Exile" ..
Can anyone help me?
If yes I could specify and post my settings .. (sorry for bad english)

I tried with login anonymous and login with ids

My settings :

`@ECHO OFF

::==============================::
:: SteamCMD Auto Updater 1.7 ::
:: Credits ::
:: C0nw0nk ::
::==============================::
:: https://github.com/C0nw0nk/SteamCMD-AutoUpdate-Any-Gameserver ::

:: This is the SteamDEV api key required for automatic updates ::
:: If you do not have one you may obtain your API key from here = http://steamcommunity.com/dev/apikey ::
set steamkey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

:: This is the required login for SteamCMD to download updates ::
:: example = login=C0nw0nk Password ::
:: For most game servers you do not require this and can leave it as anonymous ::
:: Certain game servers you have to use a username and password to install them ::
set login=anonymous

:: This is the directory you wish to install and keep your server updated to ::
set install_directory=C:\ConanexileTEST

:: This is for the directory where you installed steamcmd ::
:: http://media.steampowered.com/installer/steamcmd.zip ::
set steamcmd_path=C:\steamCMD\steamcmd.exe

:: This is the path to the exe of the game server this allows us to close and run the server for and after a update ::
:: Other command line variables for srcds can be found here https://developer.valvesoftware.com/wiki/Command_Line_Options ::
:: Example ::
:: set exe_path=C:\game-servers\CSGO\srcds.exe -game csgo -console -nocrashdialog -port 27015 +clientport 27005 +map de_dust2 ::
set exe_path=C:\ConanexileTEST\ConanSandboxServer.exe -log -MULTIHOME=xxx.xxx.xxx.xxx?QueryPort=29016?ServerName="[EU/FR]-[PVP] System Of Gaming - The Cimmerian"?MaxPlayers=70

:: This is the title of your server this will help you know what server this auto updater is running for ::
set servername=[EU/FR]-[PVP] System Of Gaming - The Cimmerian

:: This is the app ID of the game server you are installing / running ::
set appid=443030

:: This is the app ID the url will check for updates on that game ::
:: Some games this is the same as the installation appid other games it is a different numeric value ::
:: if your latest-version.txt file is empty you need to make this value different to the installation appid, just go to the steam store page and get the appid from the end url ::
set update_appid=443030

:: Automatic Updating Interval (in seconds) this will set how often you check the steam servers for a new update ::
:: I recommend 5-10 mins maximum ::
:: Default value 60 seconds 1 minute ::
set interval=120

:: Suppress application error messages, Usualy when your game server crashes you get flagged the following error ::
:: "srcds.exe has stopped working. Windows can check online for a solution to the problem" ::
:: and even after disabling error reporting and the message above you will get the following message instead ::
:: "srcds.exe has stopped working. A problem caused the program to stop working correctly. Please close the program" ::
:: With the following setting the script will prevent all these errors and get your server back online as soon as a crash occurs ::
:: set to false to disable this feature ::
:: Use -nocrashdialog in exe_path to also help suppress server crashes ::
set suppress_errors=true

:: Don't edit anything past this point ::

:: I AM SERIOUS DO NOT TOUCH ::

:: DON'T MAKE ME HURT YOU! ::

:: il fite u ::

:: Do you realy want some! ::

:: Come on don't be a skrub! ::

:: Sorry did not mean anything I just said go ahead and edit below this point see if I care (seriously just don't touch anything below this)::

:: for the fact you have even scrolled down this far shows your persistence ::`

Process can only be terminated forcefully (with /f option)

I would like to have my Conan Server updated automatically but this only runs via the Taskmanager as task. So I get the following message: "This process can only be terminated forcefully (with /f option)"

What is the best thing I can do now?

Tool doesn't work for The Isle

Hello together,

we've the following problem.
We're running a "The Isle" Server with the dedicated server tool (APP ID: 412680). We're starting our Server with your Auto Updater (steam.cmd) We followed your description and doesn't worked on the part we shouldn't.
We used for the Update the APP ID of the game 376210 and as installation and running app id vor the Server the following one 412680 (dedicatedTheIsleServer).

The tool doesn't restart our Server after a crash and it also doesn't update the dedicated server on its own.

The first time we've installed the tool it automatically restarts the Server, but after a couple of crashes it doesn't want to work anymore.

We've also tested waiting for the next update interval, but that also doesn't work.

It would be great if you can help us.

Kind Regards

Fabi

Stationeers Beta Compatibility

Stationeers Dedicated Server has the AppID of 600760. For the Beta branch, the AppID is the same, but you put a -beta beta switch in the manual SteamdCMD update command: +app_update 600760 -beta beta. Can we account for cases like this in your Set AppID field?

Issues not working

Needs to be updated this script works but not sure about the server-latest-version.txt is no more.

-batchmode launch param not passing through properly

I am having issues with launch commands not passing through properly, specifically -batchmode for numerous games.

Example vars/app;

set login=anonymous
set install_directory=C:\Servers\Blackwake
set exe_path=C:\Servers\blackwake\BlackwakeServer.exe -batchmode -nographics
set appid=423410
set update_appid=420290

nographics is going through fine, but no matter what, batchmode will not pass through with the script. Launching the app through a normal command line/shortcut with the switch results in the intended functionality.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.