Skip to main content
BlogResourcesPodcast
🚀 Chapter 7 of 7 Phase 3: Deploying

Setup and Summary

Getting started and putting it all together

Video Lesson Coming Soon

A video walkthrough for this chapter is in production. For now, dive into the written content below.

System Architecture — Chapter 7 View

This diagram reveals more of the OpenClaw architecture as you progress through chapters.

Mission Control Dashboardlocalhost:3001
LIVE
TRUST FrameworkSkill vetting active
ClawHavoc Defense1,184 threats blocked
Project > Task > Model Hierarchy
Haiku 85%Sonnet 13%Opus 2%
routes to
OpenClaw Gateway
Port 18789 • Node.js v22 • 190K+ GitHub Stars
Message → Context → LLM → Tools → Response → Memory
connects
Messaging Channels
WhatsApp
Telegram
Slack
Discord
Signal
iMessage
Memory System
SOUL.mdUSER.mdIDENTITY.mdMEMORY.md
Heartbeat Daemon
Proactive monitoring every 30 min. Can offload to Ollama ($0/mo).
5-Layer Feedback LoopExecute → Observe → Remember → Analyze → Adapt
Cron Schedulerat • every • cron expressions
$1,500 → $30/mo97% cost reduction
ClawHub5,700+ skills
MCPTool protocol
Custom Skills30 min to build
Chapter 7 of 7 — 100% Architecture Revealed

What You'll Learn

  • Installation walkthrough
  • Initial configuration
  • First agent setup
  • Testing your setup
  • Troubleshooting common issues
  • Next steps and resources
In this chapter 8 sections

Installation and Initial Setup

Follow the installation process step-by-step to deploy your agent.

Installation Steps
From Zero to Running Agent in 5-10 Minutes
1
Run Installer
curl -fsSL https://get.openclaw.sh | bash
2
Download & Verify
Latest version downloaded, checksums verified
3
Configure Name
Set your OpenClaw name for logs and identification
4
Connect Channels
Choose WhatsApp, Slack, Discord, Telegram, etc.
5
Set LLM Provider
Anthropic Claude, OpenAI, or other — provide API key
6
Enable Autonomy
YES for Heartbeat + Cron, NO for reactive-only
7
Gateway Started
openclaw daemon start — agent is live!
0/7

Interactive — tap to explore

Getting OpenClaw running is remarkably simple thanks to a one-liner installation. Open your terminal and run the installation command below.

This downloads the latest version, verifies checksums, installs Node.js dependencies, and guides you through initial configuration. The installer prompts you for key settings: your OpenClaw name (used in logs and identification), which messaging platforms you want to connect (WhatsApp, Slack, etc.), your LLM provider (Anthropic's Claude, OpenAI, etc.), and your API key for that provider. The entire process takes 5-10 minutes.

During setup, you'll see a prompt asking 'Enable autonomous operation?' Click YES if you want your agent to use the Heartbeat Daemon and Cron Scheduler. Click NO if you want reactive-only (no proactive behavior). Most deployments say YES.

The installer generates a .env file containing your configuration and tokens. Keep this file secure—it contains sensitive authentication data. After installation, verify and start the Gateway using the commands below.

bash

Platform-Specific Considerations

See platform-specific deployment options and requirements.

💻 Platform Support
OpenClaw Runs Everywhere
🍎
macOS
Native
Intel + Apple Silicon. Straightforward install.
🪟
Windows
WSL2
Requires Windows Subsystem for Linux 2. 10-15 min setup.
🐧
Linux
Native
Ubuntu, Debian, CentOS — all work identically.
0/3

Interactive — tap to explore

OpenClaw runs on macOS, Windows/WSL2, and Linux. On macOS, the installation is straightforward on both Intel and ARM (Apple Silicon) processors. Node.js packages are available for both architectures.

On Windows, OpenClaw requires WSL2 (Windows Subsystem for Linux 2), not native Windows. WSL2 provides a proper Linux environment where OpenClaw runs identically to Linux servers.

WSL2 setup takes 10-15 minutes; once configured, Windows users experience no difference from Linux/Mac users. On Linux, the experience is identical across distributions—Ubuntu, Debian, CentOS, etc., all work. For development/testing, any machine with 4GB RAM and Node.js v22 suffices.

For production, a dedicated server (cloud VPS or bare metal) is recommended. Development systems often run on a laptop that stays on during development but can be stopped. Production systems should run 24/7 on reliable hardware. The choice between cloud and self-hosted depends on your needs; OpenClaw works equally well in both scenarios.

VPS Hosting Recommendations and Setup

For production deployments, a VPS (Virtual Private Server) is the recommended approach. Entry-level specs for OpenClaw are modest: 1-2 vCPU, 4-8GB RAM, 20-50GB storage, running around $10-15/month. These specs handle hundreds of concurrent users with room to spare. Setup on a VPS follows the same one-liner installation as local machines.

After installation, configure your reverse proxy to listen on port 80/443 and forward to OpenClaw's Gateway on localhost:18789. The reverse proxy enforces HTTPS (critical for external access) and provides a single point for authentication tokens. Use certbot for free SSL certificates from Let's Encrypt to provision HTTPS certificates.

Backup your .env file regularly—if your VPS crashes and you need to rebuild, the .env file restores your configuration quickly. Many teams keep .env backed up to encrypted cloud storage for disaster recovery.

bash
💡
Choose the Right VPS

For production OpenClaw, pick providers with stable uptime, good API bandwidth, and support for containerization (Docker). Expect monthly costs of $20-100 depending on agent load.

Recommended VPS Providers

Compare VPS providers for production agent hosting.

🖥️ VPS Comparison
Production Hosting Options
🇩🇪
Hetzner
€4.50/mo
Best price-to-performance ratio
🌊
DigitalOcean
$6/mo
Beginner-friendly, great docs
🔵
Linode/Akamai
$5/mo
Rock-solid reliability
🌐
Vultr
$6/mo
Global reach, many regions
☁️
AWS Lightsail
$5/mo
AWS ecosystem integration
0/5

Interactive — tap to explore

ProviderStarting Price/MonthSpecs (1vCPU Plan)Strengths
Linode$5-121 vCPU, 1GB RAM (2GB rec)Excellent documentation, strong uptime, great support
DigitalOcean$4-61 vCPU, 1GB RAM (4GB rec)Simple dashboard, easy scaling, large community
Vultr$6-121 vCPU, 1GB RAM (2GB rec)Competitive pricing, reliable performance, many locations
AWS (t3.medium)$20-302 vCPU, 4GB RAMEnterprise features, but overkill for small deployments
Hetzner$3-81 vCPU, 1GB RAM (2GB rec)Best value, reliable EU-focused provider
💡
Quick Pick

For most learners just getting started, Hetzner (best price-to-performance in Europe) or DigitalOcean (best global availability with easy setup) are the strongest starting points. Both offer $5-10/month plans that comfortably run OpenClaw.

Process Management and Uptime

Understand the production infrastructure stack for reliable operation.

Production Stack
Keeping Your Agent Running 24/7
1
PM2 Process Manager
Auto-restarts on crash, handles log rotation
2
OpenClaw Daemon
Gateway running on localhost:18789
3
Reverse Proxy (nginx)
HTTPS termination, authentication, load balancing
4
Monitoring (optional)
New Relic, DataDog, or Prometheus for metrics
5
Alerts Configured
Notify on Gateway down, error spikes, memory thresholds
0/5

Interactive — tap to explore

OpenClaw runs as a long-lived process, and you'll want it running 24/7 without manual restarts. PM2 is the standard process manager for Node.js—it restarts OpenClaw automatically if it crashes, handles log rotation, and provides monitoring.

After installation, use PM2 to manage OpenClaw as shown below. PM2 will restart OpenClaw automatically if the process dies. View logs with pm2 logs openclaw.

For monitoring, tools like New Relic, DataDog, or Prometheus can track OpenClaw's memory usage, request latency, and error rates—overkill for small deployments but valuable at scale. Most teams find PM2's built-in monitoring (visible via pm2 monit) is plenty.

bash

Updates and Rollback Procedures

Follow the safe update and rollback process for agent deployments.

🔄 Update Cycle
Safe Monthly Update Process
⏹️
Stop
⬆️
Update
🧪
Test
▶️
Start
↩️
Rollback?
0/5

Interactive — tap to explore

OpenClaw receives security updates regularly—roughly monthly releases with bug fixes and feature improvements. Updating is straightforward (see code block). The entire process takes 2-3 minutes.

Before updating production systems, test in a staging environment first. This reveals incompatibilities or unexpected behaviors before they affect live users.

When testing, run the same message patterns against the updated version and verify behavior remains identical. Most updates are minor and safe, but occasional major updates warrant extra caution. This is why keeping .env backups matters—rollbacks are fast but require your configuration data.

bash
🧠
Safe Updates

Always test updates in staging before production. Keep a recent backup so you can rollback quickly if an update breaks agent compatibility.

OpenClaw's CLI provides commands for everyday operations. Refer to the command reference below for the most common operations and their purposes. Most operations are declarative—changing configuration via CLI immediately takes effect without restarting the daemon. This live-reload capability means you can tune parameters without downtime.

bash

Complete CLI Command Reference

Reference the complete OpenClaw CLI command structure.

🌳 CLI Command Map
OpenClaw Command Reference
⌨️openclawCLI
├─🔄daemonPROCESS
└─▶️start / stop / status / logs
├─⚙️configSETTINGS
└─📋list / set / get
├─🧩skillTOOLS
└─📦install / remove / list
├─🤖agentAGENTS
└─📊list / logs / restart
0/9

Interactive — tap to explore

OpenClaw's CLI provides commands for everyday operations. Key commands: openclaw daemon start launches the Gateway in background, openclaw daemon stop gracefully shuts down, openclaw daemon status shows if it's running, openclaw daemon logs displays recent logs, openclaw --version shows your installed version.

For configuration: openclaw config list displays current settings, openclaw config set updates a setting, openclaw config get retrieves a single value. For debugging: openclaw test-connection verifies your LLM API key works, openclaw list-skills shows installed skills, openclaw skill install adds a new skill, openclaw skill remove removes a skill.

For agents: openclaw agent list shows all agents, openclaw agent logs shows an agent's logs, openclaw agent restart restarts a specific agent. Most operations are declarative—changing configuration via CLI immediately takes effect without restarting the daemon. This live-reload capability means you can tune parameters without downtime.

Putting It All Together: The Complete Workflow

Now that you've journeyed through OpenClaw's architecture, it's time to synthesize the complete workflow. Start with installation and configuration—set up your Gateway with proper authentication and binding to localhost.

Design your Project structure around major initiatives, with Tasks for specific workflows. For each Task, implement the three-layer hierarchy: route simple queries to Haiku, complex queries to Sonnet, critical decisions to Opus.

Build custom skills for specialized operations; avoid questionable community skills. Implement selective memory loading: cache stable files, keep volatile files fresh.

Set your heartbeat interval based on monitoring needs (30 min default is reasonable), and optionally offload heartbeat decision-making to a local Ollama model. Configure cron tasks for scheduled operations.

Monitor your token usage, calibrate your context loading, and iterate toward efficiency. Deploy behind a reverse proxy with HTTPS and token authentication. Set up PM2 or similar to ensure 24/7 uptime.

Stay updated with security patches monthly. Most importantly: iterate.

Start simple, measure real usage, identify bottlenecks, optimize those specific areas. The teams running the most efficient OpenClaw systems didn't get there overnight; they built understanding through hands-on experimentation. Your journey now begins.

Key Takeaways

📝 My Notes
← Security Back to Overview →