Getting Started with OpenClaw on HostAfrica

Managing your OpenClaw AI assistant

Evans

Last Update 25 days ago

Learn how to deploy, configure, and manage your OpenClaw AI assistant, including linking WhatsApp, adding API keys, and troubleshooting common issues.
What is OpenClaw?

OpenClaw is a self-hosted AI assistant platform that lets you run your own AI-powered chatbot on your infrastructure. It connects AI models like OpenAI GPT-4 and Anthropic Claude to messaging platforms such as WhatsApp, Telegram, Discord, and Slack with full control over your data and privacy.


Key Features:
  • Supports OpenAI and Anthropic Claude models
  • Works with WhatsApp, Telegram, Discord, and Slack
  • Self-hosted (your data never leaves your server)
  • Automatic SSL via Let's Encrypt
  • Can be deployed without an AI API key for non-automation use cases
Deployment & Requirements
OpenClaw is provisioned automatically on HostAfrica using a pre-configured Ubuntu 24.04 template. There is no manual setup required.
Minimum Requirements:
ResourceMinimum
OSUbuntu 24.04 LTS
RAM2GB (recommended for stable operation)
CPU2 vCPU minimum
Storage20GB minimum
NetworkPublic IPv4 + Domain
What's included on deployment:
  • OpenClaw Gateway (latest version)
  • Caddy web server (automatic HTTPS)
  • Node.js 22 runtime
  • Pre-enabled plugins: WhatsApp, Telegram, Discord, Slack
Setup time: 3–5 minutes via automated provisioning.
Architecture
OpenClaw uses a layered deployment architecture to keep your gateway secure and your data private.


How it works:

  • Caddy handles all incoming external traffic on port 443 (HTTPS only)
  • OpenClaw Gateway runs bound to localhost (127.0.0.1) only — it is not reachable directly from the internet
  • All traffic between Caddy and the Gateway is routed internally on the server
  • This reverse proxy design means only Caddy is ever exposed publicly, keeping the gateway isolated and protected
Traffic Flow:
Layer breakdown:
LayerRole
InternetClient browsers and mobile apps connect via HTTPS on port 443
Caddy Reverse ProxyHandles all external traffic, manages SSL automatically via Let's Encrypt, and forwards requests to the Gateway
OpenClaw GatewayRuns isolated on localhost:18789 — never directly exposed to the internet. Handles token auth, the AI agent engine, and messaging plugins
AI Model APIYour chosen AI provider (OpenAI or Anthropic), authenticated via your API key stored in .env
Messaging ChannelsOptional integrations (WhatsApp, Telegram, Discord, Slack) configured per your needs
The Gateway is marked ISOLATED — it is only reachable internally on the server, never from the public internet.
Security Architecture
Caddy (External Layer)
  • Handles all external traffic exclusively on port 443 (HTTPS only)
  • Obtains and renews SSL certificates automatically via Let's Encrypt
  • Acts as the only internet-facing component — the gateway is never exposed directly
Service Isolation
  • OpenClaw Gateway is bound to 127.0.0.1 (localhost only)
  • Only Caddy is exposed to the internet
  • Reverse proxy architecture prevents any direct access to the gateway
Authentication
  • A unique Gateway Token is auto-generated on every deployment
  • Token is required to access the dashboard
  • Channel-level access control available (allowlists, pairing codes)
Data Privacy
  • Fully self-hosted — all data remains on your server
  • No third-party analytics or tracking
  • API keys stored securely in environment files on your server
Accessing Your Dashboard
After deployment, you will receive:
Steps to log in:
  1. Go to your Access URL
  2. If you see a disconnection error, click Overview — this is expected before adding your token
  3. Enter your Gateway Token and click Connect
Alternatively, append your token directly to the URL:
To find your Gateway Token via SSH:

How to Add or Change Your AI API Key

If you didn't configure an API key during deployment, or want to switch AI providers:
1. SSH into your server:

2. Edit the environment file:

3. Add your key (choose one provider):

4. Save the file (Ctrl+X, then Y, then Enter)

5. Restart OpenClaw:

6. Verify it's running

Where to get API keys:
How to Link WhatsApp

Tip: We recommend using a dedicated WhatsApp number (not your personal one). An eSIM or spare phone works best.

  • SSH into your server
  • Run the linking command:
  • Scan the QR code using WhatsApp:

Open WhatsApp → Settings  Linked Devices  Link a Device

          • After a successful scan, your credentials are saved automatically
          If you see Error 515 after linking:
          WhatsApp should now show as Connected in your dashboard under Channels.

          To View Deployment Information:

          Example Output:
          How to Change Your Domain
          1. SSH into your server
          2. Edit the Caddy configuration:
          3. Replace the existing domain with your new one:

             4. Restart Caddy:

          An SSL certificate for the new domain will be issued automatically.
          Useful Commands
          OpenClaw Service Management:
          ActionCommand
          Startsystemctl start openclaw-gateway
          Stopsystemctl stop openclaw-gateway
          Restartsystemctl restart openclaw-gateway
          View logsjournalctl -u openclaw-gateway -n 50
          Follow live logs journalctl -u openclaw-gateway -f
          Check status systemctl status openclaw-gateway
          Caddy (Web Server):
          ActionCommand
          Check statussystemctl status caddy
          Restartsystemctl restart caddy
          View logsjournalctl -u caddy -n 50
          Configuration Files:
          FilePath
          OpenClaw config/root/.openclaw/openclaw.json
          API keys/root/.openclaw/.env
          Caddy config/etc/caddy/Caddyfile
          Deployment info/root/.openclaw-deployment-info
          Updating OpenClaw
          OpenClaw is automatically updated to the latest version on deployment. To manually update:
          To update system packages:
          Troubleshooting
          OpenClaw not responding?
          Check system resources:
          Chat not working after setup?
          Ensure an API key has been added to /root/.openclaw/.env and that the gateway has been restarted.


          Dashboard shows disconnection error on first load?
          This is expected. Click Overview and enter your Gateway Token to connect.

          Was this article helpful?

          0 out of 0 liked this article

          Still need help? Message Us