How to install Profit Trailer v2 on linux/ubuntu
Installing Profit Trailer v2 can be very scary for some people who have never used linux before. I much prefer to use a web based version of Prfit Trailer rather then a windows RDP VPS. I have the steps below to install it yourself, or you can use my script to install it automatically and quickly. Now my script is setup assuming you will be running multiple bots. If you are not, that is OK, it will still work either way. If you do choose to run another bot, you are already to go. The first instance of Profit Trailer will be installed in directory called /home/tradingbot/profittrailer/bot1. I run multiple bots so I have it setup this way. It makes it much easier to keep things organized and when using pm2 command as well.
(If you need a fast linux VPS, I suggest Shockhosting)
Log into your linux VPS and copy / paste the command below into your SSH session and then press ENTER.
cd /home && wget https://tradingbot.ca/scripts/profittrailer/v2/bot1-install && sh bot1-install
Let the script run. It should only take a few minutes to run. The first time will be the longest as it will update your Ubuntu and install required software. Adding additional bots afterwards is installed pretty much instantly.
Once its done, you just need to configure the application.properties file.
cd /home/tradingbot/profittrailer/bot1 then press enter.
nano application.properties then press enter.
Remember, all info for the nano application.properties can be found online with the link below .
Now there are a few things in this file you need to add for Profit Trailer to work. This is the bare minimum. You are free to customize anything else that fits your needs.
license = your ProfitTrailer license key
trading.exchange = BINANCE or BITTREX or POLONIEX ( must be UPPERCASE)
default_api_key = The Exchange API key registered with PT Assistant
default_api_secret = The Secret key for the default_api_key
trading_api_key = The second Exchange API key.
trading_api_secret = The Secret for the second API Key
NOTE: You can copy/paste all the info here. If you are using Putty, you can right click where you want to paste it.
Once you are done, press CRTL O then press enter. This will save the file. Then press CRTL X to exit nano and go back to command line.
pm2 start pm2-ProfitTrailer.json and press enter to launch Profit Trailer.
Give it a few seconds, then open your web browser and type http://vps_server_ip:8081 (assuming you never changed the port) and press enter.
You will get prompted to create an Admin password and to enter in your exchange Default API key.
Once you do that, it wll take you to the login screen. Enter in your password and you are all set.
If you ever have issues with your bot and you want to stop, restart or look at the log files below are the commands to do it.
pm2 list – this will show you all the bots/processes working. (Profit Trailer, PTMagic,Profit Feeder)
pm2 log appname or id# – pm2 log 0 or pm2 log BOT1-profit-trailer will show you the current log file as it happens. This is good for troubleshooting any issues if they arise
pm2 stop appname or id# – this will stop a process/bot
pm2 start appname or id# – this will start a process/bot
pm2 reload appname or id# – this will reload a process/bot
Manual Installation of Profit Trailer v2.x
If you want to manual install Profit Trailer v2 you can copy and paste the commands below. They are the same I used in the script. Copy one line at a time and press enter after each line.
apt update && apt upgrade -y
apt install unzip nano default-jdk nodejs npm -y
ln -s /usr/bin/nodejs /usr/bin/node
npm install pm2@latest -g
mkdir tradingbot && cd tradingbot
mkdir profittrailer && cd profittrailer
wget -O – https://github.com/taniman/profit-trailer/releases/download/2.0.7/ProfitTrailer-2.0.7.zip > profittrailer.zip
mv ProfitTrailer-2.0.7 bot1
wget -O – https://tradingbot.ca/scripts/profittrailer/v2/bot1-pm2-ProfitTrailer.json > pm2-ProfitTrailer.json
chmod +x ProfitTrailer.jar
pm2 start pm2-ProfitTrailer.json
Follow steps above to edit your application.properties and below to finish install of Profit Traileu