Raykay101

(WIP) ArchiSteamFarm on Raspberry Pi

May 5th, 2019 (edited)
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.66 KB | None | 0 0
  1. Hey this is just a quick guide on how to install and setup ASF on your Raspberry Pi. Assuming you are a complete beginner to Debian and need a step by step guide. You came to the right place. So let's begin.
  2.  
  3. To start, I strongly recommend you use at-least a Raspberry Pi 3 Model B or newer. Having at-least 1GB of ram and the higher processing speed will help you a ton for future expansion of bots. ASF is already a super light-weight and optimized program to begin with, but it never hurts to have more breathing room.
  4.  
  5. **Update**
  6. curl -SL -o dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/67766a96-eb8c-4cd2-bca4-ea63d2cc115c/7bf13840aa2ed88793b7315d5e0d74e6/dotnet-sdk-3.1.100-linux-arm.tar.gz
  7. sudo mkdir -p /usr/share/dotnet
  8. sudo tar -zxf dotnet.tar.gz -C /usr/share/dotnet
  9. sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
  10.  
  11. To start ASF
  12. dotnet ./ArchiSteamFarm.dll
  13.  
  14. **Update2**
  15. Instead of using "SCREEN/DAEMON" you can add ArchiSteamFarm to crontab/make a cronjob for it, so it starts up on bootup
  16.  
  17. To edit cron:
  18. crontab -e
  19.  
  20. At the bottom add this:
  21. # ArchiSteamFarm on Startup
  22. @reboot /home/pi/ASF/ArchiSteamFarm
  23.  
  24.  
  25. ==========================================================================================================================================
  26. BASIC INSTALL
  27. ==========================================================================================================================================
  28. I am going to assume you already have installed Raspbian (Debian) on your micro-SD card already. After booting into your Raspberry Pi. You will be prompted to login in.
  29. Username: pi
  30. Password: raspberry
  31.  
  32. To change your password, the command is:
  33. passwd
  34. *Note: The password you type is hidden so you won't be able to see it if you mistype it
  35.  
  36. I would first want to enable SSH (so you can remotely manage your Pi on another local computer) and won't need to have a keyboard and monitor attached to your Pi 24/7. Enter the following:
  37. sudo systemctl enable ssh
  38. sudo systemctl start ssh
  39.  
  40. Optionally, you should also assign a static IP address to the Pi. Makes future management of your Raspberry Pi a breeze. I would set it to something like 192.168.0.10. You will also need to go onto your router to assign that IP address to that specific device.
  41.  
  42. Enter the following:
  43. cat /etc/resolv.conf
  44.  
  45. Take note of what your nameserver is (DNS server).
  46.  
  47. Enter the following:
  48. sudo nano /etc/dhcpcd.conf
  49.  
  50. Using your arrow keys, navigate to the bottom of the file, add the following lines:
  51. interface eth0
  52. static ip_address=192.168.0.10/24
  53. static routers=192.168.0.1
  54. static domain_name_servers=192.168.0.1
  55.  
  56. Once completed, press Ctrl+O and then press Enter to save the configuration changes. After press Ctrl+X to leave.
  57. For the rest of this guide, we will be using the nano text editor mostly because it is very easy for beginners to use.
  58.  
  59. After saving the file, restart the Pi:
  60. sudo reboot
  61.  
  62. To check if your IP addressing has been successfully configured, use the following command:
  63. ifconfig
  64.  
  65. If for some reason this command does not work, download the package using the following command:
  66. sudo apt-get install net-tools
  67.  
  68. You should now be able to go on to another PC in your network and open a program called PuTTy (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html). Enter the IP address you set and you should be able to do everything from this point on-wards on a different PC.
  69.  
  70. This would probably be a good time now to update your system. Use the following command:
  71. sudo apt-get update
  72. sudo apt-get dist-upgrade
  73.  
  74. Then to clean up/conserve space on your memory card use the following command:
  75. sudo apt-get clean
  76.  
  77. ==========================================================================================================================================
  78. INSTALLING DOTNET
  79. ==========================================================================================================================================
  80. So up until now, we have not done anything ASF related. This has been just to get the bare minimum we should do. A good foundation if you will to build off of.
  81.  
  82. First lets get dotnet/.NET installed.
  83.  
  84. Enter the following commands:
  85. sudo apt-get install curl libunwind8 gettext
  86. wget https://download.visualstudio.microsoft.com/download/pr/9650e3a6-0399-4330-a363-1add761127f9/14d80726c16d0e3d36db2ee5c11928e4/dotnet-sdk-2.2.102-linux-arm.tar.gz
  87. wget https://download.visualstudio.microsoft.com/download/pr/9d049226-1f28-4d3d-a4ff-314e56b223c5/f67ab05a3d70b2bff46ff25e2b3acd2a/aspnetcore-runtime-2.2.1-linux-arm.tar.gz
  88.  
  89. mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-2.2.102-linux-arm.tar.gz -C $HOME/dotnet
  90. export DOTNET_ROOT=$HOME/dotnet
  91. export PATH=$PATH:$HOME/dotnet
  92.  
  93. tar zxf aspnetcore-runtime-2.2.1-linux-arm.tar.gz -C $HOME/dotnet
  94.  
  95. To make sure you have it installed correctly, type the following command:
  96. dotnet --version
  97.  
  98. Your version should be 2.2.1.
  99.  
  100. ==========================================================================================================================================
  101. INSTALL ASF
  102. ==========================================================================================================================================
  103. Next, download the latest version of ArchiSteamFarm from here (https://github.com/JustArchiNET/ArchiSteamFarm/releases/latest). Scroll down to the bottom, until you find the "ASF-linux-arm.zip". Copy the URL for that one.
  104.  
  105. On the PuTTy/SSH window type the following after copying the URL:
  106. wget (right click to paste URL)
  107.  
  108. Type the following command:
  109.  
  110. Make a folder/directory called ASF:
  111. mkdir ASF
  112.  
  113. Moving the .zip we downloaded to the folder we made above:
  114. mv ASF-linux-arm.zip ASF
  115.  
  116. Change directory/moving into the folder/directory we made:
  117. cd ASF
  118.  
  119. Unzipping the .zip file:
  120. unzip ASF-linux-arm.zip
  121.  
  122. Change file permissions:
  123. chmod +x ArchiSteamFarm.dll
  124.  
  125. Let's quickly test to see if ASF is working properly. To start the program up we need to enter the following command:
  126. dotnet ArchiSteamFarm.dll
  127.  
  128. Ctrl+C to stop the program.
  129.  
  130. Assuming I made the guide correctly which is completely off of my memory and you entered all the commands correctly. We have successfully installed ASF on our Raspberry Pi. Next we will need to start adding the basic configurations/accounts/bots.
  131.  
  132. ==========================================================================================================================================
  133. CONFIGURATIONS
  134. ==========================================================================================================================================
  135. All your configurations need to be located in the "config" directory/folder. So something like:
  136. pi@raspberrypi:~/ASF/config $
  137.  
  138. To get to that we will need to enter the following command:
  139. cd ASF/config
  140.  
  141. *Optionally you can create your config files using the web config generator found here: https://justarchinet.github.io/ASF-WebConfigGenerator/#/ and when they are downloaded onto your PC, just copy and paste them into your PuTTy window.
  142.  
  143. Lets start with creating the ASF.json file:
  144. touch ASF.json
  145. nano ASF.json
  146.  
  147. Once inside the ASF.json file copy and paste the following into it:
  148. {
  149. "MaxTradeHoldDuration": 0,
  150. "Headless": false,
  151. "IPC": true,
  152. "OptimizationMode": 1,
  153. "s_SteamOwnerID": "steamID 64 here",
  154. "IPCPassword": "set any password here"
  155. }
  156.  
  157. Once done, press Ctrl+O and then Enter to save the configuration changes. Then press Ctrl+X to leave.
  158. You can find your steamID 64 here: https://steamid.io/
  159. We also are enabling IPC, because it is really helpful for beginners that do not want to be spending a lot of time in the command-line interface.
  160. What is IPC? Well it is basically the GUI/graphical user interface that lets you manage all your accounts/bots on a nice webpage.
  161.  
  162. Now to add bots to your Pi.
  163. Create a file called (Bot-Name).json using the following command:
  164. touch (Bot-name).json
  165. nano (Bot-name).json
  166.  
  167. {
  168. "SteamLogin": "steam login here",
  169. "SteamPassword": "steam password here",
  170. "Enabled": true,
  171. "AutoSteamSaleEvent": true,
  172. "SendOnFarmingFinished": false
  173. }
  174.  
  175. The lines above are just an example, ASF is very flexible and has many more options and configurations you can add or remove.
  176.  
  177. *Optionally again, you could be using the web config generator to make the bot configs as well. https://justarchinet.github.io/ASF-WebConfigGenerator/#/bot
  178.  
  179. ==========================================================================================================================================
  180. SETTING UP SDA
  181. ==========================================================================================================================================
  182. I use SteamDesktopAuthenticator (SDA) for all the bot accounts. You will want to find your .maFiles which should be located in a folder called maFiles within SDA. Move them onto the "config" directory/folder. Using the following commands:
  183.  
  184. touch (Bot-name).mafile
  185. nano (Bot-name).mafile
  186.  
  187. Copy and paste into file
  188.  
  189. Once done, press Ctrl+O and then Enter to save the configuration changes. Then press Ctrl+X to leave.
  190.  
  191. Repeat for each bot you have.
  192.  
  193. Rename each .maFile to the correct bot-name to make ASF know which .maFile belongs to which bot. It can automatically sort through them itself without renaming the files, but it will make it a little easier for ASF. Make sure your maFiles do not have any encryption on them.
  194.  
  195. If everything was setup correctly, you should be able to have your ASF bots automatically sign into Steam without having to manually authenticate each account.
  196.  
  197. ==========================================================================================================================================
  198. SCREEN/DAEMON
  199. ==========================================================================================================================================
  200. To have ASF constantly running without needing to have the PuTTy/SSH connection open 24/7 we need to run a daemon I believe its called.
  201. I personally like to use "screen".
  202. To install screen enter the following:
  203. sudo apt-get install screen
  204.  
  205. Once installed, type:
  206. screen
  207.  
  208. Now start ASF inside this instance and you should be able to close the PuTTy/SSH connection and the program will continue to run.
  209.  
  210. Again, to launch ASF enter the following command:
  211. cd ASF
  212. dotnet ArchiSteamFarm.dll
  213.  
  214. ==========================================================================================================================================
  215. CONTACT
  216. ==========================================================================================================================================
  217. If you need help with setting anything up. Feel free to contact me on Steam.
  218. https://steamcommunity.com/id/Raykay16/
Add Comment
Please, Sign In to add comment