tacheometry / steam-hour-farmer

Farm/boost/idle hours headlessly on Steam without game installation
https://npmjs.com/steam-hour-farmer
MIT License
29 stars 4 forks source link

Hello can you please guide me why this error is showing ? #9

Closed easynoob22 closed 2 months ago

easynoob22 commented 3 months ago

PS C:\Users\Cyber\Desktop\package> steam-hour-farmer Documentation: https://github.com/tacheometry/steam-hour-farmer Environment variable "ACCOUNT_NAME" should be provided, but it is undefined. PS C:\Users\Cyber\Desktop\package>

tacheometry commented 3 months ago

Have you made an .env file? Is it in the Desktop/package directory?

easynoob22 commented 3 months ago

yes that file name is acc.env

content present in that file: ACCOUNT_NAME="my username" PASSWORD="my password" GAMES="730"

tacheometry commented 3 months ago

Oh it needs to be named exactly .env, nothing else in the name

tacheometry commented 3 months ago

I've changed the wording in the documentation page a bit

easynoob22 commented 3 months ago

Hi, thank you it's working fine now. Can you please guide me how to run this programm 24/7 at free of cost ?

tacheometry commented 3 months ago

You need a server to run it on, and that can be your own PC or from somewhere you rent a VPS from - which isn't necessarily free. Once you've made your choice, to run it in the background here's some suggestions: https://github.com/tacheometry/steam-hour-farmer?tab=readme-ov-file#running-in-the-background

easynoob22 commented 3 months ago

Hi I have 0 knowledge, can you help me to run it in background by using forever command ? or maybe systemd ? What I need to do exactly ?

tacheometry commented 3 months ago

Here's how to do it with pm2:

  1. Install pm2: npm install pm2 -g
  2. Go to your directory with all the files
  3. Now run pm2 start steam-hour-farmer
  4. When you want to check out how the app is doing, run pm2 ls
  5. You'll see a row with steam-hour-farmer, and its id number will be on the left side - it's probably 0
  6. If you want to stop the farmer you run pm2 stop 0, or if you want to see logs you do pm2 logs 0
  7. To start the farmer after stopping it you do pm2 start 0, but if you never stop it you don't need to do this
  8. Now that you can confirmed the farmer is running, you can configure pm2 to start on boot. Follow the guide here: https://pm2.keymetrics.io/docs/usage/startup, and then run pm2 save

There's more guides on pm2 out there, but this should help get you started 👍

easynoob22 commented 3 months ago

Here's how to do it with pm2:

  1. Install pm2: npm install pm2 -g
  2. Go to your directory with all the files
  3. Now run pm2 start steam-hour-farmer
  4. When you want to check out how the app is doing, run pm2 ls
  5. You'll see a row with steam-hour-farmer, and its id number will be on the left side - it's probably 0
  6. If you want to stop the farmer you run pm2 stop 0, or if you want to see logs you do pm2 logs 0
  7. To start the farmer after stopping it you do pm2 start 0, but if you never stop it you don't need to do this
  8. Now that you can confirmed the farmer is running, you can configure pm2 to start on boot. Follow the guide here: https://pm2.keymetrics.io/docs/usage/startup, and then run pm2 save

There's more guides on pm2 out there, but this should help get you started 👍

Thanks a lot. <3

tacheometry commented 3 months ago

Let me know if you run into problems 👍