Openclaw Setup
🇬🇧 English
OpenClaw Setup
DigitalCompass-AgentHub Community requires OpenClaw to be installed and running on a VPS. OpenClaw is the AI agent framework that connects your AI models to your WordPress website.
Install OpenClaw
OpenClaw is installed via npm. On your VPS run:
npm install -g openclaw
Verify the installation:
openclaw --version
Start the OpenClaw Gateway
openclaw gateway start
By default the gateway runs on port 18789.
Configure the Gateway
The OpenClaw configuration file is located at:
~/.openclaw/openclaw.json
Enable HTTP Endpoint
To allow DigitalCompass-AgentHub to communicate with OpenClaw, the HTTP endpoint must be enabled:
"gateway": {
"auth": {
"mode": "token",
"token": "your_gateway_token_here"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
},
"mode": "local",
"port": 18789,
"bind": "loopback"
}
Important: Keep
"bind": "loopback"for Single VPS setups where WordPress and OpenClaw run on the same server. For external hosting setups change to"bind": "lan"— see External Hosting Configuration →
Gateway Token
The Gateway Token secures access to your OpenClaw instance. Use the token from your openclaw.json in the DigitalCompass-AgentHub plugin settings.
To generate a new token:
openssl rand -hex 24
Replace the token in openclaw.json and restart the gateway.
First Agent
The first agent (main) is created in the process of setting up OpenClaw with a default workspace in:
~/.openclaw/workspace/
AGENTS.md PATH for the Main agent:
~/.openclaw/workspace/AGENTS.md
Additional agents setup to work with DigitalCompass-AgentHub:
~/.openclaw/workspace/cat/AGENTS.md
~/.openclaw/workspace/stella/AGENTS.md
~/.openclaw/workspace/max/AGENTS.md
The model name in AgentHub Setup corresponds to the workspace folder:
Example for lisa as first (main) agent, cat and stella are additional agents.
Model name == Agent name
| Workspace folder | Model name in plugin |
|---|---|
workspace/ (root) | openclaw/lisa |
workspace/cat/ | openclaw/cat |
workspace/stella/ | openclaw/stella |
Test the Connection
On your 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"}]}'
A successful response looks like:
{
"choices": [{
"message": {
"role": "assistant",
"content": "Hello! How can I help you?"
}
}]
}
Keep OpenClaw Running
To keep OpenClaw running after server restarts, create a systemd service:
sudo nano /etc/systemd/system/openclaw.service
[Unit]
Description=OpenClaw Gateway
After=network.target
[Service]
Type=simple
User=your_user
ExecStart=/usr/local/bin/openclaw gateway start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw
Next Steps
🇩🇪 Deutsch
OpenClaw Setup
DigitalCompass-AgentHub Community benötigt OpenClaw installiert und laufend auf einem VPS. OpenClaw ist das KI-Agenten-Framework das deine KI-Modelle mit deiner WordPress-Website verbindet.
OpenClaw installieren
OpenClaw wird über npm installiert. Auf deinem VPS ausführen:
npm install -g openclaw
Installation überprüfen:
openclaw --version
OpenClaw Gateway starten
openclaw gateway start
Standardmäßig läuft das Gateway auf Port 18789.
Gateway konfigurieren
Die OpenClaw Konfigurationsdatei liegt unter:
~/.openclaw/openclaw.json
HTTP Endpoint aktivieren
Damit DigitalCompass-AgentHub mit OpenClaw kommunizieren kann, muss der HTTP Endpoint aktiviert werden:
"gateway": {
"auth": {
"mode": "token",
"token": "dein_gateway_token_hier"
},
"http": {
"endpoints": {
"chatCompletions": {
"enabled": true
}
}
},
"mode": "local",
"port": 18789,
"bind": "loopback"
}
Wichtig:
"bind": "loopback"behalten für Single VPS Setups wo WordPress und OpenClaw auf demselben Server laufen. Für externes Hosting auf"bind": "lan"ändern — siehe Externes Hosting Konfiguration →
Gateway Token
Der Gateway Token sichert den Zugriff auf deine OpenClaw-Instanz. Verwende den Token aus deiner openclaw.json in den DigitalCompass-AgentHub Plugin-Einstellungen.
Neuen Token generieren:
openssl rand -hex 24
Token in openclaw.json ersetzen und Gateway neu starten.
Agenten erstellen
Jeder Agent hat seinen eigenen Workspace-Ordner unter:
~/.openclaw/workspace/
Haupt-Agent (erster Agent):
~/.openclaw/workspace/AGENTS.md
Weitere Agenten:
~/.openclaw/workspace/cat/AGENTS.md
~/.openclaw/workspace/stella/AGENTS.md
~/.openclaw/workspace/max/AGENTS.md
Der Model-Name in den WP AgentHub Einstellungen entspricht dem Workspace-Ordner:
| Workspace Ordner | Model-Name im Plugin |
|---|---|
workspace/ (root) | openclaw/lisa |
workspace/cat/ | openclaw/cat |
workspace/stella/ | openclaw/stella |
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"}]}'
Eine erfolgreiche Antwort sieht so aus:
{
"choices": [{
"message": {
"role": "assistant",
"content": "Hallo! Wie kann ich helfen?"
}
}]
}
OpenClaw dauerhaft laufen lassen
Um OpenClaw nach Server-Neustarts laufen zu lassen, einen systemd Service erstellen:
sudo nano /etc/systemd/system/openclaw.service
[Unit]
Description=OpenClaw Gateway
After=network.target
[Service]
Type=simple
User=dein_benutzer
ExecStart=/usr/local/bin/openclaw gateway start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw