Skip to main content
Self hosting is an enterprise-only feature. Please contact us at [email protected] to get started.
Datawizz provides a Docker Compose file for running the entire platform on a single machine or cloud instance. This is the recommended initial deployment for testing and proof-of-concept.

Hardware Requirements

At a minimum, the training component requires a machine with an A100, H100, or H200 GPU. In cloud environments, we recommend the following instance types as a minimum:

Scaling the Deployment

Typically, we scale the deployment by breaking out several components from the single instance into separate instances or managed services, in this order:

ClickHouse DB

Scale out ClickHouse to a dedicated instance for data redundancy and performance.

Router & Logger

Run the AI Gateway, Request Logger, and Evaluator Runner on separate instances for horizontal scaling.

Inference Workers

Deploy inference workers separately for easier horizontal scaling and autoscaling.

Quick Start

localhost cannot be used due to Docker networking constraints. The app container needs to reach the host machine, which requires a resolvable hostname mapped via /etc/hosts.

Architecture

Profiles

Docker Compose profiles allow you to selectively enable optional services:

Usage Examples

Configuration

Required Environment Variables

Edit .env and configure at minimum:

Generating Secure Values

External Services

To use external managed services instead of local containers: External ClickHouse (see Scaling Out ClickHouse for full details):

AI Gateway

For running the gateway on separate instances, see Scaling Out the Router & Logger. The gateway profile enables a complete LLM inference proxy stack: How it works:
  1. Clients send LLM requests to the AI Gateway
  2. Gateway routes requests to configured model providers
  3. Responses are logged via the Request Logger to ClickHouse
  4. Evaluators can automatically score inference results
Configuration:

Using Pre-built Images

By default, docker compose up builds images from local source code. For production deployments, you can use pre-built images from a container registry instead. Configure image sources in .env:
Pull and run without building:
If you omit --no-build, Docker Compose will attempt to build from source even if the image variables are set.

URL Routing

Caddy routes requests based on URL path: Direct access (not via Caddy):
  • Supabase Studio: http://{domain}:3001 (studio profile)

Production Deployment

Enable HTTPS

For production, set your domain in .env:
Caddy will automatically provision SSL certificates via Let’s Encrypt.

Security Checklist

  • Change all default passwords in .env
  • Generate secure JWT_SECRET (min 32 chars)
  • Generate new ANON_KEY and SERVICE_ROLE_KEY
  • Set DOMAIN to your actual domain
  • Review DISABLE_SIGNUP setting
  • Configure SMTP for email delivery

Common Operations

View Logs

Restart Services

Update Services

Upgrading / Re-running Migrations

Database migrations run automatically on first startup. They won’t re-run on subsequent docker compose up calls (Docker caches completed containers). When to re-run migrations:
  • After pulling a new version with database schema changes
  • After changing ClickHouse connection settings in .env
  • If migrations failed and you’ve fixed the issue
How to re-run migrations:

Check Service Health

Access Database

Backup & Restore

Quick Backup

Troubleshooting

Services won’t start

  1. Check logs: docker compose logs
  2. Verify .env file exists and has required values
  3. Check Docker daemon is running

Database connection errors

  1. Wait for database to be healthy: docker compose ps
  2. Check PostgreSQL logs: docker compose logs db
  3. Verify POSTGRES_PASSWORD in .env

App shows “initializing” or errors

  1. Migrations may still be running - wait a few seconds
  2. Check migration logs: docker compose logs supabase-migrations
  3. Verify Kong is healthy: docker compose logs kong

Workers fail to start

  1. Workers require NVIDIA GPU with Docker GPU support
  2. Verify GPU is available: nvidia-smi
  3. Check Docker GPU runtime: docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

Gateway services not responding

  1. Check all gateway services are healthy: docker compose ps | grep -E "gateway|logger|evaluator"
  2. Restart Caddy to pick up new routes: docker compose restart caddy
  3. Test internal connectivity: docker exec datawizz-caddy wget -qO- http://ai-gateway:3000/health
  4. Check gateway logs: docker compose logs ai-gateway request-logger evaluator-runner

SSL certificate issues (production)

  1. Ensure domain DNS points to your server
  2. Check Caddy logs: docker compose logs caddy
  3. Ports 80 and 443 must be accessible from the internet