Skip to main content
Chroma provides Infrastructure as Code (IaC) templates for deploying on major cloud providers. These templates create single-instance Chroma deployments using Docker.

AWS Deployment

Deploy Chroma on AWS EC2 using CloudFormation.

Prerequisites

  • AWS account with appropriate permissions
  • AWS CLI configured
  • EC2 key pair (optional, for SSH access)

CloudFormation Template

The AWS deployment uses a CloudFormation template located at deployments/aws/chroma.cf.json. Template Parameters:

Deploy with AWS Console

  1. Navigate to CloudFormation
    • Go to AWS Console → CloudFormation → Create Stack
  2. Upload Template
    • Upload deployments/aws/chroma.cf.json
    • Or use Amazon S3 URL if hosted
  3. Configure Parameters
    • Choose instance type (recommended: t3.small or larger)
    • Set Chroma version
    • Optionally add SSH key pair
  4. Review and Create
    • Review settings
    • Acknowledge IAM resource creation
    • Click “Create Stack”
  5. Get Instance IP
    • Wait for stack creation to complete
    • Go to Outputs tab
    • Copy ServerIp value

Deploy with AWS CLI

What Gets Deployed

The CloudFormation template provisions:
  1. EC2 Instance
    • Amazon Linux 2
    • 24 GB EBS volume
    • Docker and Docker Compose installed
  2. Security Group
    • Port 22 (SSH) - open to 0.0.0.0/0
    • Port 8000 (Chroma HTTP) - open to 0.0.0.0/0
  3. User Data Script

Docker Compose Configuration

The AWS deployment uses this Docker Compose file:

Connect to Chroma

Security Recommendations

The default security group opens ports to 0.0.0.0/0. For production, restrict access to specific IP ranges.
Update Security Group:

Monitoring

GCP Deployment

Deploy Chroma on Google Compute Engine using Terraform.

Prerequisites

  • GCP project with billing enabled
  • gcloud CLI installed and configured
  • Terraform installed

Terraform Configuration

The GCP deployment uses Terraform files in deployments/gcp/. Variables (chroma.tfvars):

Deploy with Terraform

Terraform Resources

The main.tf creates:
  1. Firewall Rule
  2. Compute Instance

Connect to Instance

Machine Type Recommendations

Cleanup

Azure Deployment

Deploy Chroma on Azure Virtual Machines using Terraform.

Prerequisites

  • Azure subscription
  • Azure CLI installed and configured
  • Terraform installed
  • SSH key pair

Terraform Configuration

Variables (chroma.tfvars.tf):

Deploy with Terraform

Azure Resources

The main.tf creates:
  1. Resource Group
  2. Virtual Network (10.0.0.0/16)
  3. Subnet (10.0.1.0/24)
  4. Network Security Group
    • Port 22: SSH
    • Port 8000: Chroma HTTP
  5. Public IP Address
  6. Network Interface
  7. Linux Virtual Machine
    • Debian 11
    • 24 GB OS disk
    • Docker and Chroma auto-installed

Network Security Group

Connect to Instance

VM Size Recommendations

Cleanup

Common Configuration

Environment Variables

All cloud deployments support these environment variables:

Persistent Storage

All deployments use Docker volumes for persistence:

Backup and Restore

Production Considerations

High Availability

For production HA deployments:
  1. Use Kubernetes instead of single-instance deployments
  2. Deploy across multiple availability zones
  3. Set up load balancing
  4. Configure auto-scaling
See Kubernetes Deployment for distributed architectures.

Monitoring

Configure OpenTelemetry for comprehensive observability:

Security

  1. Restrict network access
    • Modify security groups/firewall rules
    • Use VPN or VPC peering
    • Implement authentication
  2. Enable SSL/TLS
    • Use reverse proxy (nginx, HAProxy)
    • Configure SSL certificates
  3. Regular updates

Cost Optimization

  • AWS: Use Spot Instances for non-critical workloads
  • GCP: Use Preemptible VMs for development
  • Azure: Use Reserved Instances for long-term production
  • Monitor and adjust instance sizes based on usage

Comparison

Next Steps

Docker Deployment

Learn about Docker configuration options

Kubernetes

Scale to distributed Kubernetes deployment

Authentication

Secure your Chroma deployment

Observability

Monitor your cloud deployment