Single VPS Configuration

🇬🇧 English | 🇩🇪 Deutsch


🇬🇧 English

Single VPS Configuration – The Supported Setup

In this setup both WordPress and OpenClaw run on the same VPS server. This is the simplest and most secure configuration — OpenClaw never needs to be exposed to the internet.

Browser → WordPress (yourdomain.com) → [internal] → OpenClaw (localhost:18789)

Prerequisites

  • WordPress installed on the VPS
  • OpenClaw installed and running — see OpenClaw Setup →
  • Apache with SSL (Let’s Encrypt recommended)

OpenClaw Configuration

In ~/.openclaw/openclaw.json set bind to loopback — OpenClaw only listens on localhost:

"gateway": {
  "auth": {
    "mode": "token",
    "token": "your_gateway_token_here"
  },
  "http": {
    "endpoints": {
      "chatCompletions": {
        "enabled": true
      }
    }
  },
  "mode": "local",
  "port": 18789,
  "bind": "loopback"
}

Restart the gateway after changes:

openclaw gateway restart

Verify OpenClaw is listening on localhost only:

ss -tlnp | grep 18789

You should see 127.0.0.1:18789 — not 0.0.0.0:18789. This means OpenClaw is not accessible from the internet.

DigitalCompass-AgentHub Plugin Configuration

Go to Settings → AgentHub Setup and enter:

FieldValue
OpenClaw Endpointhttp://127.0.0.1:18789/v1/chat/completions
Gateway TokenYour token from openclaw.json
Modelopenclaw/your-agent-name
SSL Verification✅ Enabled

Note: The endpoint uses http:// not https:// because WordPress communicates with OpenClaw internally on the same server — no SSL needed for localhost connections.

Test the Connection

On the VPS run:

curl -X POST http://127.0.0.1:18789/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"model": "openclaw/cat", "messages": [{"role": "user", "content": "Hello"}]}'

If you get a valid response your setup is working correctly.

SSL Certificate

For your WordPress site to run on HTTPS, install a Let’s Encrypt certificate:

sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d yourdomain.com

Certbot automatically renews the certificate. Verify auto-renewal is active:

sudo systemctl status certbot.timer

Security Notes

  • OpenClaw is never exposed to the internet in this setup ✅
  • The Gateway Token stays server-side — never visible in the browser ✅
  • SSL encrypts all traffic between visitor and WordPress ✅
  • Internal WordPress → OpenClaw communication stays on localhost ✅

Firewall

No extra firewall rules needed for this setup. Port 18789 does not need to be opened.

Troubleshooting

Chat shows “An error occurred”

  • Check that OpenClaw is running: ss -tlnp | grep 18789
  • Verify the Gateway Token in plugin settings matches openclaw.json
  • Check WordPress error log: tail -20 /var/log/apache2/error.log

OpenClaw not starting

  • Check the OpenClaw logs
  • Verify Node.js is installed: node --version

Next Steps


🇩🇪 Deutsch

Single VPS Konfiguration – Das supoortete Setup

Bei diesem Setup laufen sowohl WordPress als auch OpenClaw auf demselben VPS-Server. Das ist die einfachste und sicherste Konfiguration — OpenClaw muss nie dem Internet ausgesetzt werden.

Browser → WordPress (deinedomain.de) → [intern] → OpenClaw (localhost:18789)

Voraussetzungen

  • WordPress auf dem VPS installiert
  • OpenClaw installiert und laufend — siehe OpenClaw Setup →
  • Apache mit SSL (Let’s Encrypt empfohlen)

OpenClaw Konfiguration

In ~/.openclaw/openclaw.json bind auf loopback setzen — OpenClaw lauscht nur auf localhost:

"gateway": {
  "auth": {
    "mode": "token",
    "token": "dein_gateway_token_hier"
  },
  "http": {
    "endpoints": {
      "chatCompletions": {
        "enabled": true
      }
    }
  },
  "mode": "local",
  "port": 18789,
  "bind": "loopback"
}

Gateway nach Änderungen neu starten:

openclaw gateway restart

Überprüfen dass OpenClaw nur auf localhost lauscht:

ss -tlnp | grep 18789

Es sollte 127.0.0.1:18789 angezeigt werden — nicht 0.0.0.0:18789. Das bedeutet OpenClaw ist nicht aus dem Internet erreichbar.

DigitalCompass-AgentHub Plugin Konfiguration

Gehe zu Einstellungen → AgentHub Setup und trage ein:

FeldWert
OpenClaw Endpointhttp://127.0.0.1:18789/v1/chat/completions
Gateway TokenDein Token aus openclaw.json
Modelopenclaw/dein-agenten-name
SSL Verifikation✅ Aktiviert

Hinweis: Der Endpoint verwendet http:// nicht https:// weil WordPress intern auf demselben Server mit OpenClaw kommuniziert — kein SSL für localhost-Verbindungen nötig.

Verbindung testen

Auf dem VPS ausführen:

curl -X POST http://127.0.0.1:18789/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer DEIN_TOKEN" \
  -d '{"model": "openclaw/cat", "messages": [{"role": "user", "content": "Hallo"}]}'

Wenn du eine gültige Antwort bekommst funktioniert dein Setup korrekt.

SSL-Zertifikat

Damit deine WordPress-Site über HTTPS läuft, Let’s Encrypt Zertifikat installieren:

sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d deinedomain.de

Certbot erneuert das Zertifikat automatisch. Auto-Erneuerung überprüfen:

sudo systemctl status certbot.timer

Sicherheitshinweise

  • OpenClaw ist bei diesem Setup nie dem Internet ausgesetzt ✅
  • Der Gateway Token bleibt serverseitig — nie im Browser sichtbar ✅
  • SSL verschlüsselt den gesamten Traffic zwischen Besucher und WordPress ✅
  • Interne WordPress → OpenClaw Kommunikation bleibt auf localhost ✅

Firewall

Bei diesem Setup sind keine extra Firewall-Regeln nötig. Port 18789 muss nicht geöffnet werden.

Fehlerbehebung

Chat zeigt “Ein Fehler ist aufgetreten”

  • Prüfen ob OpenClaw läuft: ss -tlnp | grep 18789
  • Gateway Token in den Plugin-Einstellungen mit openclaw.json abgleichen
  • WordPress Error Log prüfen: tail -20 /var/log/apache2/error.log

OpenClaw startet nicht

  • OpenClaw Logs prüfen
  • Node.js Installation prüfen: node --version

Nächste Schritte