Self-Hosting

Deploy EvalGuard on your own infrastructure using Docker Compose or Kubernetes with Helm.

Docker Compose

The fastest way to self-host EvalGuard. Includes the web app, worker, Supabase (PostgreSQL + Auth), and Redis.

1. Clone the repository

bash
git clone https://github.com/evalguard/evalguard.git
cd evalguard

2. Configure environment variables

terminal
cp .env.example .env
# Edit .env with your values

3. Start services

terminal
# Development mode (with hot reload)
docker compose -f docker-compose.dev.yml up

# Production mode
docker compose -f docker-compose.prod.yml up -d

4. Access the dashboard

Open http://localhost:3000 in your browser. Create an account and start evaluating.

The production Docker Compose file includes health checks, restart policies, and resource limits. It is recommended for any deployment beyond local development.

Kubernetes + Helm

For production deployments at scale, use the Helm chart included in the repository.

1. Add the chart

terminal
cd helm/evalguard
helm dependency update

2. Configure values

values.yaml
replicaCount: 2

image:
  repository: evalguard/evalguard
  tag: latest
  pullPolicy: IfNotPresent

env:
  NEXT_PUBLIC_SUPABASE_URL: "https://your-supabase.supabase.co"
  NEXT_PUBLIC_SUPABASE_ANON_KEY: "your-anon-key"
  SUPABASE_SERVICE_ROLE_KEY: "your-service-role-key"
  DATABASE_URL: "postgresql://..."
  REDIS_URL: "redis://redis:6379"
  NEXTAUTH_SECRET: "your-secret-here"
  NEXTAUTH_URL: "https://evalguard.yourcompany.com"

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: evalguard.yourcompany.com
      paths:
        - path: /
          pathType: Prefix

resources:
  requests:
    cpu: 500m
    memory: 512Mi
  limits:
    cpu: 2000m
    memory: 2Gi

worker:
  replicaCount: 2
  resources:
    requests:
      cpu: 1000m
      memory: 1Gi

3. Deploy

terminal
helm install evalguard ./helm/evalguard \
  --namespace evalguard \
  --create-namespace \
  -f values.yaml

4. Upgrade

terminal
helm upgrade evalguard ./helm/evalguard \
  --namespace evalguard \
  -f values.yaml

Supabase Setup

EvalGuard uses Supabase for authentication and database storage. You can use Supabase Cloud or self-host Supabase.

Supabase Cloud

  1. Create a project at supabase.com
  2. Copy the project URL and anon key from Settings > API
  3. Copy the service role key from Settings > API
  4. Run the migrations: npx supabase db push

Self-Hosted Supabase

terminal
# The Supabase directory includes all migrations
cd supabase
npx supabase start

# This outputs your local Supabase URL and keys
# Use these in your .env file

Redis Setup

Redis is used for job queues (eval/scan workers), caching, and real-time monitoring streams.

terminal
# Local Redis
docker run -d --name redis -p 6379:6379 redis:7-alpine

# Or use a managed service (Upstash, Redis Cloud, ElastiCache)
# Set REDIS_URL=redis://your-host:6379

Environment Variables Reference

VariableDescriptionRequired
NEXT_PUBLIC_SUPABASE_URLSupabase project URLRequired
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anonymous keyRequired
SUPABASE_SERVICE_ROLE_KEYSupabase service role keyRequired
DATABASE_URLPostgreSQL connection stringRequired
REDIS_URLRedis connection stringRequired
NEXTAUTH_SECRETNextAuth.js secret for session encryptionRequired
NEXTAUTH_URLCanonical URL of the deploymentRequired
OPENAI_API_KEYOpenAI API key for LLM-based scorersOptional
ANTHROPIC_API_KEYAnthropic API key for Claude-based scorersOptional
SENTRY_DSNSentry DSN for error trackingOptional
RAZORPAY_KEY_IDRazorpay key for billing (if enabled)Optional
RAZORPAY_KEY_SECRETRazorpay secret for billingOptional
SMTP_HOSTSMTP server for email notificationsOptional
SMTP_PORTSMTP portOptional
SMTP_USERSMTP usernameOptional
SMTP_PASSSMTP passwordOptional

Architecture

EvalGuard consists of three main services:

  • Web App -- Next.js application serving the dashboard, marketing pages, and API routes
  • Worker -- Background job processor that runs evaluations, security scans, and benchmarks
  • Database -- Supabase (PostgreSQL + Auth + Storage) for persistent storage

Redis connects the web app and worker for job queuing and real-time updates. The worker scales horizontally -- add more replicas to increase throughput.