🦞 OpenClaw Bootcamp
DAY 13 / 16
☁️
OpenClaw Bootcamp · Day 13

VPS Deploy:
Your Agent, Always On

Your agent works. It talks, remembers, delegates, integrates, and it’s containerized. One problem — it only runs when your laptop lid is open. Today we fix that permanently.

VPS Provisioning Daemon & Systemd 24/7 Uptime
🦞 OpenClaw Bootcamp
DAY 13 / 16
Where We Are & Where We’re Going

Day 13 Goals

Day 12 Checkpoint
  • Docker containerization with sandbox modes (gVisor, Docker-in-Docker)
  • Docker Compose for multi-service orchestration
  • Container security: non-root user, read-only FS, resource limits
01
Choose a VPS provider and understand the hardware requirements for cloud-only vs local-model setups
02
Install OpenClaw on a VPS with daemon auto-start that survives reboots
03
Secure remote access via Tailscale, harden the gateway, and set up monitoring
🦞 OpenClaw Bootcamp
DAY 13 / 16
Infrastructure

Choosing a VPS

🇫🇦

Hetzner

Best price-to-performance in Europe. Strong ARM options. Popular choice for OpenClaw deployments.

🌊

DigitalOcean

Developer-friendly UI. Predictable pricing. Good docs and community support.

Linode (Akamai)

Reliable, simple pricing. Global data centers. Solid for always-on workloads.

Minimum Specs
  • CPU: 4+ vCPU
  • RAM: 8 GB (16 GB preferred)
  • Storage: 80 GB+ SSD
  • Local models: 2 TB+ storage, GPU
  • Budget: $5–20/mo cloud-only
“AI Installs AI” Flow

Claude Code SSHs into your VPS and sets up everything — deps, config, daemon, firewall. Takes ~15 minutes. No DevOps experience needed. You watch and approve each step.

🦞 OpenClaw Bootcamp
DAY 13 / 16
Getting It Running

Installation on VPS

Path 1: Curl Installer (Recommended)
# One-line install curl -fsSL https://openclaw.ai/install.sh | bash # Then onboard with daemon openclaw onboard --install-daemon

The installer handles all dependencies. The onboard command walks you through config and installs the system service.

Path 2: Docker
# docker-compose with pre-built images docker compose up -d

Use the pre-built images from Day 12. Same compose file, just deploy it on your VPS instead of locally.

Path 3: Manual Install
# Install dependencies apt install -y nodejs npm git # Clone and install git clone <repo> openclaw cd openclaw && npm install # Configure cp .env.example .env # Edit .env with your keys # Start npm start
Recommendation

Use the curl installer for new VPS deployments. It’s the most tested path and handles edge cases (Node version, system deps, permissions) that manual installs miss.

🦞 OpenClaw Bootcamp
DAY 13 / 16
Survive Reboots

Daemon & Auto-Start

The Easy Way
openclaw onboard --install-daemon

Installs a systemd service on Linux or a launchd agent on macOS. Handles the service file, enables auto-start, and starts the daemon immediately.

Manual Systemd Setup
# Create service file sudo nano /etc/systemd/system/openclaw.service # Enable and start sudo systemctl enable openclaw sudo systemctl start openclaw # Check status sudo systemctl status openclaw
What the Daemon Does
  • Runs the Gateway on port 18789
  • Starts automatically on boot
  • Restarts on crash (systemd Restart=always)
  • Survives SSH disconnection
  • Survives server reboots
Result

After this step, your agent is running 24/7. Close your laptop, disconnect SSH, reboot the VPS — it comes back up automatically. This is the “always on” in today’s title.

🦞 OpenClaw Bootcamp
DAY 13 / 16
Connecting Remotely

Remote Access & Networking

Gateway Bind Modes
ModeScope
loopbackLocal-only (default, safest)
lanAll local network interfaces
tailnetTailscale network only
customBind to a specific IP/interface
Recommended: Tailscale

Keep the gateway on loopback (never expose it to the internet). Install Tailscale on your VPS and your devices. Tailscale handles routing through an encrypted WireGuard tunnel — zero port forwarding, zero firewall holes.

Reverse Proxy (Optional)

If you need HTTPS access, put nginx or Caddy in front of the gateway. Caddy handles TLS certificates automatically. Gateway stays on loopback, proxy terminates HTTPS.

Gateway Authentication
  • token — Bearer token auth (recommended)
  • password — Username/password auth
  • trusted-proxy — Delegate auth to reverse proxy

Always enable gateway.auth. An unauthenticated gateway is an open door to your agent.

🦞 OpenClaw Bootcamp
DAY 13 / 16
Lock It Down

Security Hardening

OpenClaw Security Audit
# Deep audit with live Gateway probe openclaw security audit --deep # Auto-fix remediable issues openclaw security audit --fix

The --deep flag probes the live gateway for misconfigurations. --fix auto-remediates what it can.

Firewall (UFW)
ufw default deny incoming ufw allow ssh ufw allow in on tailscale0 ufw enable
Hardening Checklist
  • 01Non-root user. Run OpenClaw as a dedicated user, never as root.
  • 02Config permissions. ~/.openclaw/ at 700, openclaw.json at 600.
  • 03Gateway auth token. Always enable token-based gateway authentication.
  • 04DM pairing enabled. Require DM pairing so only authorized users can interact.
  • 05Lock BotFather. Disable group adds to prevent unauthorized channel access.
🦞 OpenClaw Bootcamp
DAY 13 / 16
Keep It Healthy

Monitoring & Maintenance

Diagnostics
# Full system diagnostic openclaw doctor # Gateway-specific status openclaw gateway status

openclaw doctor checks config, API keys, channel connections, memory index, and daemon health in one command.

Health Monitoring

Set gateway.channelHealthCheckMinutes in config to enable periodic health checks. The gateway will verify channel connections at the configured interval and log warnings on failure.

Logs & Updates
  • Logs: /tmp/openclaw/openclaw-YYYY-MM-DD.log
  • Update: openclaw update --channel stable
  • Channels: stable, beta, dev
  • Backup: git push the workspace directory
Backup Strategy

Your workspace directory contains SOUL.md, AGENTS.md, MEMORY.md, daily notes, and config. It’s already a git repo — just git push it to a private remote. If your VPS dies, you clone the workspace onto a new one and you’re back.

🦞 OpenClaw Bootcamp
DAY 13 / 16
Before Day 14

Day 13 Homework

  • 01

    Provision a VPS

    Spin up a VPS on Hetzner, DigitalOcean, or Linode with at least 4 vCPU and 8 GB RAM. Ubuntu 22.04+ recommended. SSH in and verify you have root or sudo access.

  • 02

    Install OpenClaw

    Use the curl installer (curl -fsSL https://openclaw.ai/install.sh | bash) or deploy with Docker Compose. Run openclaw onboard --install-daemon to set up the system service.

  • 03

    Configure Remote Access

    Install Tailscale on both your VPS and your laptop. Verify you can reach the gateway at http://<tailscale-ip>:18789. Keep the gateway on loopback — let Tailscale handle routing.

  • 04

    Run Security Audit

    Run openclaw security audit --deep and fix any findings. Set up UFW, verify config permissions, and confirm gateway auth is enabled. Your agent is on the internet now — treat it accordingly.

🦞 OpenClaw Bootcamp
DAY 13 / 16
🦞
Coming Up

Day 14: Agentic Coding
Your Agent as a Development Partner

Your agent is deployed, secured, and running 24/7 on a VPS. Now it’s time to put that always-on agent to work as a coding partner — writing code, reviewing PRs, debugging issues, and shipping features alongside you. Day 14, we code together.

Code Generation PR Reviews Pair Programming