Self-Hosted Gentrace
Before deploying Gentrace self-hosted, you’ll need to contact us at [email protected] to obtain the necessary secrets for pulling container images:
- For Docker deployments: You’ll need credentials to pull from our Quay.io registry
- For Kubernetes deployments: You’ll need an image pull secret to access our container registry
Overview
The Gentrace self-hosted deployment includes:- Gentrace API Server
- Gentrace Web Application Frontend
- Gentrace WebSocket Server
- PostgreSQL Database
- ClickHouse Analytics Database
- Kafka Message Queue
- Object Storage Integration
- Service Mesh Configuration (Kubernetes only)
SDK Configuration
When using Gentrace SDKs with a self-hosted deployment, you must configure the base URL during initialization:https://self-hosted.gentrace.ai/api
with your self-hosted deployment’s API endpoint like http://localhost:3000/api
if running locally with Docker.
Docker Deployment (Development)
The Docker deployment is recommended for local development and testing environments. It provides a quick way to get started with Gentrace.Prerequisites
- Docker Engine 20.10.0+
- Docker Compose v2.0.0+
- 4GB RAM minimum
- 20GB disk space minimum
Quick Start
- Clone the repository:
-
Configure environment variables:
- Copy the
.env.example
to.env
- Set secure values for
JWT_SECRET
andPRISMA_FIELD_ENCRYPTION_KEY
- Update admin credentials in the environment file
- Copy the
- Execute the following Docker login command. You’ll need to contact [email protected] to get these credentials:
- Start the services:
- Access the services:
- Web App: http://localhost:3000
- Kafka UI: http://localhost:8080
- MinIO Console: http://localhost:9001
Docker Services
The Docker deployment includes:- Core Services:
- Web App & API (port 3000)
- WebSocket Server (port 3001)
- Task Runner & Scheduler
- Infrastructure:
- PostgreSQL (port 5432)
- ClickHouse (port 8123)
- Kafka (ports 9092, 29092)
- MinIO (ports 9000, 9001)
Docker Troubleshooting
View logs for a specific service:Kubernetes Deployment (Production)
The Kubernetes deployment is recommended for production environments, offering scalability and high availability.Prerequisites
- Kubernetes 1.19+
- Helm 3.0+
- A configured storage class
- Istio service mesh (if mutual TLS is needed)
- Access to pull container images
- Kubernetes secrets configured
Installation Steps
You can install Gentrace either by cloning the repository or using the Helm chart from Artifact Hub.Option 1: Using Artifact Hub (Recommended for Production)
- Add the Gentrace Helm repository:
- Install the chart:
Option 2: Using Git Repository
- Get the Helm Chart:
- Configure Storage Class:
- Install Istio:
- Configure Secrets:
- Admin credentials
- Database credentials (PostgreSQL, ClickHouse)
- JWT authentication
- Kafka configuration
- Object storage access
- Prisma field encryption
- Deploy:
values.yaml
include:
- Database settings
- Storage configurations
- Service mesh parameters
- Resource allocations
- Ingress configurations
Monitoring
Access the Kiali dashboard to visualize service mesh topology:Updates and Maintenance
To update your self-hosted Gentrace installation:- Check the changelog for breaking changes
-
Backup your data:
- PostgreSQL data
- ClickHouse data
- Object storage contents
-
Update the Helm chart:
If using Artifact Hub:
If using Git repository:
- Pull the latest images:
- Restart the services with the new images:
Manual Migration (Non-Docker/Helm Deployments)
If you’re deploying Gentrace without using Docker Compose or the Helm chart, you’ll need to run the database migrations manually. You can do this by running our migration container:- Replace all environment variables with your actual values
- Ensure the databases are accessible from where you’re running the container
- Run this before starting your Gentrace services for the first time or when upgrading to a new version
Support
For detailed deployment instructions and troubleshooting:- Visit our GitHub repository
- Contact us at [email protected]