External Hosting Configuration – Not Offically Supported

🇬🇧 English | 🇩🇪 Deutsch


🇬🇧 English

External Hosting Configuration

In this setup WordPress runs on an external hosting provider (e.g. Namecheap, SiteGround, any shared hosting) while OpenClaw runs on a separate VPS.

Browser → WordPress (hosting provider) → HTTPS → VPS (Apache Proxy) → OpenClaw (localhost:18789)

Prerequisites

  • WordPress installed on external hosting (PHP 8.1+)
  • OpenClaw installed and running on a VPS — see OpenClaw Setup →
  • Apache with SSL on the VPS
  • Apache proxy modules enabled on the VPS

Step 1 — OpenClaw Configuration

In ~/.openclaw/openclaw.json change bind from loopback to lan so OpenClaw accepts connections from the Apache proxy:

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

Restart the gateway:

openclaw gateway restart

Verify OpenClaw is now listening on all interfaces:

ss -tlnp | grep 18789

You should see 0.0.0.0:18789.

Step 2 — Enable Apache Proxy Modules

On the VPS run:

sudo a2enmod proxy proxy_http proxy_wstunnel rewrite ssl headers
sudo systemctl restart apache2

Step 3 — Configure Apache Reverse Proxy

Open your SSL VirtualHost configuration on the VPS:

sudo nano /etc/apache2/sites-available/yourdomain-ssl.conf

Add the following inside the <VirtualHost *:443> block, before </VirtualHost>:

# --- DigitalCompass-AgentHub Proxy Settings ---

# 1. WebSocket support
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/v1/chat(.*) "ws://127.0.0.1:18789/v1/chat$1" [P,L]

# 2. HTTP support (REST API / Chat Completions)
ProxyPass /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions
ProxyPassReverse /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions

# 3. Increase timeout for AI responses
ProxyTimeout 60

# 4. Forward headers correctly
RequestHeader set X-Forwarded-Proto "https"
ProxyPreserveHost On

Test the configuration and reload Apache:

sudo apache2ctl configtest && sudo systemctl reload apache2

Step 4 — Firewall

By default most VPS providers block all ports except 80, 443 and 22. Port 18789 does not need to be opened — the Apache proxy handles everything on port 443.

Step 5 — DigitalCompass-AgentHub Plugin Configuration

Go to Settings → AgentHub Setup on your WordPress hosting and enter:

FieldValue
OpenClaw Endpointhttps://yourvpsdomain.com/v1/chat/completions
Gateway TokenYour token from openclaw.json
Modelopenclaw/your-agent-name
SSL Verification✅ Enabled (if your VPS has a valid SSL certificate)

SSL Verification: If your VPS uses a self-signed certificate, disable SSL Verification in the plugin settings. If you have a valid Let’s Encrypt certificate on the VPS, keep it enabled.

Step 6 — Test the Connection

From your local machine or the hosting server:

curl -X POST https://yourvpsdomain.com/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 confirms the proxy is working.

Security Notes

  • OpenClaw is never directly exposed to the internet — Apache proxies all requests ✅
  • The Gateway Token stays server-side — never visible in the browser ✅
  • All traffic is encrypted via HTTPS ✅
  • WordPress communicates with OpenClaw via your VPS domain over HTTPS ✅

Troubleshooting

Chat shows “An error occurred”

  • Verify Apache proxy modules are enabled: apache2ctl -M | grep proxy
  • Check the Apache error log: sudo tail -20 /var/log/apache2/yourdomain-error.log
  • Test the curl command above directly

503 Service Unavailable

  • OpenClaw is not running — check with: ss -tlnp | grep 18789
  • Restart OpenClaw gateway

SSL Certificate Error

  • If your VPS uses a self-signed certificate, disable SSL Verification in plugin settings
  • For a valid certificate: sudo certbot --apache -d yourvpsdomain.com

Power Tip: If you use WP AgentHub on multiple websites, create a separate OpenClaw agent with its own Telegram bot for each site. One VPS infrastructure — unlimited agents.

Next Steps


🇩🇪 Deutsch

Externes Hosting Konfiguration – Nicht offiziell supportet

Bei diesem Setup läuft WordPress auf einem externen Hosting-Provider (z.B. Namecheap, SiteGround, beliebiges Shared Hosting) während OpenClaw auf einem separaten VPS läuft.

Browser → WordPress (Hosting Provider) → HTTPS → VPS (Apache Proxy) → OpenClaw (localhost:18789)

Voraussetzungen

  • WordPress auf externem Hosting installiert (PHP 8.1+)
  • OpenClaw installiert und laufend auf einem VPS — siehe OpenClaw Setup →
  • Apache mit SSL auf dem VPS
  • Apache Proxy-Module auf dem VPS aktiviert

Schritt 1 — OpenClaw Konfiguration

In ~/.openclaw/openclaw.json bind von loopback auf lan ändern damit OpenClaw Verbindungen vom Apache-Proxy akzeptiert:

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

Gateway neu starten:

openclaw gateway restart

Überprüfen dass OpenClaw jetzt auf allen Interfaces lauscht:

ss -tlnp | grep 18789

Es sollte 0.0.0.0:18789 angezeigt werden.

Schritt 2 — Apache Proxy-Module aktivieren

Auf dem VPS ausführen:

sudo a2enmod proxy proxy_http proxy_wstunnel rewrite ssl headers
sudo systemctl restart apache2

Schritt 3 — Apache Reverse Proxy konfigurieren

Die SSL VirtualHost Konfiguration auf dem VPS öffnen:

sudo nano /etc/apache2/sites-available/deinedomain-ssl.conf

Folgendes innerhalb des <VirtualHost *:443> Blocks vor </VirtualHost> einfügen:

# --- WP AgentHub Proxy Einstellungen ---

# 1. WebSocket-Unterstützung
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/v1/chat(.*) "ws://127.0.0.1:18789/v1/chat$1" [P,L]

# 2. HTTP-Unterstützung (REST API / Chat Completions)
ProxyPass /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions
ProxyPassReverse /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions

# 3. Timeout für KI-Antworten erhöhen
ProxyTimeout 60

# 4. Header-Weiterleitung sicherstellen
RequestHeader set X-Forwarded-Proto "https"
ProxyPreserveHost On

Konfiguration testen und Apache neu laden:

sudo apache2ctl configtest && sudo systemctl reload apache2

Schritt 4 — Firewall

Die meisten VPS-Provider blockieren standardmäßig alle Ports außer 80, 443 und 22. Port 18789 muss nicht geöffnet werden — der Apache-Proxy übernimmt alles über Port 443.

Schritt 5 — WP AgentHub Plugin Konfiguration

Gehe zu Einstellungen → AgentHub Setup in deinem WordPress auf dem Hosting und trage ein:

FeldWert
OpenClaw Endpointhttps://deinevpsdomain.de/v1/chat/completions
Gateway TokenDein Token aus openclaw.json
Modelopenclaw/dein-agenten-name
SSL Verifikation✅ Aktiviert (wenn dein VPS ein gültiges SSL-Zertifikat hat)

SSL Verifikation: Wenn dein VPS ein selbstsigniertes Zertifikat verwendet, SSL Verifikation in den Plugin-Einstellungen deaktivieren. Bei einem gültigen Let’s Encrypt Zertifikat aktiviert lassen.

Schritt 6 — Verbindung testen

Von deinem lokalen Rechner oder dem Hosting-Server:

curl -X POST https://deinevpsdomain.de/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 bestätigt dass der Proxy funktioniert.

Sicherheitshinweise

  • OpenClaw ist nie direkt dem Internet ausgesetzt — Apache proxied alle Anfragen ✅
  • Der Gateway Token bleibt serverseitig — nie im Browser sichtbar ✅
  • Gesamter Traffic wird über HTTPS verschlüsselt ✅
  • WordPress kommuniziert mit OpenClaw über deine VPS-Domain via HTTPS ✅

Fehlerbehebung

Chat zeigt “Ein Fehler ist aufgetreten”

  • Apache Proxy-Module prüfen: apache2ctl -M | grep proxy
  • Apache Error Log prüfen: sudo tail -20 /var/log/apache2/deinedomain-error.log
  • Den curl-Befehl oben direkt testen

503 Service Unavailable

  • OpenClaw läuft nicht — prüfen mit: ss -tlnp | grep 18789
  • OpenClaw Gateway neu starten

SSL-Zertifikat Fehler

  • Bei selbstsigniertem Zertifikat: SSL Verifikation in den Plugin-Einstellungen deaktivieren
  • Für ein gültiges Zertifikat: sudo certbot --apache -d deinevpsdomain.de

Power-Tipp: Wenn WP AgentHub auf mehreren Websites eingesetzt wird, für jede Website einen eigenen OpenClaw Agenten mit eigenem Telegram Bot erstellen. Eine VPS-Infrastruktur — unbegrenzte Agenten.

Nächste Schritte

External Hosting Configuration – Not Offically Supported

🇬🇧 English | 🇩🇪 Deutsch


🇬🇧 English

External Hosting Configuration

In this setup WordPress runs on an external hosting provider (e.g. Namecheap, SiteGround, any shared hosting) while OpenClaw runs on a separate VPS.

Browser → WordPress (hosting provider) → HTTPS → VPS (Apache Proxy) → OpenClaw (localhost:18789)

Prerequisites

  • WordPress installed on external hosting (PHP 8.1+)
  • OpenClaw installed and running on a VPS — see OpenClaw Setup →
  • Apache with SSL on the VPS
  • Apache proxy modules enabled on the VPS

Step 1 — OpenClaw Configuration

In ~/.openclaw/openclaw.json change bind from loopback to lan so OpenClaw accepts connections from the Apache proxy:

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

Restart the gateway:

openclaw gateway restart

Verify OpenClaw is now listening on all interfaces:

ss -tlnp | grep 18789

You should see 0.0.0.0:18789.

Step 2 — Enable Apache Proxy Modules

On the VPS run:

sudo a2enmod proxy proxy_http proxy_wstunnel rewrite ssl headers
sudo systemctl restart apache2

Step 3 — Configure Apache Reverse Proxy

Open your SSL VirtualHost configuration on the VPS:

sudo nano /etc/apache2/sites-available/yourdomain-ssl.conf

Add the following inside the <VirtualHost *:443> block, before </VirtualHost>:

# --- DigitalCompass-AgentHub Proxy Settings ---

# 1. WebSocket support
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/v1/chat(.*) "ws://127.0.0.1:18789/v1/chat$1" [P,L]

# 2. HTTP support (REST API / Chat Completions)
ProxyPass /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions
ProxyPassReverse /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions

# 3. Increase timeout for AI responses
ProxyTimeout 60

# 4. Forward headers correctly
RequestHeader set X-Forwarded-Proto "https"
ProxyPreserveHost On

Test the configuration and reload Apache:

sudo apache2ctl configtest && sudo systemctl reload apache2

Step 4 — Firewall

By default most VPS providers block all ports except 80, 443 and 22. Port 18789 does not need to be opened — the Apache proxy handles everything on port 443.

Step 5 — DigitalCompass-AgentHub Plugin Configuration

Go to Settings → AgentHub Setup on your WordPress hosting and enter:

FieldValue
OpenClaw Endpointhttps://yourvpsdomain.com/v1/chat/completions
Gateway TokenYour token from openclaw.json
Modelopenclaw/your-agent-name
SSL Verification✅ Enabled (if your VPS has a valid SSL certificate)

SSL Verification: If your VPS uses a self-signed certificate, disable SSL Verification in the plugin settings. If you have a valid Let’s Encrypt certificate on the VPS, keep it enabled.

Step 6 — Test the Connection

From your local machine or the hosting server:

curl -X POST https://yourvpsdomain.com/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 confirms the proxy is working.

Security Notes

  • OpenClaw is never directly exposed to the internet — Apache proxies all requests ✅
  • The Gateway Token stays server-side — never visible in the browser ✅
  • All traffic is encrypted via HTTPS ✅
  • WordPress communicates with OpenClaw via your VPS domain over HTTPS ✅

Troubleshooting

Chat shows “An error occurred”

  • Verify Apache proxy modules are enabled: apache2ctl -M | grep proxy
  • Check the Apache error log: sudo tail -20 /var/log/apache2/yourdomain-error.log
  • Test the curl command above directly

503 Service Unavailable

  • OpenClaw is not running — check with: ss -tlnp | grep 18789
  • Restart OpenClaw gateway

SSL Certificate Error

  • If your VPS uses a self-signed certificate, disable SSL Verification in plugin settings
  • For a valid certificate: sudo certbot --apache -d yourvpsdomain.com

Power Tip: If you use WP AgentHub on multiple websites, create a separate OpenClaw agent with its own Telegram bot for each site. One VPS infrastructure — unlimited agents.

Next Steps


🇩🇪 Deutsch

Externes Hosting Konfiguration – Nicht offiziell supportet

Bei diesem Setup läuft WordPress auf einem externen Hosting-Provider (z.B. Namecheap, SiteGround, beliebiges Shared Hosting) während OpenClaw auf einem separaten VPS läuft.

Browser → WordPress (Hosting Provider) → HTTPS → VPS (Apache Proxy) → OpenClaw (localhost:18789)

Voraussetzungen

  • WordPress auf externem Hosting installiert (PHP 8.1+)
  • OpenClaw installiert und laufend auf einem VPS — siehe OpenClaw Setup →
  • Apache mit SSL auf dem VPS
  • Apache Proxy-Module auf dem VPS aktiviert

Schritt 1 — OpenClaw Konfiguration

In ~/.openclaw/openclaw.json bind von loopback auf lan ändern damit OpenClaw Verbindungen vom Apache-Proxy akzeptiert:

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

Gateway neu starten:

openclaw gateway restart

Überprüfen dass OpenClaw jetzt auf allen Interfaces lauscht:

ss -tlnp | grep 18789

Es sollte 0.0.0.0:18789 angezeigt werden.

Schritt 2 — Apache Proxy-Module aktivieren

Auf dem VPS ausführen:

sudo a2enmod proxy proxy_http proxy_wstunnel rewrite ssl headers
sudo systemctl restart apache2

Schritt 3 — Apache Reverse Proxy konfigurieren

Die SSL VirtualHost Konfiguration auf dem VPS öffnen:

sudo nano /etc/apache2/sites-available/deinedomain-ssl.conf

Folgendes innerhalb des <VirtualHost *:443> Blocks vor </VirtualHost> einfügen:

# --- WP AgentHub Proxy Einstellungen ---

# 1. WebSocket-Unterstützung
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/v1/chat(.*) "ws://127.0.0.1:18789/v1/chat$1" [P,L]

# 2. HTTP-Unterstützung (REST API / Chat Completions)
ProxyPass /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions
ProxyPassReverse /v1/chat/completions http://127.0.0.1:18789/v1/chat/completions

# 3. Timeout für KI-Antworten erhöhen
ProxyTimeout 60

# 4. Header-Weiterleitung sicherstellen
RequestHeader set X-Forwarded-Proto "https"
ProxyPreserveHost On

Konfiguration testen und Apache neu laden:

sudo apache2ctl configtest && sudo systemctl reload apache2

Schritt 4 — Firewall

Die meisten VPS-Provider blockieren standardmäßig alle Ports außer 80, 443 und 22. Port 18789 muss nicht geöffnet werden — der Apache-Proxy übernimmt alles über Port 443.

Schritt 5 — WP AgentHub Plugin Konfiguration

Gehe zu Einstellungen → AgentHub Setup in deinem WordPress auf dem Hosting und trage ein:

FeldWert
OpenClaw Endpointhttps://deinevpsdomain.de/v1/chat/completions
Gateway TokenDein Token aus openclaw.json
Modelopenclaw/dein-agenten-name
SSL Verifikation✅ Aktiviert (wenn dein VPS ein gültiges SSL-Zertifikat hat)

SSL Verifikation: Wenn dein VPS ein selbstsigniertes Zertifikat verwendet, SSL Verifikation in den Plugin-Einstellungen deaktivieren. Bei einem gültigen Let’s Encrypt Zertifikat aktiviert lassen.

Schritt 6 — Verbindung testen

Von deinem lokalen Rechner oder dem Hosting-Server:

curl -X POST https://deinevpsdomain.de/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 bestätigt dass der Proxy funktioniert.

Sicherheitshinweise

  • OpenClaw ist nie direkt dem Internet ausgesetzt — Apache proxied alle Anfragen ✅
  • Der Gateway Token bleibt serverseitig — nie im Browser sichtbar ✅
  • Gesamter Traffic wird über HTTPS verschlüsselt ✅
  • WordPress kommuniziert mit OpenClaw über deine VPS-Domain via HTTPS ✅

Fehlerbehebung

Chat zeigt “Ein Fehler ist aufgetreten”

  • Apache Proxy-Module prüfen: apache2ctl -M | grep proxy
  • Apache Error Log prüfen: sudo tail -20 /var/log/apache2/deinedomain-error.log
  • Den curl-Befehl oben direkt testen

503 Service Unavailable

  • OpenClaw läuft nicht — prüfen mit: ss -tlnp | grep 18789
  • OpenClaw Gateway neu starten

SSL-Zertifikat Fehler

  • Bei selbstsigniertem Zertifikat: SSL Verifikation in den Plugin-Einstellungen deaktivieren
  • Für ein gültiges Zertifikat: sudo certbot --apache -d deinevpsdomain.de

Power-Tipp: Wenn WP AgentHub auf mehreren Websites eingesetzt wird, für jede Website einen eigenen OpenClaw Agenten mit eigenem Telegram Bot erstellen. Eine VPS-Infrastruktur — unbegrenzte Agenten.

Nächste Schritte