Settings API

Panel configuration, system information, health checks, API tokens, and maintenance actions.

All endpoints are prefixed with /api/settings. Admin only.


Configuration

MethodPathDescription
GET/settingsGet panel settings
POST/settingsSave settings

System Information

MethodPathDescription
GET/settings/system-infoSystem info
GET/settings/healthHealth check

API Tokens

MethodPathDescription
GET/settings/tokensList API tokens
POST/settings/tokensCreate API token
DELETE/settings/tokens/:idRevoke token

Maintenance

MethodPathDescription
POST/settings/maintenance/clear-cacheClear cache
POST/settings/maintenance/rotate-logsRotate logs
POST/settings/maintenance/restart-serviceRestart panel

Request/Response

GET /settings

{
  "panelName": "NexusPanel",
  "serverLocation": "Amsterdam, NL",
  "defaultPage": "dashboard",
  "sessionTimeout": 60,
  "idleTimeout": 30,
  "theme": "dark",
  "accentColor": "#10b981",
  "updateAlerts": true,
  "debugMode": false,
  "logRetentionDays": 30,
  "autoUpdate": false,
  "updateChannel": "stable"
}

POST /settings

{
  "panelName": "My Server",
  "serverLocation": "New York, US",
  "theme": "light"
}

GET /settings/system-info

{
  "uptime": "up 14 days, 3 hours",
  "memory": { "total": "4.00 GB", "used": "1.15 GB", "percent": 28.7 },
  "disk": { "total": "55.77 GB", "used": "11.50 GB", "percent": 20.6 },
  "nodeVersion": "v20.15.0",
  "phpVersion": "8.3.6",
  "nginxVersion": "1.24.0",
  "osName": "AlmaLinux 9.3",
  "cpuCores": 4,
  "loadAverage": "1.20 0.80 0.50",
  "hostname": "server01"
}

GET /settings/health

{
  "services": {
    "nginx": "active",
    "php-fpm": "active",
    "postgresql": "active",
    "vsftpd": "inactive",
    "clamav-daemon": "active",
    "firewalld": "active"
  },
  "disk": 20.6,
  "memory": 28.7
}

POST /settings/tokens

{
  "name": "External Integration",
  "scope": "read"
}

Response

{
  "id": "tok_1690000000000_abcdef1234567890",
  "name": "External Integration",
  "secret": "nxs_64hexchars...",
  "createdAt": "2026-07-28T12:00:00Z"
}

Note: The secret is only shown once at creation time.


Part of NexusPanel API Reference

← Back to Documentation