RUNNING WITH RIFLES
http://www.runningwithrifles.com/phpBB3/

Updating dedicated servers with SteamCMD (Linux)
http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=9&t=1843
Page 1 of 1

Author:  pasik [ Sun Sep 21, 2014 9:50 am ]
Post subject:  Updating dedicated servers with SteamCMD (Linux)

Here's how to set up and handle server updates conveniently through Steam using SteamCMD. Using SteamCMD, you minimize the effort to update the server files down to one command and only download changes since last time.

While this tutorial is for Linux, it should be easily adapted for Windows too.

Once you have everything set up, simply calling the following command will make the update happen.
Code:
./steamcmd.sh +runscript steamcmd_update_rwr.txt


So, let's prepare the stuff on your Linux box to get to that, we'll start from a situation where you don't have any previous server files in use. I'm going to assume you're not using the root account.

Create a folder for RWR server files, and access it
Code:
mkdir rwr_server
cd rwr_server


Download SteamCMD and do the first-time launch
Code:
curl -O http://media.steampowered.com/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz
./steamcmd.sh
(type quit in SteamCMD to exit)


Download the update script
Code:
wget http://www.runningwithrifles.com/wp/steamcmd_update_rwr.txt


Fill in your Steam account credentials in steamcmd_update_rwr.txt at <username> and <password>
Code:
nano steamcmd_update_rwr.txt
(work)

- Steam has this to say about using SteamCMD and Steam accounts:
Quote:
Note:For security reasons it is recommended that you create a new Steam account just for your dedicated servers.
Note:A user can only be logged in once at any time (counting both graphical client as well as SteamCMD logins).

- Personally I'm using another account, but not sure if it's really that relevant as long as you don't have several Steam clients logged in. Just remember your password is written in readable text in the script which is probably not the brightest idea out there. Feel free to edit the script if you want it to e.g. prompt the password instead.

Do the update
Code:
./steamcmd.sh +runscript steamcmd_update_rwr.txt

- Steam Guard will probably ask for a confirmation code, get it from your e-mail and fill it in, it's only asked once

That's it for the setup!

Next time when there's an update, just execute Do the update -part and you're done.

You may at this point need to re-copy your server specific changes (at least server_settings*, admin_settings*, could be others) in case SteamCMD just overwrote some of your files - I try to avoid touching those files in general but some changes are bound to happen eventually to the templates. It's a good idea to keep a copy of your own files for this case. There will be improvements in this stuff in the future, but we're not in future yet so just keep those backups.

Author:  class101 [ Mon Apr 06, 2015 3:14 pm ]
Post subject:  Re: Updating dedicated servers with SteamCMD (Linux)

Thanks pasik, I usually install gaming server on my centos with a single steamcmd command line like

./steamcmd.sh +login <username> <password> +force_install_dir /rwr/ +app_update 270150 validate +quit
./steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir /rust/ "+app_update 258550 -beta experimental" validate +quit (RUST)

Btw on a first run in CentOS 7 I'm noticing your rwr_server is bound to libraries usually not installed on CentOS like X11, Ogre because everything is done on command line on that os usually.

Is it possible to do like in Starbound and many other dedicated server, they are not linked to visual components so a command line OS based like CentOS can also run the server without having to install a few gigabytes of dependencies

Btw keep it up great game !

Author:  class101 [ Mon Apr 06, 2015 4:13 pm ]
Post subject:  Re: Updating dedicated servers with SteamCMD (Linux)

I think I got it to run under CentOS 7 64-bit, didn't need many X11 components finally, didn't realized you were redistributing most of the libraries

just yum -y install libX11.i686 libXext.i686 libXdmcp.i686 is enough under CentOS 7, it has just installed like 5MB of components so not a big deal

Author:  AlexKotovea [ Tue Aug 04, 2015 9:08 am ]
Post subject:  Updating dedicated servers with SteamCMD Linux

you say that you will make this guide more thorough later to include DHCP with samba. is that going to happen any time soon or have you not planned it yet?

Author:  Bisb [ Sat May 14, 2016 9:53 am ]
Post subject:  Re: Updating dedicated servers with SteamCMD (Linux)

Hi, Thanks for the guide, I have a quick question regarding the login though :

pasik wrote:
- Steam has this to say about using SteamCMD and Steam accounts:
Quote:
Note:For security reasons it is recommended that you create a new Steam account just for your dedicated servers.
Note:A user can only be logged in once at any time (counting both graphical client as well as SteamCMD logins).

- Personally I'm using another account, but not sure if it's really that relevant as long as you don't have several Steam clients logged in. Just remember your password is written in readable text in the script which is probably not the brightest idea out there. Feel free to edit the script if you want it to e.g. prompt the password instead.


Doesn't the secondary account requires to have the game too ? Because when I am trying to install it with a fresh steam account I get the ERROR! Failed to install app 'xxxxxx' (No subscription)

Any help would be appreciated ;)

Author:  Aguinaldo [ Tue Nov 21, 2017 1:35 pm ]
Post subject:  Re: Updating dedicated servers with SteamCMD (Linux)

Hi Bisb, I just got the same error. Can you update if you were able to fix or not?

Author:  pasik [ Wed Nov 22, 2017 8:09 pm ]
Post subject:  Re: Updating dedicated servers with SteamCMD (Linux)

Oh right, that's probably very true that such a thing would happen. I happen to have the game activated on both accounts of course :?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/