Getting Started with OpenClaw on HostAfrica
Managing your OpenClaw AI assistant
Evans
Last Update 25 days ago

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.
- 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
OpenClaw is provisioned automatically on HostAfrica using a pre-configured Ubuntu 24.04 template. There is no manual setup required.
| Resource | Minimum |
| OS | Ubuntu 24.04 LTS |
| RAM | 2GB (recommended for stable operation) |
| CPU | 2 vCPU minimum |
| Storage | 20GB minimum |
| Network | Public IPv4 + Domain |
- OpenClaw Gateway (latest version)
- Caddy web server (automatic HTTPS)
- Node.js 22 runtime
- Pre-enabled plugins: WhatsApp, Telegram, Discord, Slack
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

| Layer | Role |
| Internet | Client browsers and mobile apps connect via HTTPS on port 443 |
| Caddy Reverse Proxy | Handles all external traffic, manages SSL automatically via Let's Encrypt, and forwards requests to the Gateway |
| OpenClaw Gateway | Runs isolated on localhost:18789 — never directly exposed to the internet. Handles token auth, the AI agent engine, and messaging plugins |
| AI Model API | Your chosen AI provider (OpenAI or Anthropic), authenticated via your API key stored in .env |
| Messaging Channels | Optional integrations (WhatsApp, Telegram, Discord, Slack) configured per your needs |
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
- 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
- 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)
- 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
After deployment, you will receive:
- Access URL: https://your-domain.hcloud.app
- Gateway Token (required to log in)
- SSH Access (full root access)
- Go to your Access URL
- If you see a disconnection error, click Overview — this is expected before adding your token
- Enter your Gateway Token and click Connect
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:2. Edit the environment file:
4. Save the file (Ctrl+X, then Y, then Enter)
5. Restart OpenClaw:
6. Verify it's running
- OpenAI: https://platform.openai.com (paid account with credits required)
- Anthropic: https://console.anthropic.com (paid account required)
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
To View Deployment Information:
- SSH into your server
- Edit the Caddy configuration:
4. Restart Caddy:
| Action | Command |
| Start | systemctl start openclaw-gateway |
| Stop | systemctl stop openclaw-gateway |
| Restart | systemctl restart openclaw-gateway |
| View logs | journalctl -u openclaw-gateway -n 50 |
| Follow live logs | journalctl -u openclaw-gateway -f |
| Check status | systemctl status openclaw-gateway |
| Action | Command |
| Check status | systemctl status caddy |
| Restart | systemctl restart caddy |
| View logs | journalctl -u caddy -n 50 |
| File | Path |
| OpenClaw config | /root/.openclaw/openclaw.json |
| API keys | /root/.openclaw/.env |
| Caddy config | /etc/caddy/Caddyfile |
| Deployment info | /root/.openclaw-deployment-info |
OpenClaw is automatically updated to the latest version on deployment. To manually update:
OpenClaw not responding?
Ensure an API key has been added to /root/.openclaw/.env and that the gateway has been restarted.
This is expected. Click Overview and enter your Gateway Token to connect.
