← Blog

Guide

Host OpenClaw and Hermes Agents on a Persistent Cloud VM

OpenClaw and Hermes are agents that are meant to be always on, which is why running them on a laptop fails the first time it sleeps. On machine0, machine0 use openclaw creates a VM and connects you in one command, and Hermes takes three. Each VM has a public static IP and authenticated HTTPS for webhooks, profiles inject your secrets, machine0 sync pull backs up the agent's state, and suspend pauses billing. OpenClaw on a medium VM around the clock costs about $25 per month.

## Why not your laptop

OpenClaw and Hermes are personal agents: they watch channels, answer messages, run scheduled tasks and call tools on your behalf. They only work if they are running. A laptop sleeps, moves between networks, and has no public address for a webhook to reach. A persistent VM solves all three: it is always on, it has a static IP and HTTPS, and it is isolated from your personal machine, so the agent's tokens and tool access live somewhere you can snapshot, suspend and rebuild.

machine0 ships ready-made images for both agents on Ubuntu and NixOS, so setup is a command or three.

## OpenClaw in one command

Install the CLI if you have not already:

$ curl -LsSf https://machine0.io/install.sh | sh

Then:

$ machine0 use openclaw

That creates a VM from the OpenClaw image and connects you to it. Follow the onboarding prompts and the agent is running.

If you want control over the size, image or profile, do it by hand:

$ machine0 new openclaw --image ubuntu-24-04-openclaw --size medium
$ machine0 ssh openclaw
$ openclaw onboard --install-daemon

Swap ubuntu-24-04-openclaw for nixos-25-11-openclaw if you prefer NixOS. --install-daemon keeps OpenClaw running as a service, so it survives you logging out.

## The images

AgentUbuntuNixOS
OpenClawubuntu-24-04-openclawnixos-25-11-openclaw
Hermesubuntu-24-04-hermesnixos-25-11-hermes

Both families are built on the same base as ubuntu-24-04-loaded and nixos-25-11-loaded, so Docker, Node.js, Python, tmux and the rest are there too. The NixOS images make the whole machine a versioned config, which is useful once the agent's setup has a few moving parts.

## Hermes setup

Three commands:

$ machine0 new hermes --image ubuntu-24-04-hermes --size medium
$ machine0 ssh hermes
$ hermes setup

Use nixos-25-11-hermes for the NixOS variant. hermes setup walks through the agent's configuration.

## Secrets through profiles

Both agents need API keys and tokens. Rather than pasting them into the VM, put them on a profile and let machine0 inject them when the VM is created:

$ machine0 env set OPENCLAW_API_KEY=... --secret --profile agents
$ machine0 env set TELEGRAM_BOT_TOKEN=... --secret --profile agents
$ machine0 new openclaw --image ubuntu-24-04-openclaw --size medium --profile agents

Profiles can also carry a GitHub integration scoped to specific repos, Claude Code or Codex authentication, and any remote MCP server the agent should be able to call. Everything on the profile arrives on the VM at creation, and rotating a secret means updating the profile and recreating the VM, not hunting through config files.

## Static IP and HTTPS for webhooks

Every VM gets a public static IPv4 and an authenticated HTTPS endpoint:

https://<vm>.mac0.io

The endpoint proxies to port 80 on the VM, so an agent that listens on port 80 is reachable over HTTPS with no certificate work. The firewall (ufw) is on by default with ports 22, 80 and 443 open.

If the agent listens on another port, open it:

$ machine0 ssh openclaw "sudo ufw allow 8080/tcp"

Then point the webhook at http://<ip>:8080 directly, or run a small reverse proxy on port 80 to keep HTTPS. Find the IP with machine0 get openclaw. One caveat: a suspended VM gets a new IP when it resumes, so if a service registered the raw IP, re-register it after a resume. The <vm>.mac0.io hostname does not change.

## Backups with sync pull

The agent's state lives on the VM's disk. Pull it to your machine before big changes, or on a schedule:

$ machine0 sync pull openclaw:~/.openclaw/ ~/Backups/openclaw
$ machine0 sync pull hermes:~/ ~/Backups/hermes

machine0 sync works in both directions (sync push sends files up) and supports --watch to keep a directory in sync continuously. For a point-in-time copy of the whole machine, make an image instead:

$ machine0 images new openclaw openclaw-backup

Images are versioned and can be cloned into a new VM with machine0 new clone --image openclaw-backup. Remember that a snapshot captures everything on disk, secrets included.

## Suspend when you are not using it

A VM bills per minute while it runs, and while it is stopped. Suspend is the state that costs almost nothing:

$ machine0 sync pull openclaw:~/.openclaw/ ~/Backups/openclaw
$ machine0 suspend openclaw

Suspend snapshots the disk, deletes the instance, and bills image storage at $0.078/GB/month. machine0 start openclaw brings the VM back with its disk intact. Running processes do not survive a suspend, so OpenClaw's daemon restarts on boot and Hermes needs starting again if it was not installed as a service.

## What it costs

SetupSizeRunningCost
OpenClaw, always onmedium (2 vCPU, 2 GB, 60 GB)730 h x $0.034About $25/month
Hermes, always onmedium730 h x $0.034About $25/month
Either, suspended for a month60 GB snapshotstorage onlyAbout $4.68/month
Smallest optionsmall (1 vCPU, 1 GB, 25 GB)730 h x $0.013About $9/month

Bandwidth is $0.01/GiB beyond a free allowance of 1 to 10 TB depending on size. Top up the wallet with at least $5; unused credits are refundable.

## Reaching the agent

Check on either agent from anywhere:

  • machine0 ssh openclaw from any terminal with the CLI.

  • The browser terminal in the dashboard, using a managed SSH key.

  • The iPhone and iPad app, with a startup command so it opens straight into the agent's logs:

    $ machine0 update openclaw --ssh-client-initial-command "tmux attach || tmux new"

## FAQ

What is the fastest way to run OpenClaw in the cloud?

Install the machine0 CLI and run machine0 use openclaw. It creates a VM from the OpenClaw image and connects you in one command.

How much does hosting OpenClaw cost?

On a medium VM (2 vCPU, 2 GB RAM, 60 GB disk) at $0.034/hr, about $25 per month if it runs all month. Suspend it when idle to pay only image storage.

Can OpenClaw receive webhooks on the VM?

Yes. Every VM has a public static IP and authenticated HTTPS at https://<vm>.mac0.io, which proxies to port 80. For other ports, open them with ufw.

How do I back up the agent's state?

With machine0 sync pull. For OpenClaw, pull ~/.openclaw/ to your machine. For Hermes, pull the home directory. Then suspend the VM.

Where do API keys and tokens go?

On a profile, as secret environment variables set with machine0 env set --secret. Create the VM with --profile and they are injected at creation instead of pasted into the machine.

Does the VM keep its IP after a suspend?

No. A suspended VM gets a new IP when resumed, so update any webhook registered against the old address, or use the https://<vm>.mac0.io hostname, which follows the VM.

## Sources

## Related