Skip to content
Home› Blog› How to Host OpenClaw 24/7: VPS, Docker, Mac mini or Managed

How to Host OpenClaw 24/7: VPS, Docker, Mac mini or Managed

Keep your OpenClaw assistant online after you close the laptop. We compare a home Mac mini, a VPS, Docker and managed hosting on uptime, cost and security, then set up a VPS with real commands, backups and updates.

HostAiHub Team ·Nov 14, 2026 ·14 min read
How to Host OpenClaw 24/7: VPS, Docker, Mac mini or Managed

The short answer to how to host OpenClaw around the clock: run its Gateway on a machine that never sleeps. That can be a small Linux VPS (1 GB of RAM is the floor, 2 GB is comfortable, roughly $5 to $12 a month), a Mac mini or spare computer at home, or a managed host. Install it with the official installer, run openclaw onboard --install-daemon so systemd or launchd restarts it after crashes and reboots, and keep port 18789 private behind an SSH tunnel or Tailscale.

If your WhatsApp or Telegram assistant went quiet the moment you closed your laptop, this is the fix. Below we compare the OpenClaw hosting options side by side, then set up a VPS with real commands. Everything was checked against the OpenClaw docs and the current stable release, v2026.11.3 (10 November 2026).

Short version
  • Only one thing has to stay up: the Gateway, a single Node process on port 18789 that keeps your channel logins and keys in ~/.openclaw.
  • The docs list 1 vCPU and 1 GB of RAM as the minimum and recommend 2 GB or more. A 2 GB VPS is $12 a month at DigitalOcean or Akamai.
  • A Mac mini only earns its place if you want macOS-only features such as iMessage or Apple Notes. The base M6 model is $899.
  • On a VPS: create a non-root user, enable linger, install, run openclaw onboard --install-daemon, and reach the dashboard through an SSH tunnel. Never open 18789 to the internet.
  • Back up ~/.openclaw before every update. It holds your WhatsApp login and API keys.
  • Managed hosting (HostAiHub: $10 a month, $100 a year or $250 lifetime, with your own model key) takes the server work off your hands.

What has to stay online for OpenClaw to answer?

OpenClaw is one long-running process the docs call the Gateway. It owns every channel connection and session, plus the Control UI, on a single port: 18789 by default. When you message your assistant on WhatsApp, the Gateway receives it, calls your model provider with your API key, runs whatever tools the agent picks, and sends the reply back.

How OpenClaw is put together What runs where WhatsApp linked device (QR) Telegram bot, long polling Discord, Slack… 20+ more channels OpenClaw Gateway port 18789 loopback by default state: ~/.openclaw sessions, cron, UI Model API Anthropic, OpenAI your API key Tools shell, browser, files, skills token required You: Control UI or CLI over SSH tunnel or Tailscale No inbound port: channels dial out Tools run on the host unless you sandbox them
Everything hangs off one Gateway process. If it stops, every channel goes quiet at once, and the only thing that needs a route in is your own admin access.

Two consequences. Chat channels connect outward: WhatsApp runs as a linked device over WhatsApp Web, and Telegram uses long polling by default, so you don't need a domain or an open port. And when the process stops, the assistant stops. A closed lid and a crashed service look the same from your phone: silence.

State lives in one folder. ~/.openclaw/ holds openclaw.json, channel credentials (WhatsApp's are under credentials/whatsapp/<accountId>/) and the SQLite databases with your model auth and sessions. ~/.openclaw/workspace/ holds SOUL.md, memory and artifacts. Treat that folder as the server. The software itself reinstalls in minutes.

System requirements

  • Node: 24.16.0+ on the 24.x line, or 26.1.0+ (the install docs strongly recommend 24.22.1+ or 26.12.1+ for security). The installer provisions Node 24 LTS on Linux if it's missing.
  • OS: macOS, Linux, or Windows through the Windows Hub app or WSL2. Ubuntu LTS is the best-tested Linux path.
  • Hardware: the hosting FAQ gives an absolute minimum of 1 vCPU, 1 GB RAM and about 500 MB of disk, and recommends 2 GB+ for headroom, especially with browser automation. That assumes hosted models; local inference doesn't fit on a box this size.

OpenClaw hosting options compared

Here's how the five realistic setups compare. "Monthly cost" is hosting only; model tokens come on top for every row.

OptionUptimeMonthly costSetup timeMaintenanceSecurity exposure
LaptopOnly while it's awake and online$0 extraMinutes: installer plus onboardingLow, but the bot sleeps with the lidAgent tools run on your personal machine, next to your files and accounts
Home machine or Mac mini24/7 if power, Wi-Fi and sleep settings cooperatePower (a Mac mini idles at 4 W, about 3 kWh a month) plus the hardware: $899 for an M6Same install, plus power and login settingsOS updates, home outages, launchd quirksHome network; keep it off your personal Apple and Google accounts
VPS + installer (npm)24/7, systemd restarts it$5–12About 20 minutes per the provider guidesOS patches, openclaw update, backupsPublic IP, but only SSH open; Gateway on loopback by default
VPS + Docker24/7, restart: unless-stopped$5–12 with the pre-built imageAbout 20 minutes plus installing DockerImage pulls, Docker networking quirksContainer binds to all interfaces and publishes 18789: a cloud firewall is mandatory
Managed (HostAiHub)24/7 in a hosted container$10/mo, $100/yr or $250 lifetime, plus your own Anthropic or OpenAI keyDeployed automatically, then you connect channelsUpstream updates automatic; you manage channels and your keyPrivate instance on an SSL subdomain; you set the Control UI login on first visit

On tokens: a light personal assistant is about $4 a month on a cheap model and closer to $70 on a premium one, and OpenClaw's default 30-minute heartbeat bills you even when nobody's typing. The numbers are in what an AI agent costs per month.

Monthly cost of keeping OpenClaw online VPS HostAiHub, managed Home hardware $0$5$10$15$20$25 $ per month, hosting only. Model tokens are extra. Oracle Cloud Always Free (ARM) Akamai Nanode 1 GB DigitalOcean Basic 1 GB HostAiHub lifetime, $250 over 3 years HostAiHub yearly, $100 HostAiHub monthly DigitalOcean Basic 2 GB Mac mini M6, $899 over 3 years $0 when capacity is available $5 $6 $6.94 $8.33 $10 $12 $25 + power
Hosting alone is the cheap part: everything except the Mac mini lands between $0 and $12 a month. Prices from provider pages in November 2026; Akamai's 2 GB plan is also $12.

Which one should you pick?

It mostly comes down to two questions: do you need anything macOS-only, and do you want to look after a Linux server?

Picking a host for OpenClaw Need iMessage or Apple apps? Yes A Mac mini or a VPS plus a Mac node No Only testing for a few days? Yes Your laptop fine until the lid closes No Rather not run a server? Yes Managed hosting no server to maintain No Already comfortable with Docker? Yes VPS + Docker add a cloud firewall No VPS + installer (npm) systemd service, Gateway on loopback
Answer from the top and stop at the first "yes". If you reach the bottom, the plain installer on a VPS is the simplest thing that stays up.

Docker isn't automatically the "more serious" choice. The docs call it optional, meant for isolated or throwaway environments. On a single-purpose VPS the native install has fewer moving parts and keeps the Gateway on loopback by default.

Do you need a Mac mini to run OpenClaw?

No. The OpenClaw FAQ answers this directly: a Mac mini is a popular always-on host, but a small VPS, home server or Raspberry Pi-class box works too. You need a Mac only for macOS-only tools:

  • iMessage. OpenClaw talks to Messages through imsg on a Mac signed in to your Apple ID. BlueBubbles support was removed.
  • Apple apps. Several bundled skills are macOS-only: Apple Notes and Reminders, the Things 3 and Bear apps, and Peekaboo for UI automation.
  • A residential IP. The docs point out that many sites block data-center IPs, so browser automation from a box at home often works better than from a VPS.

If none of those apply, a Linux VPS is cheaper and doesn't depend on your home power and Wi-Fi. There's a middle path too: run the Gateway on a VPS and pair your Mac as a node, which lends the agent that Mac's screen and local commands, or point channels.imessage.cliPath at an SSH wrapper that runs imsg on the Mac.

The hardware isn't the bargain it was. Apple's base Mac mini is now the M6 at $899 (16 GB, 256 GB), against $599 for the M4 at its 2024 launch. It idles at 4 W, so power is pennies; the purchase price is the real cost, about $25 a month over three years.

Running a Mac mini as a server

Two macOS behaviours catch people out. The first is sleep. OpenClaw's troubleshooting guide describes a Gateway that goes quiet for minutes or hours and "comes back" when you open the dashboard: Maintenance Sleep briefly drops the network, the process crashes, and launchd stops respawning it after a crash burst until something re-arms it. Run 2026.5.26 or newer (it treats those network errors as benign) and switch off the sleep modes:

sudo pmset -a sleep 0 disksleep 0 standby 0 powernap 0
sudo pmset -a autorestart 1     # boot again after a power cut

The second is login. The Gateway installs as a per-user LaunchAgent, which macOS starts only after that user logs in. After a power cut, a Mac waiting at the login screen (FileVault always stops there) has no assistant until someone types a password.

How to host OpenClaw on a VPS, step by step

This is the cheapest way to run OpenClaw 24/7 without hardware at home. It follows the official DigitalOcean guide and Gateway runbook, and works on any provider's Ubuntu 24.04 LTS image. Get 2 GB of RAM if you can. Prices checked in November 2026: DigitalOcean Basic is $6 for 1 GB and $12 for 2 GB; Akamai's Nanode 1 GB is $5 and its 2 GB plan $12. Hetzner changed its cloud prices more than once in 2026, so check its console first. Oracle's Always Free ARM tier costs nothing, but free capacity is limited and instance creation often fails with "Out of capacity".

1. Create the server and a non-root user

Use a clean Ubuntu image with your SSH key, not a marketplace one-click image. Then, as root:

apt update && apt upgrade -y
adduser openclaw
usermod -aG sudo openclaw
loginctl enable-linger openclaw      # user services keep running with nobody logged in
rsync --archive --chown=openclaw:openclaw ~/.ssh /home/openclaw
ufw allow OpenSSH
ufw enable

In your provider's cloud firewall, allow TCP 22 and nothing else. On a 1 GB server, add the 2 GB swap file from the DigitalOcean guide:

fallocate -l 2G /swapfile && chmod 600 /swapfile
mkswap /swapfile && swapon /swapfile
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab

2. Install Node and OpenClaw

Still as root, install Node 24 LTS from NodeSource, the same source the OpenClaw installer uses on Linux:

curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
apt install -y nodejs
node -v      # must be 24.16.0 or newer

Now log out and SSH back in as the new user, directly (ssh openclaw@SERVER_IP), not through su. Then install OpenClaw itself:

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
openclaw --version

Run it as the service user, not root: the system npm prefix isn't writable for that user, so the installer sets up a user-local one, and openclaw update can replace the package later without root. If openclaw isn't found afterwards, it's a PATH issue: open a new SSH session and try again.

3. Onboard and install the service

openclaw onboard --install-daemon

The wizard checks your model key, creates the workspace, generates a Gateway token and installs a systemd user unit called openclaw-gateway.service. The managed unit restarts the Gateway whenever it exits (Restart=always, five seconds apart), and linger from step 1 keeps it running after you log out and starts it at boot. Check it:

openclaw gateway status
systemctl --user status openclaw-gateway.service
journalctl --user -u openclaw-gateway.service -f

If systemctl --user complains that it can't connect to the bus, you probably switched users with su. Log in over SSH as openclaw, or run export XDG_RUNTIME_DIR=/run/user/$(id -u) first, as the runbook suggests for headless servers. Then prove it survives a reboot: sudo reboot, reconnect, and run openclaw gateway status again.

4. Keep the Gateway private

On a normal install the Gateway binds to loopback, and onboarding sets token auth even there. Confirm that nothing outside the box can reach it:

ss -ltnp | grep 18789     # expect 127.0.0.1:18789, not 0.0.0.0
openclaw security audit

To open the Control UI, tunnel the port from your own computer and leave the command running:

ssh -N -L 18789:127.0.0.1:18789 openclaw@SERVER_IP

On the server, openclaw dashboard --no-open prints a short-lived, one-time owner link; open it in your local browser while the tunnel is up. The runbook prefers Tailscale over SSH tunnels for regular use. With Tailscale installed and logged in, openclaw config set gateway.tailscale.mode serve followed by openclaw gateway restart puts the dashboard on your tailnet over HTTPS while the Gateway stays on loopback.

What the internet can reach on your VPS What the internet can reach Your laptop SSH tunnel opens localhost:18789 Port scanner probing :18789 blocked at the firewall Firewall TCP 22 only VPS, Ubuntu 24.04 sshd port 22, public Outbound chat + model APIs OpenClaw Gateway listens on 127.0.0.1:18789 token auth on ~/.openclaw: config, keys, sessions
Only SSH faces the internet. You reach the dashboard through the tunnel, the Gateway's own traffic goes out, and nothing needs a public route to port 18789.

Never expose 18789 directly. The Gateway port carries the Control UI and the HTTP API, and the security docs describe its bearer credentials as full operator access. If you bind to lan or tailnet, the Gateway refuses to start without a token or password, but a firewall and Tailscale are still the documented way to do it. Read the exposure runbook first.

5. Connect WhatsApp or Telegram

Telegram needs only a bot token: openclaw channels add --channel telegram --token "<token>". WhatsApp links as a device with a QR code (openclaw channels login --channel whatsapp), and the docs warn that on a headless host you need a reliable way to get the live QR to your phone: screenshots and relayed images can expire in transit. Our OpenClaw WhatsApp setup guide covers that part. Unknown senders get a pairing code by default; approve the ones you want with openclaw pairing approve <channel> <code>, then check everything with openclaw channels status --probe.

6. Back up ~/.openclaw

openclaw backup create --output ~/Backups/openclaw --verify

That writes a timestamped .tar.gz of the whole state folder, workspaces included, and verifies it. Copy it off the server; a backup on the same disk dies with the VPS. For a schedule, openclaw backup enable --to offsite --every 24h --keep-daily 7 has the Gateway upload a verified archive daily to a storage location you've configured (see the backup docs). Treat every archive as a credential: the docs note that OAuth tokens sit in plaintext SQLite inside that folder.

7. Update without surprises

OpenClaw ships fast. Between 10 October and 10 November 2026 it published 13 stable releases, from 2026.10.1 to 2026.11.3. The routine:

openclaw backup create --output ~/Backups/openclaw --verify
openclaw update --dry-run     # see what it plans to do
openclaw update               # stages, migrates, restarts and verifies
openclaw health

Automatic updates are off by default. Turn them on with update.auto.enabled: true in openclaw.json, or under Settings, Updates in the Control UI, which also lets you pick a daily or weekly schedule. If thirteen releases a month is too lively, openclaw update --channel extended-stable follows a slower line that still gets security fixes and is never applied automatically.

Running OpenClaw with Docker on a VPS

The official Docker route uses the repo's Compose file and a setup script. Use the pre-built image: a source build needs at least 6 GB of RAM.

curl -fsSL https://get.docker.com | sh
git clone https://github.com/openclaw/openclaw.git
cd openclaw
export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest"
./scripts/docker/setup.sh

The script runs onboarding, writes a Gateway token to .env and starts the stack. The Compose file already sets restart: unless-stopped and a health check every 30 seconds, and it bind-mounts ~/.openclaw, the workspace and ~/.openclaw-auth-profile-secrets from the host. Those three directories are what you back up; the container itself is disposable.

Now the trap. Inside a container the Gateway binds to lan (all interfaces), and Compose publishes port 18789 on the host. Docker's published ports go through its own forwarding chains, so UFW's normal rules don't stop them. The network exposure docs give DOCKER-USER rules for UFW; the simpler fix is a provider cloud firewall that admits only port 22. Check from your laptop that nc -zv SERVER_IP 18789 fails, then use the same SSH tunnel as above.

Channel and dashboard commands run through the CLI container, for example docker compose run --rm openclaw-cli channels login for the WhatsApp QR and docker compose run --rm openclaw-cli dashboard --no-open. To update:

docker compose pull openclaw-gateway openclaw-cli
docker compose stop openclaw-gateway
docker compose up -d openclaw-gateway

The image's entrypoint runs openclaw doctor --fix against your mounted state before the Gateway starts, so migrations happen on their own. Pin a release tag such as ghcr.io/openclaw/openclaw:2026.11.3 instead of latest if you want updates only when you choose them.

Keeping OpenClaw online when machines sleep and sessions drop

Sleep

A sleeping machine has no Gateway. That rules out laptops for anything people rely on, and it's why the Mac mini needs the pmset changes above. A VPS doesn't sleep, which is most of its appeal.

Crashes and reboots

systemd and launchd restart unexpected exits. One exception matters: an invalid config makes the Gateway exit with code 78, and the Linux unit is set never to relaunch on that code. If the service stays down right after you hand-edited openclaw.json, look for exit 78 in journalctl --user -u openclaw-gateway.service, run openclaw doctor, fix the file and restart. For external monitoring, curl -fsS http://127.0.0.1:18789/healthz confirms the process is listening, and /readyz also reports hard channel failures as not ready.

WhatsApp sessions that drop

The Gateway runs a watchdog on the WhatsApp socket, so brief network blips heal on their own. The drop it can't fix comes from WhatsApp: according to WhatsApp's help centre, linked devices log out if you haven't used your primary phone in 14 days. Open WhatsApp on the phone now and then. For a reconnect loop, the docs' order is openclaw channels status --probe, openclaw doctor, openclaw logs --follow, and only then a re-link: back up ~/.openclaw/credentials/whatsapp/<accountId>, run openclaw channels logout --channel whatsapp, then log in again. The migration guide adds that restoring an old backup can desynchronize WhatsApp's ratcheting credentials, so expect to re-link after a restore.

Telegram: one token, one Gateway

A bot token can only be polled by one process. Leave your laptop's Gateway running after the server goes live and Telegram rejects one of the two pollers with a 409 "Conflict: terminated by other getUpdates request" error, and replies go missing. (A "Polling stall detected" log line is different: that's OpenClaw restarting a stuck poll after 120 seconds, on its own.)

Moving from your laptop to the server

You don't have to redo setup. The migration guide says to stop the old Gateway before taking the archive, so the SQLite files aren't changing mid-copy:

# on the laptop
openclaw gateway stop
openclaw backup create --output ~/Backups/openclaw --verify

# on the server, after installing OpenClaw
openclaw backup restore <archive.tar.gz> --target ~/openclaw-restored

Restore stages files and never activates in place. With the server's Gateway stopped, move the state into ~/.openclaw using the restored manifest.json mapping, then run openclaw doctor and openclaw gateway restart. Keep the laptop's Gateway stopped for good, or uninstall its service, so the two never poll the same bot.

Lock it down before other people use it

The README is blunt: tools run on the host for the main session unless you configure sandboxing. On a VPS that means the agent runs shell commands as the openclaw user, one more reason not to use root. Sandboxing is off by default; setting agents.defaults.sandbox.mode to non-main puts group and other non-main sessions in a Docker sandbox (Docker must be installed). Keep DM pairing on, require mentions in groups, and keep personal Google or Apple accounts off the server. Our security checklist for self-hosted agents goes through the rest, and OpenClaw vs Hermes compares how the two handle tools if you're still choosing.

Or let us host it

If the server work is the part you don't want, HostAiHub runs OpenClaw for you: a private instance on a free SSL subdomain (you.hostaihub.com), deployed automatically, with dashboard buttons to start, stop or restart it, automatic upstream updates and persistent storage. You bring your own Anthropic or OpenAI key at checkout. It's encrypted, injected only into your instance, and you can change it later in the dashboard. The first time you open the Control UI, it asks you to set up your own login. Plans are $10 a month, $100 a year or $250 lifetime; see pricing.

Self-hosting is the better call in some cases. If you need iMessage or the Apple app skills, you need a Mac whoever hosts the Gateway. If you want browser automation from a residential IP, a box at home wins. And if you already have an always-on machine and enjoy the upkeep, a $5 to $6 VPS or your own hardware costs less.

Frequently asked questions

What are the minimum requirements to host OpenClaw?

OpenClaw needs Node 24.16.0+ on the 24.x line or Node 26.1.0+, on macOS, Linux or Windows (Windows Hub or WSL2). The docs list 1 vCPU, 1 GB of RAM and about 500 MB of disk as the absolute minimum and recommend 2 GB or more. Ubuntu LTS is the best-tested Linux.

Can I run OpenClaw on a $5 or $6 VPS with 1 GB of RAM?

Yes, as long as you use hosted models through an API. The official DigitalOcean guide uses the $6 1 GB Droplet with a 2 GB swap file. Browser automation and heavier use are more comfortable on 2 GB, about $12 a month.

Do I need a Mac mini for OpenClaw?

Only for macOS-only features: iMessage, which runs through imsg on a Mac signed in to Messages, and skills such as Apple Notes and Things. Everything else, WhatsApp and Telegram included, works from a Linux VPS. You can also keep the Gateway on a VPS and pair a Mac as a node.

Should I open port 18789 to reach the OpenClaw dashboard?

No. Keep the Gateway on loopback and reach it with an SSH tunnel (ssh -N -L 18789:127.0.0.1:18789 user@server) or Tailscale Serve. The Gateway port carries the Control UI and an HTTP API with full operator access, so only SSH should face the internet.

Why does my OpenClaw WhatsApp connection keep dropping?

Short network drops reconnect on their own. Longer outages usually mean the Gateway stopped, or WhatsApp logged out the linked device because the primary phone wasn't used for 14 days. Check openclaw channels status --probe and the logs, and re-link with openclaw channels login --channel whatsapp if needed.

How do I update OpenClaw on a server?

Back up first with openclaw backup create --verify, then run openclaw update, which installs the new version, runs migrations and restarts the Gateway. In Docker, pull the new image and recreate the gateway container; the entrypoint runs doctor before starting. Automatic updates exist but are off by default.

Is Docker or the npm installer better on a VPS?

For a single-purpose VPS, the installer is simpler: systemd restarts it and the Gateway stays on loopback without extra work. Docker suits you if you already run containers, but its published port bypasses UFW's normal rules, so you need a cloud firewall that only admits SSH.

Deploy your own AI agent — no servers to manage

We auto-install OpenClaw, Hermes and n8n to your own private, SSL-secured subdomain. Bring your own LLM key.