Installation Guide
This guide will walk you through setting up WebDev on a fresh server.
Prerequisites
Hardware Requirements
- CPU: 2+ cores (4 recommended)
- RAM: 4GB minimum (8GB recommended)
- Disk: 20GB SSD minimum
- Network: Public IP address
Recommended Platform
WebDev runs best on:
- Hetzner CX32: 4 vCPU, 8GB RAM (€11.50/month)
- DigitalOcean Droplet: 4 vCPU, 8GB RAM
- AWS EC2: t3.large
💡 Tip
Hetzner offers the best price/performance ratio for Europe. Use DigitalOcean for US-based deployments.
Software Requirements
- Ubuntu 24.04 LTS (recommended)
- Root or sudo access
- Domain name (for SSL)
Step 1: Server Setup
1.1 Initial Configuration
# Update system
sudo apt update && sudo apt upgrade -y
# Install essential packages
sudo apt install -y \
curl \
wget \
git \
build-essential \
ca-certificates \
gnupg \
lsb-release
1.2 Create Non-Root User
# Create webdev user
sudo adduser webdev
# Add to sudo group
sudo usermod -aG sudo webdev
# Add to docker group (we'll install Docker next)
sudo usermod -aG docker webdev
# Switch to webdev user
su - webdev
Step 2: Install Dependencies
2.1 Node.js 22
# Add NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
# Install Node.js
sudo apt install -y nodejs
# Verify installation
node --version # Should show v22.x.x
npm --version
2.2 pnpm
# Install pnpm globally
npm install -g pnpm
# Verify installation
pnpm --version
2.3 Docker
# Add Docker's official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add Docker repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Verify installation
docker --version
docker compose version
2.4 Nginx
# Install Nginx
sudo apt install -y nginx
# Enable and start Nginx
sudo systemctl enable nginx
sudo systemctl start nginx
# Verify
sudo systemctl status nginx
2.5 Certbot (Let’s Encrypt)
# Install Certbot
sudo apt install -y certbot python3-certbot-nginx
# Verify
certbot --version
Step 3: Configure Environment
3.1 Directory Structure
# Create project directories
mkdir -p ~/projects ~/scripts ~/logs/daily
# Create OpenClaw workspace
mkdir -p ~/.openclaw/workspace
3.2 Git Configuration
# Configure Git
git config --global user.name "WebDev Agent"
git config --global user.email "webdev@yourdomain.dev"
git config --global init.defaultBranch main
3.3 Environment Variables
Create ~/.bashrc or ~/.zshrc additions:
# WebDev environment
export GIT_TOKEN="github_pat_..." # Get from GitHub settings
export CLOUDFLARE_API_TOKEN="your_token"
export CLOUDFLARE_ZONE_ID="your_zone_id"
export SERVER_IP="your.server.ip"
⚠️ Security
Never commit API tokens to Git. Store them in environment variables or use a secrets manager.
Step 4: DNS Configuration
4.1 Cloudflare Setup
- Add your domain to Cloudflare
- Update nameservers at your registrar
- Create API token with DNS edit permissions
4.2 Create Base A Record
# Point domain to server
curl -X POST "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records" \
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
-H "Content-Type: application/json" \
--data '{
"type": "A",
"name": "@",
"content": "'${SERVER_IP}'",
"ttl": 1,
"proxied": false
}'
Step 5: Install WebDev
5.1 Clone Repository
cd ~/
git clone https://github.com/openclaw/openclaw.git
cd openclaw
5.2 Install Dependencies
pnpm install
5.3 Configure WebDev
Create ~/.openclaw/workspace/AGENTS.md, SOUL.md, etc. (see Configuration Guide)
Step 6: First Project
6.1 Initialize Project Tracker
cat > ~/projects/PROGRESS.json << 'EOF'
{
"current_level": 1,
"current_project": null,
"projects": {},
"total_commits": 0,
"started_at": null
}
EOF
6.2 Start WebDev
# Start OpenClaw gateway
openclaw gateway start
# Check status
openclaw status
💡 Success!
If you see “Gateway running” and no errors, WebDev is ready to begin autonomous development!
Next Steps
- Quickstart Guide - Launch your first project
- Configuration - Customize WebDev behavior
- Troubleshooting - Common issues
Security Checklist
Before production use:
- Firewall configured (ufw)
- SSH key-only authentication
- Automatic security updates enabled
- Resource limits set (Docker, Node)
- Monitoring configured
- Backup strategy in place
- API tokens secured
- Non-root user created