Feat: Enable admin password in admin mode (#540)

* WIP: save local changes before merging
* Enable admin password in admin mode #374
This commit is contained in:
Burt
2025-11-05 21:48:28 +08:00
committed by GitHub
parent 96ed2c6ea7
commit 8b853a963d
13 changed files with 421 additions and 91 deletions
+17
View File
@@ -90,6 +90,23 @@ After deployment:
3. **Create Traders** → Combine AI models with exchanges
4. **Start Trading** → Monitor performance in dashboard
### 🔐 Optional: Enable Admin Mode (Single-User)
For single-tenant/self-hosted usage, you can enable strict admin-only access:
1) In `config.json` set the 2 fields below:
```jsonc
{
"admin_mode": true,
...
"jwt_secret": "YOUR_JWT_SCR"
}
```
2) Set environment variables (Docker compose already wired):
- `NOFX_ADMIN_PASSWORD` — admin password (plaintext; hashed on startup)
3) Login at `/login` using the admin password. All non-essential endpoints are blocked to unauthenticated users while admin mode is enabled.
---
## ⚠️ Important Notes