The 1M-View Tutorial Is Unsafe — Here's the Secure Way
There's an OpenClaw install tutorial with over a million views. It walks you through the official installer, gets the dashboard running, and calls it done. What it doesn't show: your gateway is now exposed to the public internet with zero authentication. Anyone who finds the IP can hit your agent.
OpenClaw 2.0 (v2026.9.2, released Sept 5) makes this worse — swarm sub-agents are ON by default. Decrypt's Sept 1 analysis flagged sandboxing and approvals OFF by default, plus "one Gateway equals one trust domain" — meaning one exposed gateway compromises everything. The Plugin SDK context aliases deprecate on or after September 8, 2026, so stale tutorials break immediately.
This guide (and the video above) shows the secure install on a $5 Contabo VPS: Tailscale Serve for private HTTPS access (no open ports), openclaw security audit to prove it, free models via OmniRoute, and loginctl enable-linger so the gateway survives SSH disconnects and server reboots. Plus WhatsApp, Telegram, and the plugin marketplace.
Why Self-Host on a VPS
Three reasons: always-on agents (your laptop sleeps, the VPS doesn't), your data on your hardware (no third-party logs), and ~$5/month. The Contabo Cloud VPS 6 (6 vCPU, 12 GB RAM, 200 GB SSD) on a 24-month plan is $172.80 total — about $7.20/month. EU region is free to select. I use this link — same server, costs you nothing extra.
Step 1 — SSH In and Harden the Server
ssh root@YOUR_VPS_IP
# Create non-root user
adduser opencaw
usermod -aG sudo opencaw
su - opencaw
# SSH key-only login (paste your public key)
mkdir -p ~/.ssh && chmod 700 ~/.ssh
echo "YOUR_PUBLIC_KEY" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
# Disable password auth and root login
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo systemctl reload sshd
# UFW — allow SSH only for now
sudo ufw allow ssh
sudo ufw --force enable
Commands are in the description — don't type them from the video. Copy from the written guide.
Step 2 — Install OpenClaw 2.0 (Official Installer)
The official installer provisions Node 22+ automatically.
curl -fsSL https://openclaw.ai/install.sh | bash
Complete or skip onboarding. Verify:
openclaw --version
# Expect: 2026.9.2
Step 3 — Tailscale Serve (The Differentiator: Private Access, Zero Open Ports)
This is the security layer the popular tutorial skips. Tailscale Serve wraps your local gateway in an HTTPS address that only devices on your tailnet can reach. No public IP exposure. No open ports on the VPS firewall.
# Install Tailscale and join your tailnet
curl -fsSL https://tailscale.com/install.sh | sh
tailscale up
# Clear any old serve config, then set the gateway mode to serve
tailscale serve --https=443 off
openclaw config set gateway.tailscale.mode serve
# Restart and verify
openclaw gateway restart
tailscale serve status
openclaw gateway status --deep
tailscale serve status gives you the HTTPS URL (something like https://your-device.your-tailnet.ts.net). That URL works from your phone, laptop, anywhere — but only if you're logged into the same Tailscale network. The VPS firewall stays closed.
Step 4 — Security Audit (Proof on Camera)
One command verifies your entire setup:
openclaw security audit
# Deep probe — actually hits the gateway
openclaw security audit --deep
If anything flags, run openclaw security audit --fix and re-run. Read the findings out loud — they tell you exactly what's exposed. I run this every time I touch the config.
Step 5 — Connect Free Models via OmniRoute
No subscription needed. Your existing OmniRoute endpoint (from the AgentRouter setup guide) powers the assistant for $0.
# Interactive config — select Model Providers → add custom OpenAI-compatible
openclaw config
- Base URL:
http://YOUR_VPS_IP:20128/v1 - API Key: your OmniRoute key
# Verify available models
openclaw models list
# Or check OmniRoute directly
curl http://YOUR_VPS_IP:20128/v1/models | jq '.data[].id' | grep -i -E 'deepseek|glm|qwen'
# Set primary model
openclaw models set omniroute/deepseek-v4-flash
Test it: chat with the agent. Total AI cost: zero.
Step 6 — Run It 24/7 (Survive SSH Disconnects AND Reboots)
The problem: exit SSH and the gateway dies. Reboot the server and it's gone.
The fix:
# Start properly with Tailscale Serve
openclaw gateway --tailscale serve
# Make it survive logout (systemd linger)
sudo loginctl enable-linger root
loginctl show-user root | grep Linger
# Expect: Linger=yes
# Verify
openclaw gateway restart
openclaw gateway status --deep
Reboot test (on camera in the video):
sudo reboot
# Wait ~60 seconds
tailscale serve status
openclaw gateway status --deep
# Both should be green
Step 7 — WhatsApp, Telegram, and Plugins
From the dashboard:
- WhatsApp: Scan the QR code → test a message from your phone
- Telegram: Add bot token (from @BotFather) → test message
- Plugins: Enable OpenCode, Browser, File Transfer — community-built, may need browser installed on VPS for the browser tool
Your assistant is now everywhere you message. Plugins make it do real work: browser automation, file ops, code execution.
Cost Summary
| Component | Cost |
|---|---|
| Contabo VPS (24-mo) | ~$7.20/mo |
| AI Models (OmniRoute) | $0 |
| Tailscale (personal) | $0 |
| OpenClaw | Open source |
| Total | ~$7.20/mo |
What's Next
Drop a comment with what you want your assistant to automate first — daily trend scans, WhatsApp replies, browser tasks, inbox management. The full command list is in the description. If you found this useful, the previous OmniRoute video shows how to build the free-model endpoint from scratch.
Disclaimer: Some links are affiliate links. If you use them, I may earn a small commission at no extra cost to you. My content is educational and not financial advice.