main: Initial private ip for api

This commit is contained in:
2023-08-25 12:25:23 +10:00
parent 6eef78a48f
commit f54d805371
2 changed files with 36 additions and 12 deletions

View File

@@ -90,9 +90,14 @@ screen -dmS hnshosting-worker python3 main.py
```
Add worker to master server pool:
The master server will need to be able to access port 5000 on the worker server over the PRIVATE ip. This is not secured by the api key so make sure you don't allow anyone else to access it.
```sh
curl -X POST http://master-server-ip:5000/add-worker?worker=worker-name&ip=worker-server-ip -H "key: api-key"
curl -X POST http://master-server-ip:5000/add-worker?worker=worker-name&ip=worker-server-ip&priv=worker-server-private-ip -H "key: api-key"
```
Alternatively you can use the discord bot to add the worker to the master server pool.
```
/addworker <ip> <private ip> <name>
```
## Discord bot install