- Coolify is an open-source PaaS that manages Docker deployments, SSL, reverse proxying, and env vars through a web UI — no CLI required after initial install
- OpenClaw deploys from a Docker image in the Coolify UI in under 10 minutes with automatic Let's Encrypt HTTPS
- Environment variables including your gateway token are managed in the Coolify UI with secret masking — never in plaintext config files
- Coolify's webhook trigger redeploys OpenClaw automatically when a new Docker image is pushed
- A $12/month VPS with 2 vCPUs and 4GB RAM runs both Coolify and a functional OpenClaw deployment
The hardest part of self-hosting OpenClaw isn't the agent configuration — it's all the surrounding infrastructure. Nginx virtual hosts, SSL certificates, Docker networking, volume mounts, environment variable management. Every one of those is a place where things go wrong quietly. Coolify collapses all of it into a web UI, and as of early 2025 it handles OpenClaw's deployment requirements without any custom workarounds.
What Coolify Actually Does for Your OpenClaw Setup
Coolify is an open-source alternative to platforms like Render, Railway, and Heroku — except you run it on your own server. It manages Docker containers through a web interface and handles the operational overhead that usually falls on you.
For OpenClaw specifically, Coolify takes care of:
- SSL certificates — provisions Let's Encrypt certs automatically and renews them before expiry
- Reverse proxy — routes your domain to OpenClaw's port with zero Nginx configuration
- Environment variables — stores and injects secrets at runtime, with masking in logs
- Container lifecycle — restart policies, health checks, and automatic recovery
- Deployment triggers — webhook-based auto-deploy when you push a new image
That's the infrastructure stack for a production OpenClaw deployment, managed without writing a single config file. The trade-off is adding Coolify as a dependency — it runs on the same server and uses roughly 300–500MB RAM on its own.
Portainer gives you a UI over raw Docker. Coolify gives you a deployment platform with built-in SSL, domains, and CI/CD. For OpenClaw, Coolify is the better choice if you want automated HTTPS and domain routing. Use Portainer if you need finer control over individual container settings.
Installing Coolify on Your Server
Coolify installs on any Linux server with Docker. The official install script handles everything.
# Install Coolify (run as root or with sudo)
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
# Coolify starts automatically after install
# Access the UI at: http://your-server-ip:8000
# Check Coolify service status
systemctl status coolify
After install, visit http://your-server-ip:8000 to complete the setup wizard. You'll create an admin account, add your server (Coolify can manage the local server or remote servers via SSH), and configure your domain.
Server Requirements
Coolify needs a minimum of 2 vCPUs and 2GB RAM for its own processes. OpenClaw adds another 512MB–1GB at baseline. A 4GB RAM server is comfortable for running both. Any major VPS provider — Hetzner, DigitalOcean, Vultr — has a suitable plan in the $10–15/month range.
Deploying OpenClaw Through the Coolify UI
Once Coolify is running, deploying OpenClaw takes five steps in the web UI. We'll get to the environment variables in the next section — but first, the deployment config you actually need in the UI.
- In the Coolify sidebar, click Projects → New Project and name it "OpenClaw"
- Inside the project, click New Resource → Docker Image
- Set the image to
openclaw/openclaw:latest - Set the port to
8080(OpenClaw's default gateway port) - Assign your domain and enable HTTPS — Coolify provisions the cert automatically
The resulting Coolify deployment config maps to this Docker Compose structure under the hood:
services:
openclaw:
image: openclaw/openclaw:latest
ports:
- "8080:8080"
environment:
- OPENCLAW_GATEWAY_TOKEN=${GATEWAY_TOKEN}
- OPENCLAW_BIND=0.0.0.0:8080
- OPENCLAW_DATA_DIR=/app/data
volumes:
- openclaw-data:/app/data
- openclaw-config:/app/config
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
openclaw-data:
openclaw-config:
You don't write this file directly in Coolify — you set these values through the UI. But knowing the underlying structure helps you understand where each setting lives in the Coolify interface.
Managing OpenClaw Environment Variables in Coolify
Your gateway token, API keys for LLM providers, and any other secrets go into Coolify's environment variable manager. Never put them directly in the image or a config file checked into version control.
In the Coolify UI, navigate to your OpenClaw application and open the Environment Variables tab. Add these variables:
| Variable | Value | Secret? |
|---|---|---|
| OPENCLAW_GATEWAY_TOKEN | your-secure-token | Yes |
| OPENCLAW_BIND | 0.0.0.0:8080 | No |
| OPENAI_API_KEY | sk-... | Yes |
| OPENCLAW_DATA_DIR | /app/data | No |
Mark OPENCLAW_GATEWAY_TOKEN and any API keys as secret. Coolify masks secret values in deployment logs and the UI. Anyone with access to your Coolify instance won't see the plaintext value after it's set.
Auto-Deploy: Redeploy OpenClaw on New Image Pushes
Manual redeploys are fine for low-frequency updates. For teams that iterate on agent configs frequently, Coolify's webhook trigger automates the process.
# In Coolify UI: Application → Webhooks → Copy the webhook URL
# Example webhook URL format:
# https://your-coolify-domain/api/v1/deploy?uuid=abc123&token=xyz
# Configure Docker Hub to call this webhook on image push
# Settings → Webhooks → Add Webhook → paste the Coolify URL
# Or trigger manually with curl:
curl -X GET "https://your-coolify-domain/api/v1/deploy?uuid=abc123&token=xyz"
When Docker Hub pushes a new openclaw/openclaw:latest image, it fires the webhook. Coolify pulls the new image, stops the running container, and starts the new one — with zero downtime if you enable rolling deploys in the Coolify settings.
Using :latest means auto-deploys pull whatever is current. A bad upstream release can break your agents automatically. In production, pin to a specific version tag like openclaw/openclaw:1.4.2 and update deliberately after testing.
Common Mistakes With OpenClaw on Coolify
- Not persisting volumes — if you deploy without attaching persistent volumes, OpenClaw loses all agent data and conversation history on every redeploy. Map
/app/dataand/app/configto named Coolify volumes before your first deploy. - Forgetting to set the health check — Coolify uses health checks to determine when a container is ready. Without one, Coolify may mark a deploy as successful before OpenClaw has fully started, causing a brief window of failed requests.
- Using :latest in production — see the warning above. Every Coolify auto-deploy with :latest is a potential breaking change. Use pinned versions after initial setup.
- Running Coolify and OpenClaw on a 2GB RAM server — Coolify's overhead plus OpenClaw's baseline leaves almost no headroom. Under load, the OOM killer will terminate one of your processes. Budget at least 4GB RAM.
- Not setting a domain in Coolify before the first deploy — HTTPS provisioning only works when a domain points to your server before Coolify's ACME challenge runs. Set the DNS record first, then add the domain in Coolify, then deploy.
Frequently Asked Questions
What is Coolify and why use it for OpenClaw?
Coolify is an open-source self-hosted platform-as-a-service that manages Docker deployments, SSL certificates, reverse proxying, and environment variables through a web UI. For OpenClaw, it eliminates manual Nginx configuration and certificate management — you get production-grade hosting infrastructure without running commands.
Does Coolify handle HTTPS for OpenClaw automatically?
Yes. Coolify integrates with Let's Encrypt and provisions SSL certificates automatically when you point a domain at your server. Your OpenClaw gateway gets HTTPS without touching Certbot or Nginx configs. Certificates renew automatically before expiry with no intervention needed.
Can I deploy OpenClaw from a private Docker image on Coolify?
Yes. Coolify supports private Docker registries. Add your registry credentials in Coolify settings under Sources, then reference your private image in the deployment configuration. This works with Docker Hub private repos, GitHub Container Registry, and self-hosted registries.
How do I set OpenClaw environment variables in Coolify?
In the Coolify UI, navigate to your application and open the Environment Variables tab. Add each variable as a key-value pair. Coolify injects them into the container at runtime. Mark sensitive values like your gateway token as secret — Coolify masks them in logs and the UI.
Can Coolify automatically redeploy OpenClaw when I push a new image?
Yes. Enable the webhook trigger in Coolify's deployment settings. For Docker Hub images, configure a webhook that fires on new image pushes. Coolify receives the signal and redeploys automatically, pulling the latest image and restarting the container with your existing environment variables.
What server specs does Coolify need to run OpenClaw?
Coolify itself needs at least 2 vCPUs and 2GB RAM for its own processes. OpenClaw adds another 512MB–1GB depending on agent count and model call frequency. A $12/month VPS with 2 vCPUs and 4GB RAM runs both Coolify and a small OpenClaw deployment comfortably.
M. Kim specializes in making AI agent deployments accessible to teams without dedicated DevOps. Has helped over 30 teams move from local OpenClaw installs to production Coolify deployments with automated SSL and zero-downtime redeploys.