02-13-2018, 04:30 PM
Hello,
I noticed that quite a lot of users run gekko in a screen process to keep it running while they are logged off. But there's a better way, use PM2!
The installation is quite simple:
Ubuntu/Debian users might want to run it with: sudo
Now that you have pm2 installed, there's just one more step to start gekko:
For CLI bots use:
To run the UI use:
Everything after the doubledash is passed as an argument to the gekko.js process. The parameter -n names your process. You have to give every instance a name, otherwise pm2 will refuse to start more than one instance of gekko.
To list all running processes use:
To stop a process use:
Once a process is stopped you can remove it from the list using:
PM2 stores the output of each process in your users homedir in ~/.pm2/logs. You can watch the logs with:
I hope this helps anyone who's stuck in a hell of running a bunch of screen processes in parallel.
Tips are welcome:
ETH 0x40ddba96695bc040ccbe34b4cfa3a7ae8f225583
I noticed that quite a lot of users run gekko in a screen process to keep it running while they are logged off. But there's a better way, use PM2!
The installation is quite simple:
Code:
npm install pm2 -g
Now that you have pm2 installed, there's just one more step to start gekko:
For CLI bots use:
Code:
pm2 start gekko.js -n "yourNameHere" -- -c my_config.js
To run the UI use:
Code:
pm2 start gekko.js -n "ui" -- --ui
Everything after the doubledash is passed as an argument to the gekko.js process. The parameter -n names your process. You have to give every instance a name, otherwise pm2 will refuse to start more than one instance of gekko.
To list all running processes use:
Code:
pm2 list
To stop a process use:
Code:
pm2 stop [id|name]
for instance:
pm2 stop 0
or
pm2 stop ui
Once a process is stopped you can remove it from the list using:
Code:
pm2 delete [id|name]
for instance:
pm2 delete 0
or
pm2 delete ui
PM2 stores the output of each process in your users homedir in ~/.pm2/logs. You can watch the logs with:
Code:
pm2 logs
or
pm2 logs [id|name]
to watch a specific process
I hope this helps anyone who's stuck in a hell of running a bunch of screen processes in parallel.
Tips are welcome:
ETH 0x40ddba96695bc040ccbe34b4cfa3a7ae8f225583