Web Dashboard & REST API

WGS includes a built-in HTTP server — accessible from any browser or script. Monitor and control your servers remotely from any device, including mobile phones.

⚙️ Enabling the Web API

  1. Open WGS and go to Settings → Web Remote Control.
  2. Check Enable Web API and choose a port (default: 8765).
  3. An access token is generated automatically. Copy or customise it.
  4. Click Save — the server starts immediately and the status indicator turns green.
  5. Navigate to http://localhost:8765/ui in any browser to open the dashboard.
Authentication: All API requests require the header Authorization: Bearer <your-token>. The token is shown in Settings → Web Remote Control. Individual users can also be created with their own tokens in Settings → User Management.

Browser Dashboard

🌐 http://your-ip:8765/ui

The web dashboard provides a full management interface accessible from any browser — no installation needed on the remote device.

REST API Endpoints

Servers

MethodEndpointDescription
GET/api/serversList all servers with current status, CPU, RAM, and player count.
GET/api/servers/{id}Detailed stats for a specific server.
POST/api/servers/{id}/startStart the server.
POST/api/servers/{id}/stopStop the server.
POST/api/servers/{id}/restartRestart the server.
POST/api/servers/{id}/updateTrigger a SteamCMD update.
POST/api/servers/{id}/backupCreate an immediate world backup.
GET/api/servers/{id}/backupsList available backups for the server (filename, size, date).
POST/api/servers/{id}/restoreRestore a backup. Body: {"backup":"2024-01-15_valheim.zip"}. Stop the server first.
POST/api/servers/{id}/cmdSend a console command. Body: {"command":"say hello"}
GET/api/servers/{id}/perf?minutes=Nv1.2.5 CPU/RAM history samples for the last N minutes (default 5).
GET/api/servers/{id}/log/downloadv1.2.5.38 Download the full console log as a plain text file.
PATCH/api/servers/{id}/notesv1.2.5.38 Save server notes. Body: {"notes":"text"}. Max 2000 chars.

Scheduled Tasks v1.2.5.38

MethodEndpointDescription
GET/api/scheduled-tasksList all scheduled tasks with action, frequency, last run, and next run.
POST/api/scheduled-tasks/{id}/runTrigger a scheduled task immediately. Requires write permission.

System

MethodEndpointDescription
GET/api/systemHost machine CPU and RAM metrics.
GET/api/system/bandwidthTotal network bandwidth usage for the host.

Quick Start Examples

List all servers

curl -H "Authorization: Bearer YOUR_TOKEN" \
     http://localhost:8765/api/servers

Start a server

curl -X POST \
     -H "Authorization: Bearer YOUR_TOKEN" \
     http://localhost:8765/api/servers/1/start

Send a console command

curl -X POST \
     -H "Authorization: Bearer YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"command":"say Server restarts in 5 minutes"}' \
     http://localhost:8765/api/servers/1/cmd