Skip to content

Instantly share code, notes, and snippets.

@Ash258
Last active January 25, 2024 14:39
Show Gist options
  • Save Ash258/5ded8e525b6acc9cd0f2101469b91fae to your computer and use it in GitHub Desktop.
Save Ash258/5ded8e525b6acc9cd0f2101469b91fae to your computer and use it in GitHub Desktop.
How to run steamcmd on Raspberry PI

SteamCMD under Rraspberry PI using Docker

First time setup

  1. mkdir SteamCMD

  2. cd SteamCMD

  3. export stUsername=<yourUsername>

  4. export stPW=<YourPassword>

  5. export stPL=windows

  6. export stID=<gameID>

  7. Create script file

    cat <<EOF > script.txt
    @ShutdownOnFailedCommand 1
    @NoPromptForPassword 1
    @sSteamCmdForcePlatformType $stPL
    force_install_dir /steamDL
    login $stUsername
    app_update $stID validate
    quit
    EOF
  8. Install docker cross-platform emulator

    1. docker pull tonistiigi/binfmt
    2. docker run --privileged --rm tonistiigi/binfmt --install all
  9. docker run --platform linux/amd64 -it --rm -v "steamLogin:/root/.steam:z" -v "$PWD/dl:/steamDL" steamcmd/steamcmd:latest +login $stUsername $stPw

    1. Insert Steam Guard code when prompted
    2. Wait for OK
    3. Write quit when you see Steam>
  10. Initial setup is done

Repeated process

When you have finished above you can now just edit the script.txt file with your new game ID and start the download process for any game/server:

  1. docker run --platform linux/amd64 -it --rm -v "steamLogin:/root/.steam:z" -v "$PWD/dl:/steamDL" -v "$PWD:/cosi" steamcmd/steamcmd:latest +runscript /cosi/script.txt

Donwload on Rpi image

@aronsz155
Copy link

Hello. What operating system You used? Ubuntu or another? 32 or 64 bit?? Thank You for help :)

@ar-nadeem
Copy link

Not of working quality, because of this issue tonistiigi/binfmt#104

@Golaco
Copy link

Golaco commented Dec 13, 2022

Im getting an error when logging in, heres a screenshot:
https://prnt.sc/wzLHT26XDUPH
Any idea why?

@javiemgz
Copy link

javiemgz commented Jan 6, 2023

i have same problem as @Golaco, any solutions?

@iwakura1ain
Copy link

iwakura1ain commented Jan 16, 2023

@javiemgz, I also had the same problem , so instead I manually installed it by going inside the steamcmd image.

  • Open a shell connection using command.
$ docker run --platform linux/amd64 --entrypoint /bin/sh -it steamcmd/steamcmd:latest
  • Next run steamcmd, log in anonymously, and install your game.
    (It seems to install fine and I think I got it to run, trouble is it hangs when started.)
Steam> login anonymous
Steam> app_update [APPID here] validate
  • Or install into local mounted directory named data from the host pc. (Have not tested this yet)
$ docker run --platform linux/amd64 -it -v $PWD:/data steamcmd/steamcmd:latest +login anonymous +force_install_dir /data +app_update [APPID here]  +quit

@Krivers29
Copy link

I also have that error, and I can't download games with an anonymous login.
Did anybody found why we can't logging in?

@SimplyAspect
Copy link

I am still getting the same error as @Golaco is getting of which is https://prnt.sc/wzLHT26XDUPH However, I tried @iwakura1ain's method, When I attempt to do that method, I get asked a password for the anonymous user and I tried my steam password and such, and still get it as password wrong. I tried blank passwords and all that. Is there any new solution. My goal is to host a Satisfactory server on my Pi4

@Kyle2142
Copy link

FYI you can replace all in the emulator install with amd64,386 since you don't need the other types

@acaburaz
Copy link

acaburaz commented Jan 23, 2024

i keep getting "exec /bin/sh: exec format error"
im on the latest image (Linux raspberrypi 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux)

Anyone got any hints?
#Solved it by doing postinstall
https://docs.docker.com/engine/install/linux-postinstall/

and made sure i ran, docker run --privileged --rm tonistiigi/binfmt --install all

@acaburaz
Copy link

Had to use @sSteamCmdForcePlatformBitness 64 inside steamcmd

@Jean-EC
Copy link

Jean-EC commented Jan 25, 2024

I'm having an issue at the very end , when it's supposed to install the game it says that it requires a 64 bit system but I mean , the whole point of this tutorial is to emulate 64 bits right ?
image
After the command :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment