Giter Club home page Giter Club logo

steam-hour-farmer's Introduction

Simple Steam hour farmer

steam-hour-farmer is a program that emulates you playing a game on Steam, with the purpose of effortlessly getting hours played on certain games on your profile.

  • Can be deployed on a VPS to run 24/7.
  • Only requires the games to be in your Steam library - they don't need to be installed.
  • When you start playing games on your main computer, it pauses automatically.
  • After you're finished playing, the bot resumes automatically (provided it's able to log in again).
  • Doesn't require multiple accounts.
  • Inspired by @Gunthersuper/steam-idle-bot.

How to use

  1. Have Node.js configured (minimum version 16). This can be done through nvm on a VPS or through the official website.

  2. Install this package:

    npm install -g steam-hour-farmer
    
  3. Make a directory somewhere. This is where your Steam data will be stored, and where you can configure the bot.

  4. Find your Steam game ids. In each game, go to Properties -> Updates -> Copy the App ID.

  5. In this directory, make an .env file with the content:

    ACCOUNT_NAME="your_steam_username"
    PASSWORD="your_steam_password"
    GAMES="440,4000"

    This will start playing Team Fortress 2 and Garry's Mod for example.

    The GAMES part of the file describes what games you'd like the bot to play, separated by a comma. You can also include a non-Steam game name, for example:

    GAMES="Hello World,440,400"

    Additionally, a PERSONA value may be supplied to set the online status of the user. Can be Online (1), Busy (2), Away (3), Snooze (4). For example,

    PERSONA="1"

    to be Online. Do not write this value if you don't want the user's presence to change.

    All of this configuration can be passed via environment variables too - they don't need to be in this .env file.

  6. Run the program in the same directory:

    steam-hour-farmer
    

Tip

If you have access to your Steam Shared Secret (using something like SteamDesktopAuthenticator), you can input it into a SHARED_SECRET variable like so:

SHARED_SECRET="xxxxxxxxxx"

This will prevent you from needing to input your Steam Guard code at all, and will allow the bot to reconnect without any manual intervention.

When the bot starts, it will request a Steam Guard code via email or the mobile application. When you start playing on another machine, the bot will be kicked from its session, requiring a re-login, with a new Steam Guard code.

This can be remedied by using the Steam Shared Secret, or disabling Steam Guard.

Note that the playtime might seem to be the same when looking from another client - it can take a couple hours for Steam to refresh it sometimes.

Running in the background

To run the program in the background, multiple methods can be followed. These include:

  • Using PM2 (this is what I use)
  • Creating a Systemd service
  • Using GNU Screen

steam-hour-farmer's People

Contributors

tacheometry avatar

Stargazers

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

Watchers

 avatar

Forkers

pedromaia999

steam-hour-farmer's Issues

Background running question

Hello! I was wondering if this application can be hosted as a web service (or something else) on a website like render.com. If anyone here has the experience of doing that, I nicely ask you to share it for a better understanding. Thanks!

InvalidPassword

Hello,

After running the steam-hour-farmer I keep getting that the password is wrong, I have double checked it and the password is corrent, what could be the issue?

start in background

hi, im wondering how i can start the bot in background. If I start it with "steam-hour-farmer" and disconnect the SSH Session to the server afterwards, the bot will stop since its not a service.
Please provide some information how to leave it running in the background or alternative starting methods.
thanks

Specifying a custom game name

Hi! Is it possible to specify your own game name in the “GAMES” parameter ? For example “GAMES”=“MY SUPER GAME NON STEAM”, but still have the selected games running (e.g. 570, 730). Or is there another parameter for this ?

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.