mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-04 01:48:22 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user