This CloudNet Panel is designed to work exclusively with the CloudNet REST API for real-time server and node management. The panel requires CloudNet API connectivity to function.
As of this version, all mock data has been removed. The panel will not function without a working CloudNet REST API connection.
Set these environment variables to configure CloudNet API access:
# Required: Enable CloudNet API (must be 'true' for panel to work)
CLOUDNET_API_ENABLED=true
# Required: CloudNet REST API base URL
CLOUDNET_API_URL=http://localhost:8080/api/v3
# Required: Authentication credentials
CLOUDNET_API_USERNAME=your_username
CLOUDNET_API_PASSWORD=your_password
# Optional: Request timeout and retry settings
CLOUDNET_API_TIMEOUT=5000
CLOUDNET_API_RETRIES=3
CLOUDNET_API_RETRY_DELAY=1000
# Optional: CloudNet server configuration
CLOUDNET_SERVER_PATH=/home/cloudnet/CloudNet-Server
CLOUDNET_SERVER_PROXY_GROUP=Global-ProxyWhen CLOUDNET_API_ENABLED=true, the panel will:
- Require CloudNet API connectivity for login
- Fetch real server and node data from CloudNet REST API only
- Send server control commands (start/stop/restart) to CloudNet
- Block access if CloudNet API is unreachable
- Display a clear error page when CloudNet is not connected
The panel includes robust error handling for CloudNet connectivity issues:
- API Disabled: Shows configuration error when
CLOUDNET_API_ENABLED=false - Connection Refused: Shows network connectivity errors
- Authentication Failures: Shows credential validation errors
- Service Unavailable: Shows when CloudNet server is down
- ✅ List all servers
- ✅ Get individual server details
- ✅ Start server (via lifecycle endpoint)
- ✅ Stop server (via lifecycle endpoint)
- ✅ Restart server (via lifecycle endpoint)
- ✅ Real-time logs via WebSocket
- ✅ Send commands to servers
- ✅ Automatic data transformation from CloudNet format
- ❌ Create/Update/Delete servers (not supported by CloudNet REST API)
- ✅ List all nodes
- ✅ Get individual node details
- ✅ Resource usage monitoring
- ✅ Status tracking
- ❌ Create/Update/Delete nodes (not supported by CloudNet REST API)
- ✅ Live server logs via WebSocket
- ✅ Server command execution
- ✅ Real-time server status updates
⚠️ All real-time features require CloudNet API connectivity
The integration uses the following CloudNet REST API endpoints:
GET /service- List all services/serversGET /service/{id}- Get individual service detailsPATCH /service/{id}/lifecycle?target=start- Start serverPATCH /service/{id}/lifecycle?target=stop- Stop serverPATCH /service/{id}/lifecycle?target=restart- Restart serverGET /service/{id}/logLines- Get cached logsGET /cluster- List all cluster nodesGET /cluster/{id}- Get individual node detailsPOST /auth- Authentication endpointPOST /auth/refresh- Token refresh endpoint
The panel automatically transforms CloudNet API responses to match the expected frontend format:
configuration.serviceId.uniqueId→idconfiguration.serviceId.taskName + taskServiceId→namelifeCycle→status(RUNNING→online, STOPPED→offline, etc.)properties["Online-Count"]→playersproperties["Max-Players"]→maxPlayersconfiguration.processConfig.maxHeapMemorySize→memoryconfiguration.serviceId.nodeUniqueId→nodeaddress.host→ipaddress.port→portprocessSnapshot.cpuUsage→cpuprocessSnapshot.heapUsageMemory→ram
uniqueId→idandnameavailable→status(true→online, false→offline)nodeInfoSnapshot.processSnapshot.cpuUsage→cpunodeInfoSnapshot.processSnapshot.heapUsageMemory→ramnodeInfoSnapshot.currentServicesCount→servers
curl http://localhost:5000/api/cloudnet/healthExpected responses:
- Success:
{"connected": true, "enabled": true, ...} - API Disabled:
{"connected": false, "enabled": false, "error": "CloudNet API is disabled in configuration"} - Connection Failed:
{"connected": false, "enabled": true, "error": "CloudNet API error: ..."}
Try to login when CloudNet is unavailable:
curl -X POST -H "Content-Type: application/json" \
-d '{"username":"admin","password":"password"}' \
http://localhost:5000/api/auth/loginExpected response when CloudNet unavailable:
{
"error": "CloudNet API not available",
"message": "...",
"type": "cloudnet_unavailable"
}When CloudNet API is accessible, users see the normal login page and can access all panel features.
When CloudNet API is not available, users see a dedicated error page with:
- Clear error message explaining the connection issue
- Helpful checklist of things to verify
- "Try Again" button to retry the connection
- Same visual branding as the login page
-
"CloudNet API is disabled in configuration"
- Set
CLOUDNET_API_ENABLED=truein your environment
- Set
-
"CloudNet API server is not running or not reachable"
- Verify CloudNet is running
- Check the API URL and port
- Ensure REST API module is loaded in CloudNet
-
"Failed to authenticate with CloudNet API"
- Verify API credentials in environment variables
- Check CloudNet REST API authentication configuration
-
Panel shows error page instead of login
- This is expected behavior when CloudNet is not accessible
- Fix CloudNet connectivity to access the panel
Enable debug logging by checking server console output when starting the panel. All CloudNet API errors are logged with detailed information.
Previous versions of this panel included mock data fallbacks. This has been completely removed. If you were relying on mock data:
- Install and configure CloudNet: The panel now requires a real CloudNet installation
- Enable CloudNet REST API: Ensure the REST API module is loaded in CloudNet
- Configure credentials: Set proper authentication in environment variables
- Test connectivity: Use the health check endpoint to verify setup
Potential future improvements:
- WebSocket integration for real-time updates
- Template management via CloudNet API
- User permission synchronization
- More detailed server metrics
- Node management operations
