Hi there, today I will show you guys how to running GUNBOT in Linux.
After this guide, I have faith that you can run GUNBOT in Linux without any problem.
Host and GUNBOT versionDigitalOcean 16.04.2 x64 (512MB)
GUNBOT Beta 2.0.4 - Linux (x64)
NodeJS v6.10.2
PM2 2.4.4
How to connect to the serverWindows UserFor Windows User, I recommend to use putty as a SSH client, which can let you connect to your server. You can download it from here:
http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.htmlJust download putty and it should work~
Paste you VPS IP in the hostname field, then click Open, then enter your password(sent by Email(DigitalOcean))
After that you will has access to your VPS now.
Linux UserI believe that there is nothing you need to do, because you have SSH installed by default.
Just type the following line in your terminal, noted that you should replace 123.123.123.123 to your VPS IP
ssh 123.123.123.123
Now we are connecting to the server, time for the next move.
Install the packages that the GUNBOT neededTo run GUNBOT on the background, I'd perfer to use pm2, so we may need NodeJS to run pm2.
Don't worry, Just follow my lead~
Installing NodeJSType in your terminal
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
Then run
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
After that, run
nvm install --lts
When you see this, which mean we have NodeJS installed.
Installing pm2pm2 is an awesome process manager for NodeJS, also we can use it to run GUNBOT
npm install -g pm2
Installing unzipapt install unzip
Let get GUNBOT runningTo start with, we need to downlaod the bot first. Then we need to unzip it and move to a folder.
I'd like to move the all the file to /root/gunbot
wget https://github.com/GuntharDeNiro/BTCT/releases/download/Beta2.0.4lin/gunbotv2.0.4_linux_x86_x64.zip # Download the GUNBOT
unzip gunbotv2.0.4_linux_x86_x64.zip # Unzip
mv gunbotv2.0.4_linux_x86_x64/ gunbot/ # I perfer to use this folder
cd gunbot/ # cd into the folder
You will have those file in the folder.
Now, we need to make the gunbot executable
chmod +x gunbot
Now we can edit the config file via nano, forget about the config name. We can consider BTC_DASH-config.js as a default config file.
nano BTC_DASH-config.js
Using →←↑↓ to locate, you want to save the file?
Ctrl + x then
y then
EnterWe use
cp to generate the config file. If you want to trade with BTC_ETH and BTC_ETC, just type
cp BTC_DASH-config.js BTC_ETH-config.js
cp BTC_DASH-config.js BTC_ETC-config.js
Now we need a gunbot.yaml file to start pm2
nano gunbot.yaml
Copy and paste the following line.
apps:
- script : ./gunbot
name : 'BTC_ETH'
args : 'BTC_ETH'
- script : ./gunbot
name : 'BTC_ETH'
args : 'BTC_ETH'
- script : ./gunbot
name : 'BTC_ETH'
args : 'BTC_ETC'
You want to trade more pairs, just write them down in the same format
Now we come to the most excited moment, let start it~
pm2 start gunbot.yaml
Here we go~
How can I see the logsNice question, we need GUNBOT's log for analytics.
There are two ways for us to see the logs
[size=12]Viewing all logs in one place[/size]
pm2 monit
[size=12]Viewing a single paris logs[/size]
Example BTC_ETH
pm2 logs BTC_ETH
From here you can know why the bot restarted and the new logs.
----
Now, everything should work, good luck~