OpenClaw Setup Guide for Beginners: One-Click Install on Ubuntu/Debian
Ready to run your own self-hosted AI assistant? OpenClaw can be installed on a cheap VPS, a Raspberry Pi, or your local machine. This guide walks you through a production-ready setup on Ubuntu/Debian in under 10 minutes — with zero coding required.
What You’ll Need
- OS: Ubuntu 22.04+ or Debian 11+ (we’ll use Ubuntu 24.04 LTS)
- RAM: Minimum 4GB (8GB recommended for GPT-4 level models)
- Storage: 20GB free space (SSD recommended)
- Internet: For downloading packages and LLM APIs (if not using local models)
- Domain (optional): For HTTPS access (e.g., openclaw.yourdomain.com)
Step 1: Prepare Your Server
Start with a fresh Ubuntu instance. This can be:
- A VPS ($5-10/mo from DigitalOcean, Linode, Hetzner)
- A home server or Raspberry Pi 4/5 (for local offline use)
- A local Ubuntu desktop/laptop
Update packages:
sudo apt update && sudo apt upgrade -y
Step 2: Install Docker (Required)
OpenClaw runs in Docker for isolation and easy updates:
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker
Verify: docker run hello-world should print a success message.
Step 3: One-Click OpenClaw Install
The official installer handles everything: Docker images, configuration, systemd service.
curl -fsSL https://get.openclaw.ai | sudo bash
This script will:
- Pull the latest OpenClaw Docker image
- Create
/etc/openclaw/openclaw.jsonconfig - Set up a systemd service (
openclaw.service) - Start OpenClaw automatically on boot
Installation takes 1-2 minutes on a typical VPS.
Step 4: Configure OpenClaw
The main config file is at /etc/openclaw/openclaw.json. Open it:
sudo nano /etc/openclaw/openclaw.json
Key settings to adjust:
- port: Default 18789 (change if needed)
- baseUrl: Set to your domain or server IP (e.g.,
"https://openclaw.yourdomain.com") - env: Add your LLM API keys (OpenAI, Anthropic, etc.) using
env:VAR_NAMEpattern - admin token: Set a strong random string for gateway authentication
Example config snippet:
{
"port": 18789,
"baseUrl": "https://openclaw.yourdomain.com",
"env": {
"OPENAI_API_KEY": "env:OPENAI_API_KEY"
},
"admin": { "token": "your-secret-token-here" }
}
Set the environment variables in your shell or systemd service file:
export OPENAI_API_KEY="sk-..."
Step 5: Access the Web UI
OpenClaw includes a web interface for managing agents and skills.
- Local: http://localhost:18789
- Remote: https://your-server-ip:18789
The first time you visit, you’ll create an admin account. Use a strong password and enable 2FA if available.
Step 6: Install Your First Skills
OpenClaw’s power comes from skills (pre-built automations). Use the built-in skill manager or clawhub CLI:
# List available skills
clawhub search
# Install a skill (e.g., GHL integration)
clawhub install ghl-openclaw
# Or install from GitHub repo
clawhub install https://github.com/username/skill-repo
Essential skills for beginners:
openrouter-ai— Access multiple LLM providersghl-openclaw— GoHighLevel CRM integrationemail-sender— Send emails via SMTPweb-scraper— Extract data from websites
Step 7: Create Your First Agent
Agents are AI assistants that perform tasks. In the web UI:
- Go to Agents → Create Agent
- Give it a name (e.g., “Email Assistant”)
- Select a model (e.g., GPT-4o via OpenRouter)
- Add skills (e.g., “send email”, “read GHL contacts”)
- Write a system prompt: “You are a helpful email assistant. When asked to send an email, use the email-sender skill.”
- Save and test in the chat interface
Region-Specific Tips
🇺🇸 United States
- Use a US-based VPS (Virginia, New York) for low latency
- For OpenAI/Anthropic APIs, US East Coast servers are fine
- Consider compliance: CCPA if handling California consumer data
🇪🇺 European Union
- Choose a EU data center (Frankfurt, Amsterdam) to keep EU data within EEA
- Enable GDPR features: data anonymization, right-to-delete workflows
- Use EU-based LLM providers (like local models or Mistral in EU)
🇮🇳 India
- VPS in Mumbai or Chennai (AWS, DigitalOcean)
- Consider data sovereignty: some Indian regulations require data localization
- Use region-specific APIs when possible for better performance
🌍 Rest of World
- Pick the nearest data center to your users
- If internet is slow, use local LLMs (Llama 3.1 70B can run on 32GB RAM VM)
- Consider mobile deployment: OpenClaw runs on Android via Termux
Common Pitfalls & Fixes
| Issue | Solution |
|---|---|
| Port 18789 already in use | Change port in config or stop conflicting service (sudo systemctl stop openclaw) |
| Skills not loading | Check logs: journalctl -u openclaw -f. Usually permission errors or missing dependencies. |
| APIs returning auth errors | Verify API keys in environment variables; restart service after changes |
| Slow responses | Use local models (Ollama integration) or upgrade VPS RAM/CPU |
Testing Your Installation
Run the built-in health check:
curl http://localhost:18789/health
Expected response: {"status":"ok"}
Test an agent via API:
curl -X POST http://localhost:18789/api/agent/run \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{"agent":"test","input":"Say hello"}'
What’s Next?
After setup:
- Secure your installation (see our Security Hardening guide)
- Connect your first external service (GHL, Slack, Telegram)
- Build a simple automation (e.g., “When I get an email, summarize it”)
- Set up backups and monitoring
Need Help?
Flowix AI offers managed OpenClaw deployments and training. We’ll set up a secure, production-ready instance tailored to your region and use case.
Book a setup consultation and get running in hours, not days.