devsan
All work

Case study

OpenClaw Cloud

One-click self-hosted deploy for the OpenClaw AI gateway — built solo in an afternoon.

shippedSolo buildAI AgentsDevOpsFull Stack2026
OpenClaw Cloud project cover: One-click self-hosted deploy for the OpenClaw AI gateway — built solo in an afternoon.

Summary

A small VPS-style deployment layer that wraps the OpenClaw AI gateway in a single install command. Rails + Docker + a custom systemd workaround + Cloudflare/Nginx, live at openclaw.devsan.in.

Problem

OpenClaw is a strong open-source AI gateway, but most users don't want to provision servers, wire DNS, set up reverse proxies, and write systemd units just to run it. The gap between 'looks great on GitHub' and 'reliably running for me' is real.

Approach

I started by deploying it the bad way — bare docker run inside an EC2 instance — to feel what would break first. Then I wrote a small Rails-backed control surface that owns the install: pulls the image, persists data to a host volume, installs a systemd unit that restarts cleanly, and stands up Nginx with a Cloudflare-issued cert. The whole thing is sized to live on a single small VPS without a team behind it. The interesting unlock was a small systemd ordering hack: docker engine isn't always ready when the unit starts on boot, so the unit retries with backoff until the daemon answers. Once it does, OpenClaw comes up clean. The Rails layer mostly orchestrates and surfaces logs.

Architecture

HTTPStunnelcontrol UIspawn + managepersistUserbrowserCloudflareTLS + DNSNginxreverse proxyRails controlinstall + opsDocker + OpenClawgatewayVolumepersistent
UserExternalServiceStore
Cloudflare and Nginx do the talking; Rails owns the lifecycle; Docker runs the gateway.

Result

openclaw.devsan.in is live and serving the OpenClaw UI as a self-hosted instance. Shipped in an afternoon, indexed, and ready for the first real users. The deeper lesson lives on the wiki — 'service development is defined by how deeply you understand the system when logs say it can't be done.'

Highlights

  • Idea to deployed-and-publicly-resolvable in roughly an afternoon
  • Self-hosted, persistent storage, custom systemd unit for non-root Docker rerun
  • Cloudflare tunnel + Nginx in front for resilience and TLS

Have something similar?

Let's talk.

Get in touch