Deploy OpenClaw on Render with Infrastructure-as-Code
Learn how to deploy OpenClaw on Render using the render.yaml Blueprint. This guide covers prerequisites, deployment steps, and plan selection for developers.
Read this when
- Deploying OpenClaw to Render
- You want a declarative cloud deploy with Render Blueprints
Deploy OpenClaw on Render using the render.yaml Blueprint from the repository. This single file defines the service, disk, and environment variables together.
Prerequisites
- You need a Render account (a free tier is available)
- An API key from your chosen model provider
Deploy
This action provisions a Render service from render.yaml, compiles the Docker image, and starts the deployment. Your service URL follows the https://<service-name>.onrender.com pattern.
The Blueprint
services:
- type: web
name: openclaw
runtime: docker
plan: starter
healthCheckPath: /health
envVars:
- key: OPENCLAW_GATEWAY_PORT
value: "8080"
- key: OPENCLAW_STATE_DIR
value: /data/.openclaw
- key: OPENCLAW_WORKSPACE_DIR
value: /data/workspace
- key: OPENCLAW_GATEWAY_TOKEN
generateValue: true # auto-generates a secure token
disk:
name: openclaw-data
mountPath: /data
sizeGB: 1
| Feature | Purpose |
|---|---|
runtime: docker | Uses the repo's Dockerfile for builds |
healthCheckPath | Render watches /health and restarts unhealthy containers |
generateValue: true | Creates a cryptographically secure value automatically |
disk | Persistent storage that remains across redeploys |
Choosing a plan
| Plan | Spin-down | Disk | Best for |
|---|---|---|---|
| Free | After 15 min idle | Not available | Testing, demos |
| Starter | Never | 1GB+ | Personal use, small teams |
| Standard+ | Never | 1GB+ | Production, multiple channels |
The Blueprint defaults to starter. To switch to the free tier, edit plan: free in your fork's render.yaml, keep in mind that without a persistent disk, OpenClaw's state resets every time it deploys.
After deployment
Access the Control UI
The web dashboard is reachable at https://<your-service>.onrender.com/. Authenticate with the shared secret: the auto-generated OPENCLAW_GATEWAY_TOKEN (located in Dashboard → your service → Environment), or your password if you enabled password authentication.
Logs
Dashboard → your service → Logs displays build logs (Docker image creation), deploy logs (service startup), and runtime logs (application output).
Shell access
Dashboard → your service → Shell starts a shell session. The persistent disk is mounted at /data.
Environment variables
Modify variables in Dashboard → your service → Environment. Any changes trigger an automatic redeploy.
Auto-deploy
Render automatically redeploys when the connected repository branch receives a new commit. If you deployed directly from openclaw/openclaw rather than your own fork, you lack push access to trigger that. To update, either run a manual Blueprint sync from the Dashboard or point the service at your own fork.
Custom domain
- Dashboard → your service → Settings → Custom Domains
- Add your domain
- Set up DNS as instructed (CNAME to
*.onrender.com) - Render automatically provisions a TLS certificate
Scaling
- Vertical scaling: upgrade the plan for more CPU/RAM. This usually suffices for OpenClaw.
- Horizontal scaling: increase the instance count (Standard plan and above). This requires sticky sessions or external state management because OpenClaw stores runtime state on the local disk.
Backups and migration
From the Render Dashboard shell, export state, config, auth profiles, and workspace at any time:
openclaw backup create
This produces a portable backup archive. Refer to Backup.
Troubleshooting
Service will not start
Check the deploy logs in the Render Dashboard. Frequent problems include:
- Missing
OPENCLAW_GATEWAY_TOKEN, confirm it is set in Dashboard → Environment - Port mismatch, make sure
OPENCLAW_GATEWAY_PORT=8080so the gateway binds to the port Render expects
Slow cold starts (free tier)
Free tier services spin down after 15 minutes of inactivity; the first request after spin-down takes a few seconds while the container starts. Upgrade to Starter for always-on operation.
Data loss after redeploy
This occurs on the free tier (no persistent disk). Upgrade to a paid plan, or regularly export a backup using openclaw backup create from the Render shell.
Health check failures
If builds succeed but deploys fail, the service might be taking too long to start or /health may not be accessible. Check:
- Build logs for errors
- Whether the container runs locally with
docker build && docker run
Next steps
- Set up messaging channels: Channels
- Configure the Gateway: Gateway configuration
- Keep OpenClaw up to date: Updating