Skip to main content

Deployment Guide

This guide covers deploying OpenClaw gateway to production environments, from local development to cloud-hosted infrastructure.

Overview

OpenClaw gateway can be deployed in several modes:
  • Local machine — Your laptop/desktop (Mac, Linux, WSL2)
  • VPS/Bare metal — Dedicated servers (Hetzner, DigitalOcean, OVH)
  • Cloud platforms — Managed services (Fly.io, Railway, Render, GCP)
  • Container orchestration — Docker, Docker Compose, Kubernetes

System Requirements

Minimum Specifications

  • CPU: 1 core (2+ cores recommended for multiple agents)
  • RAM: 512 MB minimum, 1-2 GB recommended
  • Storage: 1 GB minimum, 5+ GB recommended for workspace and logs
  • Network: Stable internet connection, persistent IP recommended

Runtime Requirements

  • Node.js: 22+ (LTS recommended)
  • Optional: Docker for containerized deployments
  • Optional: Tailscale for secure remote access

Pre-Deployment Checklist

Before deploying to production:
1

Run security audit

2

Run doctor checks

3

Test gateway locally

4

Verify authentication

5

Backup configuration

Deployment Options

Local Development

Ideal for:
  • Personal use
  • Development and testing
  • Single-user scenarios
Setup:
Configuration:

VPS Deployment

Ideal for:
  • Always-on personal assistant
  • Remote access from multiple devices
  • Better uptime than local machine
Recommended Providers:

Hetzner

€4-20/month, excellent performance, EU-based

DigitalOcean

$6-40/month, simple setup, global regions

Linode

$5-40/month, strong support, predictable pricing

Vultr

$6-40/month, high-frequency compute options
VPS Setup (Ubuntu 22.04+):
Networking:

Fly.io Deployment

Ideal for:
  • Global edge deployment
  • Auto-scaling
  • Managed infrastructure
From source repository: The included fly.toml configures:
  • 2GB RAM, 2 shared CPUs
  • Persistent volume for state
  • HTTPS with automatic certificates
  • Auto-restart on failure
Configuration (fly.toml):

Railway Deployment

Ideal for:
  • Simple one-click deployment
  • Automatic builds from GitHub
  • Integrated database options

Render Deployment

Ideal for:
  • Managed Docker hosting
  • Free tier available
  • Auto-deploy from Git
From source render.yaml:
  1. Fork OpenClaw repository
  2. Connect to Render dashboard
  3. Create “New Web Service” from repo
  4. Render auto-detects render.yaml
  5. Deploy!

Google Cloud Platform

Ideal for:
  • Enterprise deployments
  • Integration with GCP services
  • Custom VM configurations
Cloud Run deployment:

Environment Variables

Critical environment variables for production:

Health Checks

Monitor gateway health:

Persistence and State

OpenClaw stores state in:
  • Config: ~/.openclaw/config.json
  • Sessions: ~/.openclaw/agents/<agent-id>/sessions/
  • Workspace: ~/.openclaw/workspace/ (default)
  • Credentials: ~/.openclaw/credentials/
  • Logs: Platform-specific (systemd journal, Docker logs)
Backup strategy:

Platform-Specific Notes

Linux (systemd)

The onboarding wizard installs a systemd user service:

macOS (launchd)

Gateway runs as a LaunchAgent:

Docker Considerations

Ensure volume mounts for persistence:
  • /home/node/.openclaw for state
  • /home/node/.openclaw/workspace for workspace files
See Docker Guide for detailed Docker setup.

Updating Production Deployments

VPS Update

Cloud Platform Updates

  • Fly.io: fly deploy (rebuilds from Dockerfile)
  • Railway: Push to connected Git branch
  • Render: Auto-deploys on Git push
  • GCP Cloud Run: Re-run gcloud run deploy

Next Steps

Docker Setup

Containerized deployment with Docker Compose

Security Guide

Secure your gateway with best practices

Troubleshooting

Common issues and solutions

Multi-Agent Setup

Route channels to isolated agents