Skip to main content

Self-Hosting CrewForm

Run CrewForm on your own infrastructure with Docker Compose. This guide covers a single-server deployment suitable for teams and small organizations.

Prerequisites

  • Docker ≥ 24.0 and Docker Compose ≥ 2.20
  • 2 GB RAM minimum (4 GB recommended)
  • 10 GB disk for database + assets
  • A Supabase project (hosted) or PostgreSQL 15+ (direct mode)

Quick Start

The frontend will be available at http://localhost:3000.

Architecture

Services

Configuration

Required Variables

Optional Variables

Database Migrations

Migrations run automatically on startup via the migrate container. It:
  1. Creates a _migrations tracking table
  2. Runs all supabase/migrations/*.sql files in sorted order
  3. Skips already-applied migrations
  4. Exits after completion
To run migrations manually:

Managing the Stack

Updating

The script will:
  1. Pull the latest code
  2. Stop running containers (data is preserved)
  3. Rebuild images
  4. Restart services (migrations run automatically)

Manual Update

💡 Tip: Always check .env.example after updating — new features may require additional environment variables.

Troubleshooting

Migrations fail

Frontend shows blank page

  • Ensure VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY are set correctly
  • Check nginx logs: docker compose logs frontend

Task runner not processing tasks

  • Check that SUPABASE_SERVICE_ROLE_KEY is set
  • View logs: docker compose logs -f task-runner
  • Ensure the task-runner can reach the Supabase URL

Database connection issues

  • Verify POSTGRES_PASSWORD matches across services
  • Check postgres health: docker compose exec postgres pg_isready

Ollama Integration (Local AI)

Run AI models entirely on your own hardware — no API keys, no external calls, complete data sovereignty.

1. Install Ollama

2. Pull Models

3. Configure in CrewForm

  1. Go to Settings → LLM Setup
  2. Find Ollama (Local) in the provider list
  3. Enter any placeholder value as the API key (e.g. ollama) — Ollama doesn’t need one
  4. Save and start creating agents with your local models
💡 No API key is actually sent to Ollama. The task runner connects to http://localhost:11434/v1 using the OpenAI-compatible API.

Docker Networking

If both CrewForm and Ollama run in Docker, the task runner can’t reach localhost:11434. Use one of these approaches: Option A: Host networking (simplest)
Then Ollama is reachable at http://host.docker.internal:11434/v1. Option B: Add Ollama to docker-compose
Then Ollama is reachable at http://ollama:11434/v1 from the task runner.

Air-Gapped Setup

For fully offline / air-gapped deployments:
  1. Pull models on a machine with internet: ollama pull llama3.3
  2. Copy the model directory (~/.ollama/models/) to the target machine
  3. Start Ollama on the target: ollama serve
  4. Deploy CrewForm with Docker Compose — no external API keys needed
  5. All AI inference stays on-premises

Supported Models

CrewForm ships with 11 pre-configured Ollama models:
RAM Guide: Plan for ~1.2× the model file size in available RAM. A 5 GB model needs ~6 GB free.

Production Considerations

  • HTTPS: Put a reverse proxy (Caddy, Traefik, or nginx) in front with TLS
  • Backups: Schedule pg_dump via cron
  • Monitoring: Add health check endpoints and uptime monitoring
  • Secrets: Use Docker secrets or a vault for sensitive values
  • Memory: Monitor task-runner memory usage with AI provider calls
  • GPU: For Ollama, add GPU passthrough for significantly faster inference