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
Copy file name to clipboardExpand all lines: README.md
+92Lines changed: 92 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,98 @@ cashpilot/
160
160
|`CASHPILOT_SECRET_KEY`|*(auto-generated)*| Encryption key for stored credentials |
161
161
|`CASHPILOT_COLLECTION_INTERVAL`|`3600`| Seconds between earnings collection cycles |
162
162
|`CASHPILOT_PORT`|`8080`| Web UI port inside the container |
163
+
|`CASHPILOT_ROLE`|`master`| Instance role: `master` (fleet aggregation) or `child` (reports to master) |
164
+
|`CASHPILOT_NODE_NAME`|*(hostname)*| Display name for this node in the fleet dashboard |
165
+
|`CASHPILOT_MASTER_URL`| -- | WebSocket URL of the master instance (child only), e.g. `ws://master-ip:8080/ws/federation`|
166
+
|`CASHPILOT_JOIN_TOKEN`| -- | Join token issued by the master (child only) |
167
+
168
+
## Multi-Node Fleet Management
169
+
170
+
For power users running services across multiple servers, CashPilot supports a federated master/child architecture. Every node runs a **full CashPilot instance** with its own dashboard. One instance is the **master** that aggregates everything into a unified fleet view; the rest are **children** that report upstream via outbound WebSocket.
171
+
172
+
```
173
+
Master CashPilot (fleet view + local management)
174
+
^ ^ ^
175
+
| WSS | WSS | WSS
176
+
Child CashPilot Child CashPilot Child CashPilot
177
+
(server-1) (server-2) (server-N)
178
+
```
179
+
180
+
### Setting up the master
181
+
182
+
The first CashPilot instance you deploy is the master by default. No extra configuration needed -- just deploy normally:
183
+
184
+
```yaml
185
+
services:
186
+
cashpilot:
187
+
image: drumsergio/cashpilot:latest
188
+
ports:
189
+
- "8085:8080"
190
+
volumes:
191
+
- /var/run/docker.sock:/var/run/docker.sock
192
+
- cashpilot_data:/data
193
+
environment:
194
+
- CASHPILOT_SECRET_KEY=your-secret-key
195
+
- CASHPILOT_ROLE=master
196
+
- CASHPILOT_NODE_NAME=main-server
197
+
- TZ=Europe/Madrid
198
+
restart: unless-stopped
199
+
security_opt:
200
+
- no-new-privileges:true
201
+
202
+
volumes:
203
+
cashpilot_data:
204
+
```
205
+
206
+
### Adding child nodes
207
+
208
+
1. **Generate a join token** from the master's fleet dashboard or via the API:
The child connects outbound to the master via WebSocket -- no port forwarding or VPN needed on the child side. It works behind any NAT or firewall. The master's fleet dashboard shows all connected nodes, their services, and live status. The master can also push commands (deploy, stop, restart) to any child remotely.
243
+
244
+
### Monitor-only mode (external services)
245
+
246
+
If you manage containers yourself (via Portainer, manual compose, etc.) and don't want CashPilot to deploy or control containers, run it **without mounting the Docker socket**:
247
+
248
+
```yaml
249
+
volumes:
250
+
# - /var/run/docker.sock:/var/run/docker.sock # omit this
251
+
- cashpilot_data:/data
252
+
```
253
+
254
+
In monitor-only mode, CashPilot still provides the service catalog, compose file export, earnings dashboard, and credential storage. You can combine this with the child role to report earnings and status to a master while managing containers externally. Use the **Export Compose** button in the UI to get ready-to-use `docker-compose.yml` files for any service.
0 commit comments