You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Tip:** you can exit the CLI by pressing `Ctrl+c`
26
-
27
-
28
-
25
+
**Tip:** you can exit the CLI by pressing `Ctrl+c`.
29
26
30
27
<br/><br/><br/>
31
28
@@ -37,22 +34,23 @@ If your CLI isn't running, start it with:
37
34
npm start
38
35
```
39
36
40
-
Once the CLI is initialized, it will prompt you with a form where you will be able to input the configuration that will be used by your Balancer instance.
37
+
Once the CLI is initialized, it will prompt you with a form where you can input the configuration for your Balancer instance.
41
38
42
39
**Note:** these values can be easily modified in the future.
43
40
44
41
## `GUI_URL`
45
42
46
-
If you own a domain and are going to setup a [Cloudflare Tunnel](../setup-cloudflare-tunnel/index.md), enter the URL to your domain (e.g https://yourdomain.com). Alternatively, you can make use of a subdomain as follows: https://balancer.yourdomain.com.
43
+
Enter the URL that will be used to access your Balancer GUI (Graphical User Interface).
44
+
45
+
The URL can be any domain (e.g. https://mydomain.com) or a subdomain (e.g. https://balancer.mydomain.com).
47
46
48
-
Otherwise, enter your Droplet's IP Address (`ipv4`) followed by the GUI's port (`8090`). For example: http://143.244.128.76:8090.
49
47
50
48
51
49
<br/>
52
50
53
51
## `TELEGRAM`
54
52
55
-
Enabling Telegram on your Balancer instance will create a communication stream that will keep you up-to-date with your position and the market state in general. If you wish to do so, follow the ["Setup Telegram"](./docs/setup-telegram/index.md) guide and enter the **Telegram Bot Token** and the **Chat ID** when prompted.
53
+
Enabling Telegram on your Balancer instance will create a communication stream that keeps you up-to-date with your position and the market state. If you wish to enable this feature, follow the ["Setup Telegram"](../setup-telegram/index.md) guide and enter the **Telegram Bot Token** and the **Chat ID** when prompted.
56
54
57
55
If you do not wish to enable Telegram, simply leave the defaults by pressing enter twice.
58
56
@@ -62,25 +60,23 @@ If you do not wish to enable Telegram, simply leave the defaults by pressing ent
62
60
63
61
## `EXCHANGE_CONFIGURATION`
64
62
65
-
You will be asked to select the quote asset you wish to trade with (Defaults to **USDT**). Additionally, you will be able to select the exchange that will be used by the indicators and the position module (Defaults to **binance**).
66
-
67
-
63
+
You will be asked to select the quote asset you wish to trade with (Defaults to **USDT**). Additionally, you can select the exchange that will be used by the indicators and the position module (Defaults to **binance**).
68
64
69
65
<br/>
70
66
71
67
## `EXCHANGE_CREDENTIALS`
72
68
73
69
### Creating an API Key & Secret (Binance)
74
70
75
-
1. Navigate to your "Dashboard", expand the "Account" menu and click on ["API MAnagement"](https://www.binance.com/en/my/settings/api-management).
71
+
1. Navigate to your "Dashboard", expand the "Account" menu, and click on ["API Management"](https://www.binance.com/en/my/settings/api-management).
76
72
77
-
2. Click on the "Create API" button, select the **"System generated"** option and name it "balancer".
73
+
2. Click on the "Create API" button, select the **"System generated"** option, and name it "balancer".
78
74
79
75
3. Click on "Edit restrictions" and under "IP access restrictions", choose the option "Restrict access to trusted IPs only".
80
76
81
-
4. Enter your Droplets IP Address (`ipv4`), confirm the input and click on the "Save" button.
77
+
4. Enter your Droplet's IP Address (`ipv4`), confirm the input, and click on the "Save" button.
82
78
83
-
5. Click on "Edit restrictions" again and make sure that the only checked API restrictions are:
79
+
5. Click on "Edit restrictions" again and ensure that the only checked API restrictions are:
84
80
- Enable Reading
85
81
- Enable Spot Trading
86
82
@@ -97,16 +93,53 @@ Once you have configured your account's API, enter your **API Key** and **Secret
97
93
98
94
## `TUNNEL_TOKEN`
99
95
100
-
Setting up a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) increases the security and reliability of your Balancer instance significantly for very little effort and allows you to serve your Balancer instance through a domain you own.
96
+
In order to be able to serve Balancer through a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/), you need a domain and be able to manage its DNS records.
97
+
98
+
Follow these steps to generate your `TUNNEL_TOKEN`:
99
+
100
+
1. Log into your Cloudflare account and navigate to the "Zero Trust" section. Follow the steps and create your team. Note that you can always choose the free plan despite the apparent pay wall.
101
101
102
-
If you with to enable this feature go through the ["Setup a Cloudflare Tunnel"](../setup-cloudflare-tunnel/index.md) guide and enter the **Tunnel Token** once you have generated it.
102
+
2. After completing the team creation process and being redirected to the Zero Trust Dashboard, navigate to `Networks/Tunnels` and click on **"Add a tunnel"**.
103
+
104
+
3. Select **"Cloudflared"** as your connector and click on **Next**
105
+
106
+
4. Enter the name of your tunnel (e.g. `balancer`)
107
+
108
+
5. Choose **"Docker"** as your environment and extract your `TUNNEL_TOKEN` from the command provided by Cloudflare which comes in the following format:
109
+
```bash
110
+
docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token <TUNNEL_TOKEN>
111
+
```
112
+
113
+
6. Now that you have the `TUNNEL_TOKEN`, enter it into `cli-lite`'s prompt.
114
+
115
+
7. Finally, add the public hostnames for Balancer:
116
+
- **gui**:
117
+
```text
118
+
Subdomain: balancer
119
+
Domain: yourdomain.com
120
+
Path: leave this property blank
121
+
Service Type: HTTP
122
+
URL: gui:8090 <service-name:port>
123
+
```
124
+
- **api**:
125
+
```text
126
+
Subdomain: balancerapi
127
+
Domain: yourdomain.com
128
+
Path: leave this property blank
129
+
Service Type: HTTP
130
+
URL: api:5075 <service-name:port>
131
+
```
132
+
**IMPORTANT:** the API must always be exposed under the `balancerapi` subdomain as its URL is derived by the GUI at runtime. For example: `balancerapi.yourdomain.com`.
103
133
104
-
Otherwise, just press enter to continue.
105
134
106
135
107
136
108
137
<br/><br/><br/>
109
138
110
139
# Next step
111
140
112
-
[Setup a Cloudflare Tunnel](../setup-cloudflare-tunnel/index.md)
141
+
Once your configuration has been saved, you're ready to `build` and `run` your Balancer instance by executing the `Docker/up` action.
142
+
143
+
When all the images have been downloaded and the containers have been created, you can access your instance through the URL you entered into `GUI_URL`.
144
+
145
+
In order to authenticate, execute the `Configuration/view-config` and make use of the `ROOT_ACCOUNT` credentials. Keep in mind that you must enter the generated `otpSecret` into your Google Authenticator to be able to generate valid OTP Tokens.
0 commit comments