-
Create a AWS lightsail account
-
Deploy an VPS instance
- Go to AWS lightsail > Intances
- Select Create instance
- Select the closest region to your exchange : ap-northeast-1 for Binance and FTX
- Select Linux/Unix > Apps + OS > Node.js
- Name it like you want
- Validate creation
-
Add a static IP
- Go to AWS lightsail > Networking
- Select Create static IP
- Attach it to your instance (if you're not seeing it wait few minutes)
- Name it like you want
- Validate creation
If you're not confident with SSH you can open a Terminal using your browser on AWS lightsail by clicking on your instance and skip this step
-
Create SSH key pairs
- Go to AWS lightsail > SSH keys
- Select default key
- Download the
.pem
file (let's pretend that you saved it here~/Downloads/key.pem
)
-
Test your access
-
Open a local terminal session
-
Adjust your key rights with this :
chmod 400 ~/Downloads/key.pem
-
-
SSH to your instance using the downloaded key like this (you can find the username/ip by selecting your instance here) :
ssh [email protected] -i ~/Downloads/key.pem
Your Node.js instance must be a Bitnami one
-
Open a terminal session with your instance
-
Clone the app sources :
git clone https://github.com/thibaultyou/tradingview-alerts-processor.git
-
Install app and configure the server :
cd tradingview-alerts-processor/ sh install.node.sh
-
You should see npm entry with
online
status, if this is not the case reconfigure PM2 and check again with :pm2 start npm -- start pm2 save pm2 status npm
For those steps you need to be logged in your instance, see the first command in 🚀 Install and configure app
-
Check app logs :
pm2 logs npm
-
Check trading logs :
tail -f logs/trades.log
-
Update the app :
cd tradingview-alerts-processor/ sh update.node.sh
-
Restrict commands to Tradingview alerts system only, once activated you'll not be able to send commands from your computer with HTTP requests, please add your accounts before using this :
- Go to AWS lightsail > your instance > Networking
- Add a filter rule on TCP port 80
- Check restrict to IP
- Add the following :
- 52.89.214.238
- 34.212.75.30
- 54.218.53.128
- 52.32.178.7