Skip to main content

API: Config + Init

Purpose: setup/read runtime config and determine readiness state for dashboard entry.

Key Endpoints

  • GET /api/config/settings
  • PUT /api/config/settings
  • GET /api/system/init-status
  • GET /api/config/env

GET /api/config/settings

Returns persisted settings, resolved OpenClaw config, settings file path, workspace validation, runtime CLI status, and workspace bootstrap details.
curl -sS "http://127.0.0.1:3000/api/config/settings"
Example response shape:
{
  "data": {
    "settings": {
      "gatewayHttpUrl": "http://127.0.0.1:18789",
      "workspacePath": "/Users/me/OpenClaw",
      "remoteAccessMode": "local_only",
      "setupCompleted": false
    },
    "workspaceValidation": {
      "ok": true,
      "issues": []
    },
    "runtime": {
      "cli": {
        "cliAvailable": true,
        "cliVersion": "1.0.0",
        "resolvedCliBin": "/usr/local/bin/openclaw"
      }
    },
    "workspaceBootstrap": {
      "ensured": true,
      "createdDirectories": [],
      "createdFiles": []
    }
  }
}

PUT /api/config/settings

Updates settings fields (remoteAccessMode, gateway URLs/token, workspacePath, setupCompleted).
curl -sS -X PUT "http://127.0.0.1:3000/api/config/settings" \
  -H "Content-Type: application/json" \
  -d '{
    "remoteAccessMode": "tailscale_tunnel",
    "gatewayHttpUrl": "http://127.0.0.1:18789",
    "workspacePath": "/Users/me/OpenClaw"
  }'

Error patterns

  • 400 INVALID_REMOTE_ACCESS_MODE
  • 400 NON_LOOPBACK_FORBIDDEN (for non-loopback gateway URL)
  • 400 for invalid body types

GET /api/system/init-status

Returns readiness and setup checks across database, OpenClaw CLI, gateway, and workspace.
curl -sS "http://127.0.0.1:3000/api/system/init-status"
Key fields:
  • ready
  • requiresSetup
  • setupCompleted
  • access.mode (local_only or tailscale_tunnel)
  • check states/messages for database, openclaw, gateway, workspace
  • checks.workspace.bootstrap provides scaffold counts created during init

Last updated

2026-02-11