Platform setup
How to Deploy OpenClaw on Render
Browse more in Platform setup.
All platform setup guides →yaml` Blueprint. You use Render’s Docker runtime and a persistent disk so OpenClaw’s state and workspace survive redeploys.
By the end, you will have a running OpenClaw gateway reachable via Render with a generated gateway token and a backup workflow.
Prerequisites
- ✓A Render account (free tier available)
- ✓An API key from your preferred model provider
Steps
- 1
Create a Render service from the OpenClaw Blueprint
yaml` Blueprint. This Blueprint defines the service type, Docker runtime, plan, and health check path that OpenClaw needs to run correctly on Render.
yamlservices: - type: web name: openclaw runtime: docker plan: starter healthCheckPath: /health - 2
Wire OpenClaw to the correct port and persistent disk
The Blueprint sets the gateway port and points OpenClaw’s state and workspace directories at a mounted disk under `/data`. It also configures `OPENCLAW_GATEWAY_TOKEN` with `generateValue: true` so Render auto-generates a cryptographically secure shared secret for the gateway.
yamlenvVars: - 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 - 3
Choose the right Render plan for your OpenClaw usage
Pick a plan that matches how you intend to run OpenClaw. The Blueprint defaults to `starter`, which keeps the service always on and supports a 1GB+ disk; switching to `free` is fine for testing but you lose persistent disk and OpenClaw state resets on each deploy.
yamlplan: starter - 4
Verify the service URL pattern after deployment
Once Render finishes building the Docker image and deploying the container, it exposes your OpenClaw gateway on a predictable URL. You will use this URL for the Control UI and any external integrations that talk to the gateway.
textOnce deployed, your service URL follows the pattern `https://<service-name>.onrender.com`. - 5
Access the Control UI using the generated gateway token
Open the web dashboard for OpenClaw and authenticate using the shared secret stored in `OPENCLAW_GATEWAY_TOKEN`. The deploy template auto-generates this token; you can find it in Dashboard → your service → Environment and use it whenever you connect to the gateway.
textThe web dashboard is available at `https://<your-service>.onrender.com/`.Connect using the configured shared secret. This deploy template auto-generates `OPENCLAW_GATEWAY_TOKEN` (find it in **Dashboard → your service → Environment**); if you replace it with password auth, use that password instead. - 6
Use Render logs and shell access to monitor OpenClaw
Use the Logs view to inspect build, deploy, and runtime logs so you can diagnose startup issues or misconfigurations. When you need to run maintenance or inspect files, open a Shell session; the persistent disk that holds OpenClaw state and workspace is mounted at `/data`.
textFor debugging, open a shell session via **Dashboard → your service → Shell**. The persistent disk is mounted at `/data`. - 7
Create backups of OpenClaw state from the Render shell
From a Shell session in the Render Dashboard, run the OpenClaw backup command to export state, config, auth profiles, and workspace. This creates a portable backup archive you can download or move to another environment for migration or disaster recovery.
bashopenclaw backup create - 8
Configure a custom domain for your OpenClaw gateway
If you want a friendly hostname instead of the default Render URL, attach a custom domain in the service settings. Render will instruct you to configure a CNAME pointing to the Render hostname and then automatically provisions a TLS certificate.
text3. Configure DNS as instructed (CNAME to `*.onrender.com`)
Configuration
| Option | Description | Example |
|---|---|---|
| OPENCLAW_GATEWAY_PORT | Port that the OpenClaw gateway binds to inside the container so Render can route traffic correctly. | 8080 |
| OPENCLAW_STATE_DIR | Directory on the attached disk where OpenClaw stores its internal state so it survives redeploys. | /data/.openclaw |
| OPENCLAW_WORKSPACE_DIR | Directory on the attached disk where OpenClaw keeps its workspace files. | /data/workspace |
| OPENCLAW_GATEWAY_TOKEN | Shared secret used to authenticate access to the OpenClaw gateway and Control UI; the Blueprint can auto-generate this value. | auto-generated-secure-token-from-render |
Troubleshooting
Service will not start
If the service fails to start, check the deploy logs in the Render Dashboard to see where it stops. Common issues are a missing `OPENCLAW_GATEWAY_TOKEN` (verify it is set in Dashboard → Environment) or a port mismatch; ensure `OPENCLAW_GATEWAY_PORT=8080` so the gateway binds to the port Render expects.
Port mismatch — ensure `OPENCLAW_GATEWAY_PORT=8080` is set so the gateway binds to the port Render expectsSlow cold starts (free tier)
On the free tier, Render spins down your OpenClaw service after 15 minutes of inactivity. The first request after spin-down takes a few seconds while the container starts; upgrade to the Starter plan for always-on behavior.
Data loss after redeploy
If your OpenClaw state disappears after each deploy, you are likely on the free tier where persistent disks are not available. Upgrade to a paid plan with disk support, or regularly export a full backup via `openclaw backup create` from the Render shell so you can restore state.
openclaw backup createHealth check failures
Render expects a 200 response from `/health` within 30 seconds; if builds succeed but deploys fail, OpenClaw may be taking too long to start or crashing. Check the build logs for errors and verify the container runs locally with `docker build && docker run` before redeploying.
Frequently asked questions
Powered by Mem0
Add persistent memory to OpenClaw
Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.