How to Install OpenClaw with Docker and Coolify — Complete Guide
Coolify is an open-source self-hosting platform that automates deployments on your own server. Combined with OpenClaw, you get a powerful AI assistant that's easy to manage. Here's how to set everything up.
What You Need
- A Linux server (Ubuntu 22.04+ recommended)
- At least 4 GB RAM
- A domain or subdomain pointed to your server
- Basic familiarity with command line
Step 1 — Install Coolify on Your Server
SSH into your server and run the Coolify installer:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
This will install Coolify and all its dependencies (Docker, Traefik, etc.). The process takes 5-10 minutes.
Once done, you'll see:
Coolify UI: https://your-server-ip:8000
Username: admin
Password: (randomly generated — check the output above)
Write down the password and access the UI at https://your-server-ip:8000.
Step 2 — Configure Coolify
On first login, you'll be asked to configure your server's public IP and SSL certificates. Follow the setup wizard — Coolify will automatically provision SSL via Let's Encrypt.
Step 3 — Add Your Server to Coolify
If this is your first time, add your current server as a Coolify-managed server:
- Go to **Servers** → **Add Server**
- Copy the installation command provided
- Paste it on your server via SSH
- Coolify will automatically detect Docker and configure the connection
Step 4 — Deploy OpenClaw via Docker Compose in Coolify
In Coolify, go to Applications → Create New:
- Select **Docker Compose** as the source
- Give it a name (e.g. "openclaw")
- Paste this Docker Compose configuration:
version: '3.8'
services:
openclaw:
image: ghcr.io/openclaw/openclaw:latest
container_name: openclaw
restart: unless-stopped
ports:
- "18789:18789"
- "18792:18792"
volumes:
- openclaw_data:/app/data
- openclaw_config:/app/config
environment:
volumes: openclaw_data: openclaw_config: ```
- Click **Deploy**
Coolify will pull the image, start the containers, and automatically configure networking, SSL, and a subdomain.
Step 5 — Configure Your Domain (Optional)
If you want a custom domain instead of the auto-generated subdomain:
- In Coolify, go to your OpenClaw application
- Click **Domains** → **Add Domain**
- Enter your subdomain (e.g. `ai.your-domain.com`)
- Add the DNS record shown by Coolify to your DNS provider
- Coolify will automatically provision SSL
Step 6 — Connect Channels
After deploying, access the OpenClaw UI via the URL Coolify generated. Go to Settings → Channels to configure Telegram, Discord, and more.
Step 7 — Install a Local AI Model (Optional)
To run AI models locally (no API costs):
- Install Ollama on your server: `curl -fsSL https://ollama.com/install.sh | sh`
- Pull a model: `ollama pull llama3`
- In OpenClaw UI, go to **Settings** → **Models** → **Add Model**
- Select **Ollama** as the provider — the model will appear automatically
How to Update OpenClaw
With Coolify, updates are one click:
- Go to your OpenClaw application in Coolify
- Click **Redeploy**
Or enable Auto Deploy — every push to the main branch triggers a redeploy automatically.
Backup and Recovery
Coolify handles backups automatically. To manually backup, go to Applications → OpenClaw → Snapshots → Create Snapshot.
Why Coolify + OpenClaw?
- **Zero downtime deploys** — Traefik swaps containers without dropping connections
- **Automatic SSL** — Every domain gets a Let's Encrypt certificate automatically
- **Auto-restart** — Containers restart automatically if they crash
- **One-click updates** — Pull the latest image and redeploy in seconds
- **Resource monitoring** — See CPU and RAM usage right in the dashboard
Full documentation at https://docs.openclaw.ai