← Home

Guide

OpenClaw on a VPS: Setup and Best VPS

Which VPS to buy for OpenClaw, what it needs and costs, and how to self-host it with Docker. Prices checked October 2026.

Why Self-Host on a VPS?

Running OpenClaw on your own VPS gives you full control over your AI agent. Your data stays on your server, you can customize everything, and you're not dependent on any third-party platform. However, self-hosting requires technical knowledge and ongoing maintenance — you're responsible for updates, security patches, backups, and uptime.

What OpenClaw Needs From a VPS

Buy a 2 vCPU / 4 GB RAM x86 Linux VPS with 40 GB or more of SSD, billed month to month, and run the official pre-built Docker image. You do not need a GPU, because OpenClaw sends model calls to a remote provider. If you only want a chat bot on Telegram or Discord, a 2 GB plan is enough. The gateway is a Node.js process that owns your state and workspace, keeps your channel connections open, and serves a control UI. The install documentation asks for Node 24.16+ or 26.1+ (Node 26 is recommended). Neither the install page nor the Linux server page publishes a minimum RAM figure, so the numbers below come from the places that do, plus our own fleet.

SourceWhat it says
OpenClaw Raspberry Pi guideMinimum 1 GB RAM, 1 core, 500 MB free disk, 64-bit OS; recommended 2 GB or more
OpenClaw DigitalOcean guideRuns on a 1 vCPU / 1 GB droplet with swap added; suggests a 2 GB droplet if you still hit out-of-memory errors
OpenClaw Docker guide6 GB RAM only for building the image from source; pre-built images avoid this
Our fleet (19 production containers, August 2026)Median 374 MB resident, 90th percentile 1,265 MB, maximum 1,411 MB

Our own breakdown is on the system requirements page. A typical agent is small, but the tail is more than three times the median, so size for the tail.

Recommended specs: 2 vCPU, 4 GB RAM, 40 GB SSD. 2 GB is a workable floor for a chat-only bot; 4 GB is comfortable once you add the browser image or other services.

Four things that change the sizing

  • Do not build from source on a small box. Several hosting guides say you need 6 GB for OpenClaw. That figure is for a local source image build, and a build that runs out of memory is killed with exit code 137. The official images on ghcr.io/openclaw/openclaw and Docker Hub avoid the build entirely, which is why a 2 GB or 4 GB VPS is enough for running it.
  • The browser image is a bigger download. The -browser variants (for example latest-browser) bake in Chromium for the Gateway-controlled browser. On Docker Hub the default 2026.9.8 image is about 1.2 GB compressed and the browser variant about 1.7 GB, so budget disk for a few image versions as you update. Slim variants (slim) are also published.
  • Plugins install from npm on your server. Channels and skills that are not bundled are fetched at install time, which is a short spike of CPU, RAM and disk. A box with headroom absorbs it; a 1 GB box with swap makes it slow.
  • Arm64 works. The official images are published for both amd64 and arm64, including the browser variant, and OpenClaw's Oracle guide notes that Node.js, Telegram and WhatsApp are pure JavaScript. The exception is helper binaries that a skill downloads, so check for a linux-arm64 release before you rely on one.

Disk is rarely the constraint. Chat history, workspace files and image versions grow slowly, and every plan in the table below has at least 40 GB. Prefer SSD or NVMe: the OpenClaw Linux server guide recommends SSD-backed disks for state and cache paths to avoid slow cold starts.

Choosing a VPS Provider: Plans Compared (October 2026)

Prices checked October 2026 on each vendor's own pricing page or public pricing feed, in the currency the vendor shows. Hetzner's feed lists prices before VAT and Contabo says its price includes applicable taxes; for the others, check tax at checkout. Headline prices often depend on a long term, so read the last column.

PlanvCPU / RAM / diskPriceTerm and notes
OVHcloud VPS-12 / 4 GB / 40 GB NVMe$4.54/moAnnual upfront billing
Contabo Cloud VPS 44 / 8 GB / 100 GB SSD€4.40/moIntroductory price for the first 24 months (list €5.50)
Hostinger KVM 11 / 4 GB / 50 GB NVMe$6.49/mo2-year term; renews at $11.99
Hostinger KVM 22 / 8 GB / 100 GB NVMe$8.99/mo2-year term; renews at $14.99
Vultr Cloud Compute1 / 2 GB / 55 GB$10/moMonth to month
Hetzner CPX121 / 2 GB / 40 GB NVMe€11.49/moEU locations; before VAT
DigitalOcean Basic1 / 2 GiB / 50 GiB$12/moMonth to month
Akamai (Linode) 2 GB1 / 2 GB / 50 GB$12/moMonth to month
Hetzner CPX222 / 4 GB / 80 GB NVMe€19.49/moEU locations; before VAT
Vultr Cloud Compute2 / 4 GB / 80 GB$20/moMonth to month
DigitalOcean Basic2 / 4 GiB / 80 GiB$24/moMonth to month
Akamai (Linode) 4 GB2 / 4 GB / 80 GB$24/moMonth to month
Oracle Always Free (Ampere A1, arm64)Up to 2 OCPU / 12 GB$0Reclamation and capacity caveats below

Hetzner's cheaper CX and Arm CAX plans showed as unavailable when we checked, so we left them out rather than quote an old number. Vultr's 2 vCPU / 4 GB plan at $20 is slightly cheaper month to month than Hetzner's CPX22, so Hetzner is not the price leader here; it is a good choice for EU data centres. Provider walkthroughs: Hetzner, DigitalOcean, Hostinger, Contabo and OVHcloud.

Our picks

  • Best overall: a month-to-month 2 vCPU / 4 GB plan, which means Vultr ($20), Hetzner CPX22 (€19.49 before VAT), DigitalOcean ($24) or Akamai ($24). You pay more per month than the long-term deals but can resize or delete the server without losing a prepaid term, which matters while you learn how much your agent uses. This is our judgement on price and flexibility, not a benchmark of CPU or network quality.
  • Cheapest comfortable: OVHcloud VPS-1. Four gigabytes and two vCores for $4.54 a month is the lowest price we found for a size that runs the browser image without strain. It is billed annually, so it is a commitment rather than a trial. Contabo Cloud VPS 4 gives 8 GB for an introductory €4.40 and is the better buy if you will also run other services, but that price is for the first 24 months only.
  • Cheapest month to month: Vultr's 1 vCPU / 2 GB plan at $10 is the lowest 2 GB plan we read. It is enough for a chat-only bot without the browser image.
  • Best free option: Oracle Cloud Always Free. Oracle's Always Free allowance is 1,500 OCPU hours and 9,000 GB hours of Ampere A1 a month, equal to 2 OCPUs and 12 GB running continuously, and OpenClaw has its own Oracle guide plus arm64 images. The same Oracle page says idle instances can be reclaimed after 7 days of under 20% CPU, network and memory use, and “out of host capacity” errors on creation are common. A quiet agent looks exactly like an idle instance. Fine for trying OpenClaw, risky for a bot you rely on. See free OpenClaw hosting options and is OpenClaw free.
  • EU versus US: choose the region closest to you. Latency to your model provider dominates how fast the agent feels, so region mostly affects the control UI and webhooks. Hetzner's quoted plans are EU locations; Vultr, DigitalOcean and Akamai have many regions on both sides of the Atlantic.

Running OpenClaw next to n8n

A frequent setup is OpenClaw for conversation and n8n for scheduled workflows on the same server. The sizing is additive: start from the 4 GB we recommend for OpenClaw with the browser image and add n8n's needs on top. The 8 GB plans (Contabo Cloud VPS 4 and Hostinger KVM 2) are the cheapest ways to get that room. Run each in its own container, give n8n its own volume, watch docker stats for a week before resizing, and do not publish either UI directly.

Step 1: Set Up Your VPS

After provisioning your VPS, SSH in and install Docker:

ssh root@your-server-ip

# Update packages
apt update && apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com | sh

# Verify Docker is running
docker --version

Step 2: Install OpenClaw

Pull the OpenClaw Docker image and create the config directory:

# Pull the latest OpenClaw image
docker pull ghcr.io/openclaw/openclaw:latest

# Create the config directory
mkdir -p ~/openclaw/credentials
chmod 777 ~/openclaw
chmod 777 ~/openclaw/credentials

The container runs as user node (uid 1000). The config directory needs chmod 777 because the host user and container user differ. The credentials/ subdirectory is required for DM pairing to work.

Step 3: Configure OpenClaw

Create ~/openclaw/openclaw.json with your settings:

{
  "gateway": {
    "port": 18789,
    "bind": "lan",
    "auth": { "token": "your-random-secret-token" },
    "controlUi": {
      "allowedOrigins": ["http://localhost:18789", "https://your-domain.com"]
    }
  },
  "models": {
    "providers": {
      "openrouter": {
        "apiKey": "sk-or-your-api-key"
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "openrouter/anthropic/claude-sonnet-4.6"
      },
      "systemPrompt": "You are a helpful AI assistant."
    }
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "123456:ABC-your-bot-token",
      "dmPolicy": "pairing"
    },
    "discord": {
      "enabled": true,
      "botToken": "your-discord-bot-token",
      "dmPolicy": "open",
      "allowFrom": ["*"]
    }
  },
  "plugins": {
    "entries": {
      "telegram": { "enabled": true },
      "discord": { "enabled": true }
    }
  }
}
Important: The gateway.auth field must be an object with a token property — not a plain string. Both channels.X.enabled and plugins.entries.X.enabled must be true for a channel to work. Model IDs must be prefixed with the provider name (e.g. openrouter/anthropic/claude-sonnet-4.6).

Step 4: Run the Container

docker run -d \
  --name openclaw \
  --restart unless-stopped \
  --memory=2g --memory-swap=3g \
  -v ~/openclaw:/home/node/.openclaw \
  -p 127.0.0.1:18789:18789 \
  ghcr.io/openclaw/openclaw:latest \
  node openclaw.mjs gateway --allow-unconfigured

Key flags explained:

  • --memory=2g --memory-swap=3g — OpenClaw needs at least 2 GB RAM. Running with 512 MB causes OOM crashes.
  • -v ~/openclaw:/home/node/.openclaw — Bind-mounts your config directory into the container.
  • -p 127.0.0.1:18789:18789 — Publishes the gateway on the host's loopback only, so it is not reachable from the internet. Inside a container the gateway needs "bind": "lan" (set in Step 3); with the default loopback bind, Docker's published port cannot reach it. A bind beyond loopback requires the auth token and gateway.controlUi.allowedOrigins, listing every browser origin you open the Control UI from (the SSH tunnel's http://localhost:18789 and, with the optional Caddy proxy, your HTTPS domain); without it the gateway refuses to start.
  • --restart unless-stopped — Auto-restarts after crashes or server reboots.

Step 5: Set Up a Reverse Proxy (Optional)

To access the OpenClaw gateway over HTTPS with a custom domain, set up Caddy as a reverse proxy. Caddy handles automatic SSL certificate provisioning and renewal.

# Install Caddy
apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt update && apt install caddy

Create a Caddyfile at /etc/caddy/Caddyfile:

your-domain.com {
    reverse_proxy localhost:18789
}

Restart Caddy with systemctl restart caddy. It will automatically obtain and renew an SSL certificate for your domain.

Maintenance Considerations

Self-hosting means you're responsible for everything:

  • Updates: Periodically pull the latest image and restart — docker pull ghcr.io/openclaw/openclaw:latest, then recreate the container.
  • Backups: Back up your ~/openclaw directory regularly. This contains your config, credentials, and session data.
  • Monitoring: Set up uptime monitoring to detect outages. Check docker logs openclaw for errors.
  • Security patches: Keep your VPS OS updated with apt update && apt upgrade. Enable automatic security updates.
  • SSL renewal: If using Caddy, this is automatic. With other reverse proxies, ensure certificates renew before expiry.
  • Keep port 18789 private: The command above publishes it on host loopback only. Reach the control UI with ssh -N -L 18789:127.0.0.1:18789 user@host or with Tailscale. Auth is required by default, and a tunnel does not bypass the token.
  • Firewall everything except SSH: Chat channels connect outward, so a bot needs no inbound ports. If you use the optional Caddy proxy from Step 5, also allow 80 and 443 so it can serve HTTPS and obtain certificates; 18789 itself stays closed. If you use Docker, read OpenClaw's security hardening note on the DOCKER-USER chain, because published container ports can bypass a simple firewall.
  • Treat the token and pairing as secrets: A new browser must be approved with openclaw devices approve, and unknown Telegram senders get a pairing code rather than a reply when DM pairing is required.
  • Restart policy and health: The image has a built-in health check that pings /healthz, and the Docker guide documents /readyz for channel-aware readiness. Without Docker, openclaw onboard --install-daemon installs a systemd user service.
  • Pin a version: The commands above use latest to keep them short; replace it with a version tag if you want predictable upgrades, and keep the mounted state volume intact when you recreate the container.

VPS vs OpenClaw Launch

Not sure if self-hosting is right for you? A VPS gives you root, any region and the lowest long-term monthly price, but also hands you every job around the agent. Here's how it compares:

VPS (Self-Hosted)OpenClaw Launch
Setup time2-6 hours30 seconds; free 30-minute trial, no card
Cost$4.54-$24/mo for the plans above, plus model usage and your timeLite $3 first month, then $6/mo ($60/yr); Pro $20/mo ($200/yr)
MaintenanceManual (updates, backups, monitoring)Fully managed
Visual configNo — edit JSON manuallyYes — point-and-click configurator
SkillsManual installBuilt-in browser & tools
UpdatesManual docker pull + restartAutomatic
AccessFull root, any regionA container, not a server

OpenClaw Launch hosts OpenClaw and Hermes Agent at the same prices. Lite has 1 vCPU, 2 GB RAM, 10 GB storage, 1 instance and $1 a month of AI credits. Pro has 2 vCPU, 4 GB RAM, 40 GB storage, up to 3 instances and $10 a month of AI credits. Lite matches the 2 GB size that is workable for a chat-only bot, and Pro matches the 4 GB we recommend with the browser image. Choose a VPS if you want root access, a specific region or other services on the same machine; choose managed if you would rather spend the afternoon using the agent. More in managed vs self-hosted and cheapest OpenClaw hosting.

Frequently Asked Questions

What are the minimum VPS specs for OpenClaw?

The OpenClaw install and VPS docs publish no minimum RAM figure. Its Raspberry Pi guide lists 1 GB as the minimum and 2 GB or more as recommended, and its DigitalOcean guide runs a 1 GB droplet with swap. On our own fleet the median OpenClaw container used 374 MB and the 90th percentile 1,265 MB, so 2 GB is a workable floor and 4 GB (2 vCPU) is comfortable once you add the browser image or other services. The 6 GB figure in the Docker docs applies only to building the image from source.

What is the best VPS for OpenClaw?

For most people, a 2 vCPU / 4 GB RAM x86 Linux plan with 40 GB or more of SSD or NVMe, billed month to month. OpenClaw calls remote models, so it needs no GPU. In October 2026 that size costs about $20 a month at Vultr and about 19.49 euros before VAT at Hetzner (CPX22). Longer commitments such as OVHcloud VPS-1 at $4.54 a month on annual billing are cheaper if you are sure.

What is the cheapest VPS for OpenClaw?

Among the plans we checked in October 2026 with at least 4 GB of RAM, OVHcloud VPS-1 (2 vCores, 4 GB, 40 GB NVMe) at $4.54 a month on annual billing and Contabo Cloud VPS 4 (4 vCPU, 8 GB) at an introductory 4.40 euros a month for the first 24 months are the lowest. Hostinger KVM 1 is $6.49 a month on a 2-year term and renews at $11.99. Month to month, the cheapest 2 GB plan we read was Vultr at $10.

Can I run OpenClaw on a free VPS?

Yes, for experiments. Oracle Cloud Always Free includes Arm-based Ampere A1 capacity, which works out to 2 OCPUs and 12 GB if you run it all month, and OpenClaw publishes an Oracle Cloud guide and arm64 images. The catches are that Oracle can reclaim instances that stay under 20% utilisation for 7 days, and creating one often fails with an out of host capacity error. Do not run a bot you depend on there. See Free OpenClaw hosting options.

How long does it take to set up OpenClaw on a VPS?

Expect 2-6 hours for initial setup including VPS provisioning, Docker installation, OpenClaw configuration, and optional reverse proxy setup. Ongoing maintenance adds additional time.

Can I run OpenClaw and n8n on the same VPS?

Yes, and the sizing rule is simply to add the two footprints together. Start from 4 GB for OpenClaw with the browser image, then add whatever your n8n workflows need and measure both with docker stats for a week. Contabo Cloud VPS 4 (8 GB) and Hostinger KVM 2 (8 GB) are the cheapest ways to get 8 GB in our table. Keep each service in its own container and expose neither the OpenClaw gateway nor the n8n editor directly to the internet.

Do I need to open port 18789 on my VPS?

No. OpenClaw's gateway defaults to port 18789 bound to loopback, and its docs recommend reaching it through an SSH tunnel or Tailscale. If you bind it beyond loopback it refuses to start without a token or password. Keep the port closed at the firewall and open only SSH, plus 80 and 443 if you put the optional Caddy HTTPS proxy in front of it. See OpenClaw with Tailscale.

Is the best VPS for Hermes Agent the same as for OpenClaw?

Mostly, but not identically. Both want about 2 vCPU and 4 GB of RAM and neither needs a GPU. OpenClaw is a Node.js gateway with a token-protected control UI on port 18789, while Hermes Agent is a Python project with its own dashboard and install path. See Best VPS for Hermes Agent.

Is a VPS cheaper than managed OpenClaw hosting?

On the monthly invoice, often yes. OpenClaw Launch Lite is $3 for the first month, then $6 a month (or $60 a year) with 1 vCPU, 2 GB RAM and 10 GB storage; Pro is $20 a month (or $200 a year) with 2 vCPU, 4 GB RAM and up to 3 instances, and there is a free 30-minute trial with no card. Once you count setup, patching, monitoring and backups, a self-managed VPS only wins on total cost if your time is close to free, or if you need root access or a specific region.

Next Steps

For a more detailed walkthrough of the installation process, including troubleshooting tips and platform-specific instructions, see the complete OpenClaw install guide. Related: OpenClaw with Docker, Docker Compose, best OpenClaw hosting and best VPS for Hermes Agent.

Skip the VPS — Deploy in 30 Seconds

Don't want to manage servers? OpenClaw Launch handles everything for you.

Deploy Now