Run on cloud service
This guide shows steps to run the tool on a cloud service for mainnet with docker.
This tool can be hosted on any cloud platform which supports Node.js or Docker.
One caveat is that platforms using ephemeral filesystem(ex. Heroku and Digital Ocean App) are not suitable because this tool stores JSON data and export CSV files.
In this guide, we host on Render.com which is not expensive and friendly for non-developer. With Render.com, We can setup our server without touching Terminal and Editor
- 1.
- 2.Select "New Web Service"


You can use forked repository from the original source code if you want.
4. Setup web service as follows

If you set up for dYdX, please select one of the regions except for Oregon(US West) at the region field, because dYdX has location restrictions for United States.
- In terms of plans, we need at least Starter plan($7/month) so that we can add Disk. (Enter payment information if it is not yet)

- Click "Advanced" accordion and click "Add Secret File" and input as follows
Filename: .env
File Contents: paste environment variables that you created in this guide but values must be replaced with mainnet ones.

Copy and paste the below code and fill in your values.
.env
1
# Required variables for dydx
2
ETH_ADDRESS=
3
STARK_PUBLIC_KEY=
4
STARK_PRIVATE_KEY=
5
API_KEY=
6
API_PASSPHRASE=
7
API_SECRET=
8
9
# Required variables for perpetual protocol
10
PERPETUAL_PRIVATE_KEY=
11
12
# Optional variables
13
TRADINGVIEW_PASSPHRASE=
14
SENTRY_DNS=
- Click "Add Disk" and input as follows
Name: any string you want
Mount Path: /app/data
Size: 1GB is enough

At the Auto deploy field, if we set it to yes, render.com automatically deploys changes to your service when I or someone push to this Github repository. I recommend setting them to No because it’s safer and we can also deploy manually
- Leave other fields as default and click "Create Web Service"
5. Automatically start deployment and wait until it's done
6. After deployment is done, click your endpoint URL

If you see a status message of your set up on your browser, the server is running properly.
Use this endpoint as Webhook URL when you set strategy alert on Tradingiview.
In addition, we highly recommend setting up two-factor authentication on Render.com

Account Setting > Security
Dockerfile and docker-compose.yml are included in the source code.
So just start up by
docker-compose build
docker-compose up -d
Last modified 3mo ago