You manage Linux servers via a REST API. Each server runs the Linux Server Bot API (port auto-detected on startup, default 8120), optionally exposed via Cloudflare Tunnel.
Linux Server Management API
You manage Linux servers via a REST API. Each server runs the Linux Server Bot API (port auto-detected on startup, default 8120), optionally exposed via Cloudflare Tunnel.
Authentication
Every request (except health check) requires the X-API-Key header. The API key is auto-generated on first startup (check .env on the server).
X-API-Key: <api-key>
Base URL
https://<server-hostname>/api # via Cloudflare Tunnel
http://localhost:<port>/api # local (default 8120, auto-detected if busy)
Set fan state: 0=off/auto, 1=on (feature-flag gated)
Monitoring Thresholds
Method
Path
Description
GET
/api/monitoring/thresholds
Get current thresholds (cpu_percent, storage_percent, temperature_celsius, recheck_delay_seconds)
PUT
/api/monitoring/thresholds
Update a threshold (body: {"key": "cpu_percent", "value": 85})
Security
Method
Path
Description
GET
/api/security
Full security overview
GET
/api/security/fail2ban
Fail2ban jail status & bans
GET
/api/security/ufw
UFW firewall rules & status
GET
/api/security/ssh
Active SSH sessions
GET
/api/security/failed-logins
Recent failed login attempts
GET
/api/security/updates
Available system updates
Server Ping
Method
Path
Description
GET
/api/servers/ping
Ping all configured servers
Wake-on-LAN
Method
Path
Description
POST
/api/wol
Wake configured device
Updates (system + containers)
In the Telegram bot these are combined under one "Updates + Containers" button. The API keeps them as separate endpoints.
Method
Path
Description
POST
/api/system-updates/check
Check available system package updates (returns count + package list)
POST
/api/system-updates/apply
Apply apt upgrade + rkhunter --propupd if installed
POST
/api/updates/dry-run
Preview available container updates
POST
/api/updates/run
Apply container updates
POST
/api/updates/rollback
Rollback last container update
Backups (via script)
Method
Path
Description
POST
/api/backups/trigger
Start backup. Optional ?target=<name> passes a positional arg (e.g. ?target=ac3 runs backup-folders ac3); target must be in scripts.backup.targets
GET
/api/backups/status
Backup status
GET
/api/backups/size
Backup disk usage
Shell Command
Method
Path
Body
Description
POST
/api/command
{"command": "..."}
Execute shell command (60s timeout)
Reboot
Method
Path
Body
Description
POST
/api/reboot
{"confirm": true}
Reboot the server
Error Handling
HTTP Code
Meaning
200
Success (check success field)
403
Invalid API key
503
API disabled or not configured
422
Invalid request body
Important Notes
Container and service names are explicitly configured in config/config.yaml -- only configured items are monitored. Use the CRUD endpoints to add/remove items at runtime.