🐳 Docker Deployment Guide

Deploy Clawdbot AI using Docker containers for easy setup and portability

ℹ️ Prerequisites: You need Docker and Docker Compose installed on your system.

Why Docker?

Docker provides several advantages for running Clawdbot:

  • Consistency: Same environment across all platforms
  • Isolation: Keeps Clawdbot separate from your system
  • Easy Updates: Pull new images with one command
  • Portability: Move between machines effortlessly

Quick Start

1. Pull the Docker Image

docker pull clawdbot/clawdbot:latest

2. Run Clawdbot

docker run -d \\
  --name clawdbot \\
  -e CLAUDE_API_KEY=your_api_key_here \\
  -v clawdbot-data:/app/data \\
  -p 3000:3000 \\
  clawdbot/clawdbot:latest

3. Verify Installation

docker logs clawdbot
✅ Success! Clawdbot is now running. Access the dashboard at http://localhost:3000

Docker Compose (Recommended)

For production deployments, use Docker Compose for better configuration management.

Create docker-compose.yml

version: '3.8'

services:
  clawdbot:
    image: clawdbot/clawdbot:latest
    container_name: clawdbot
    restart: unless-stopped
    environment:
      - CLAUDE_API_KEY=your_api_key_here
      - NODE_ENV=production
      - PORT=3000
    volumes:
      - clawdbot-data:/app/data
      - clawdbot-logs:/app/logs
    ports:
      - "3000:3000"
    networks:
      - clawdbot-network

volumes:
  clawdbot-data:
  clawdbot-logs:

networks:
  clawdbot-network:
    driver: bridge

Start with Docker Compose

# Start
docker-compose up -d

# View logs
docker-compose logs -f

# Stop
docker-compose down

Environment Variables

Configure Clawdbot using these environment variables:

Variable Required Description
CLAUDE_API_KEY ✅ Yes Your Claude API key from Anthropic
PORT ❌ No Server port (default: 3000)
NODE_ENV ❌ No Environment (development/production)
LOG_LEVEL ❌ No Logging level (info/debug/error)

Data Persistence

Clawdbot stores data in volumes to persist across container restarts:

  • /app/data - User data, settings, and memory
  • /app/logs - Application logs

Backup Your Data

# Create backup
docker run --rm -v clawdbot-data:/data -v $(pwd):/backup ubuntu tar czf /backup/clawdbot-backup.tar.gz /data

# Restore backup
docker run --rm -v clawdbot-data:/data -v $(pwd):/backup ubuntu tar xzf /backup/clawdbot-backup.tar.gz -C /

Advanced Configuration

Custom Configuration File

Mount a custom config file:

docker run -d \\
  --name clawdbot \\
  -v /path/to/config.json:/app/config.json \\
  -v clawdbot-data:/app/data \\
  clawdbot/clawdbot:latest

Network Configuration

For integration with other services:

docker network create clawdbot-network

docker run -d \\
  --name clawdbot \\
  --network clawdbot-network \\
  clawdbot/clawdbot:latest

Updating Clawdbot

# Pull latest image
docker pull clawdbot/clawdbot:latest

# Stop and remove old container
docker stop clawdbot
docker rm clawdbot

# Start new container
docker run -d \\
  --name clawdbot \\
  -e CLAUDE_API_KEY=your_api_key \\
  -v clawdbot-data:/app/data \\
  clawdbot/clawdbot:latest
⚠️ Important: Always backup your data before updating!

Troubleshooting

Container Won't Start

# Check logs
docker logs clawdbot

# Check container status
docker ps -a

# Inspect container
docker inspect clawdbot

Permission Issues

# Run with specific user ID
docker run -d \\
  --user $(id -u):$(id -g) \\
  --name clawdbot \\
  clawdbot/clawdbot:latest

Network Issues

# Check if port is already in use
lsof -i :3000

# Use different port
docker run -d -p 8080:3000 clawdbot/clawdbot:latest

Production Best Practices

  • ✅ Use Docker Compose for orchestration
  • ✅ Set restart: unless-stopped policy
  • ✅ Mount volumes for data persistence
  • ✅ Use environment files for secrets
  • ✅ Enable health checks
  • ✅ Set resource limits
  • ✅ Use specific version tags (not latest)
  • ✅ Regular backups of volumes

Health Check Example

services:
  clawdbot:
    image: clawdbot/clawdbot:latest
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

Next Steps

📝 Configuration Guide 🎯 Install Skills 🔗 Add Integrations
Need help? Join our Discord community or check the GitHub repository.