How to Install and Use SteamCMD

steamcmd

This is a brief tutorial on the basics of installation and usage of SteamCMD.

Windows

1. Create a folder for SteamCMD.

C:/steamcmd

2. Download the SteamCMD (Windows) Update Tool.

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

3. Extract the contents of the zip to the folder.

Linux

1. Create a user for SteamCMD and login.
Note: For security best practice do not run SteamCMD a root.

adduser steam
su - steam

2. Create a directory for SteamCMD.

mkdir /home/steam/steamcmd
cd /home/steam/steamcmd

3. Download the SteamCMD (Linux) Update Tool.

wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz

4. Extract the contents to the directory.

tar -xvzf steamcmd_linux.tar.gz

Mac OS x

1. Open Terminal.app and create a directory for SteamCMD.

mkdir ~/steamcmd
 ~/steamcmd

2. Download the SteamCMD (OS X) Update Tool.

curl -O http://media.steampowered.com/client/installer/steamcmd_osx.tar.gz

3. Extract the contents to the directory.

tar -xvzf steamcmd_osx.tar.gz

Running SteamCMD

Windows

Browse to the SteamCMD folder and click on steamcmd.exe.

steamcmdfolder

Alternatively Open a Command Prompt to start SteamCMD.

cd C:\steamcmd
steamcmd

steamcmdwindows

Linux

Open a terminal and start SteamCMD.

cd /home/steam/steamcmd
./steamcmd.sh

steamcmdlinux

Steam>

Mac OS x

Open Terminal.app and start SteamCMD.

cd ~/steamcmd
./steamcmd.sh

SteamCMD Max OS X

Available Commands

Type help for more information on the available commands.

help

Login to SteamCMD

To download most game servers, you can login anonymously.

login anonymous

Some servers require you to login with a Steam Account. To find out if your server requires a login see Dedicated Servers List.

 Note: For security reasons it is recommended that you create a new Steam username just for SteamCMD.

 Note: A user can only be logged in once at any time.

login username

Next enter your password.

If Steam Guard is activated on the user account check your e-mail for a Steam Guard access code and enter it. This is required first time only.

You should see a message stating that you have successfully logged in with your account.

Installing a Server

1. Start SteamCMD and set your app install directory.

force_install_dir

Windows

force_install_dir c:\steamcmd\csgoserver

Linux

force_install_dir /home/steam/csgoserver

2. Install the app by using a Steam Application ID or <app_id>. To also validate the app add validate to the command. To participate in HLDS beta testing add -beta beta to the command. To participate in SRCDS beta testing add -beta prerelease to the command.

app_update  validate

Example for Counter Strike:Global Offensive

app_update 740 validate

Example for Team Fortress Classic
note: app 90 requires extra steps. See SteamCMD Workaround for “appid 90″.

app_set_config 90 mod tfc
app_update 90 validate

Automating SteamCMD

SteamCMD can be automated to run tasks directly from the command line/terminal. This is very useful for running your own scripts.
Example for Counter Strike:Global Offensive
Windows

steamcmd +login anonymous +force_install_dir c:\steamcmd\csgoserver +app_update 740 validate +quit

Linux

./steamcmd.sh +login anonymous +force_install_dir /home/steam/csgoserver +app_update 740 validate +quit

Example for Counter Strike:Condition Zero
Windows

steamcmd +login anonymous +force_install_dir c:\steamcmd\csczserver +app_set_config 90 mod czero +app_update 90 validate +quit

Linux

./steamcmd.sh +login anonymous +force_install_dir /home/steam/csczserver +app_set_config 90 mod czero +app_update 90 validate +quit

Example for Killing Floor
Windows

steamcmd +login +force_install_dir c:\steamcmd\kfserver +app_update 215350 validate +quit

Linux

./steamcmd.sh +login +force_install_dir /home/steam/kfserver +app_update 215360 validate +quit

For more info about SteamCMD you see the SteamCMD article on the Valve Wiki.

  • HackerFinn

    Not cool dude. You copied this from the Steam Developer Community’s Wiki page.
    Link here: https://developer.valvesoftware.com/wiki/SteamCMD
    This is clearly a direct copy. Not cool.
    You should remove this page ASAP.

    • Thats because I wrote a lot of whats on the steamcmd wiki page my username is Hivltg64. ;-P
      https://developer.valvesoftware.com/w/index.php?title=SteamCMD&action=history
      https://developer.valvesoftware.com/wiki/User:Hivltg64

      • Girayhan Menekay

        dude i need a auto update script for linux(centos7) do you know a tool or do you have script?

        • max2go

          dude you probably figured that out by now but if not then just search for how to kill a process in Linux… it’s not straightforward to turn that into a shell script though and that’s anyhow a completely different topic anyhow, so good luck with that.

      • max2go

        Well that’s great, but that doesn’t excuse the C:… on the Linux version. I’m sure everyone appreciates your documentation efforts, but not evaluating what you copy-paste is just no good for those who are new to Linux. Just saying… either do it right or don’t do it at all. Or if you make a mistake and others point you out on those, at least fix those.

        • Someone is a bit salty. I spend most my time on various projects and although I do try to avoid mistakes I do make them and miss things from time to time. Thanks for highlighting the error. I have now resolved it.

          • max2go

            You accuse me of being salty, whereas I just pointed out that “blindly” copy-pasting stuff doesn’t do newbies any good who don’t know how to fix such things, resulting in frustration and unnecessary questions. It’s a matter of taking a few seconds to read through your post after posting, for validation purpose; compared to taking much longer by not doing it and instead later on having to go back and editing it, additionally you and/or others having to reply to newbies explaining how to do it correctly. I’m not saying that your work is not appreciated in general, I was merely trying to make a point that it’d be more economical – and reduce frustration of newbies and possibly turning them away from using Linux / Ubuntu – if you’d take a few seconds per post to re-eval its correctness. Of course there’s no guarantee that your every post will be correct even with that, it’s easy to overlook / -think a mistake, happened to me too. But IMO your “snarkly” response is just counterproductive to what you’re trying to achieve, which, as far as I understand it, is to educate and help others, and not to frustrate / confuse them.
            Either way, I’m glad, even with your type of response, that you fixed your mistake (supposedly, meaning, I haven’t checked it again).

          • To put it simply you come across as rude and condescending. While I appreciate highlighting errors so I can resolve them there is a right and wrong way of going about it. Hence why I think you come across as salty. If it is not your intention to come across this way I suggest thinking about how you are writing so you come across more as friendly and helpful. Something like “Hey just to let you know you used the windows path in the Linux section. Could you please fix this. Thanks”. Comments like “Well that’s great, but that doesn’t excuse the C:.” and “either do it right or don’t do it at all” make you sound arrogant. Then you go about spending the time to post about how I should be writing my posts which makes you sound even more arrogant. I am sure you are just trying to help me out which is awesome but like I said you just come across as salty. Thank you again for highlighting the issue.

  • HackerFinn

    Ok. In that case I stand corrected. 🙂
    I may have come across as a bit harsh, which I am sorry about.
    You should give proper credit to any other cotributers though. 🙂

  • David Hale

    your linux scripts all reference C: as though it were a place in the linux OS.

  • randomstranger

    way easier then the steamcmd wiki

  • Samantha Schrier

    question im good to the point i have to login, im not getting an notification that i succesfully logged in. and i dont get an e-mail either. And after i have entered my password i can’t type anything in the console. anyone know the reason for it. ?

  • the_gurden

    on mac… trying to run it. enter ‘./steamcmd.sh’ iand get ‘no such file or directory’

    • Avatarang290

      I have the same problem now, even a year later

  • Pingback: SteamCMD ile Counter-Strike 1.6 Non-Steam server kurulumu – yeni sistem – bölüm 1 (Linux) | rootyetkisi.com()

  • Erik Lind-gousaid

    if anyone has trouble i made a automatic installer for LINUX go check it if you want, and its my first script so im open to suggestion https://github.com/Gousaid67/steamcmdlazyinstaller

    • Made a pull request on your repo 😉 Added some conventions and custom directory stuff 😉

      • Erik Lind-gousaid

        thx dude

    • My main project does this and more 🙂 https://gameservermanagers.com/. Good effort my project started off as a simple Killing Floor script.

      • Avatarang290

        Hey, I am on mac, and when I try input the /steamcmd.sh command thing, it says ‘no such file or directory’… Can you help me figure out how to fix this??

  • Pingback: SteamCMD ile Counter-Strike 1.6 Non-Steam server kurulumu – yeni sistem – bölüm 1 (Linux) | rootyetkisi.com - Teknoloji'nin tekniği ile ilgilenen bir web günlüğü()