Skip to main content

Overview

Chroma provides extensive configuration options through the Settings class, environment variables, and YAML configuration files. This guide covers all configuration options available for both server and client deployments.

Configuration Methods

Chroma can be configured in three ways:
  1. Environment variables - Set via .env file or system environment
  2. Settings class - Pass directly when creating a client
  3. YAML configuration - For advanced deployments

Using Environment Variables

Create a .env file in your working directory:
Chroma automatically loads the .env file using UTF-8 encoding.

Using Settings Class

Pass configuration directly when creating a client:

Configuration Options

Generic Settings

Client Mode Settings

For connecting to a remote Chroma server:

Server Mode Settings

For embedded or server deployments:

Authentication Settings

Client Authentication

Server Authentication

Telemetry Settings

See Observability for more details.

Migration Settings

See Migrations for more details.

Distributed Chroma Settings

For distributed/production deployments:

Rate Limiting & Quotas

gRPC Timeouts

Example Configurations

Development Setup (In-Memory)

Local Persistent Storage

Remote Server Connection

Production Server with Authentication

YAML Configuration

While Chroma primarily uses environment variables, you can also use YAML for complex configurations:
Load the configuration:

Validation and Errors

Required Settings

Some settings are required depending on your deployment mode. Use the require() method to validate:

Legacy Configuration Error

Chroma will raise an error if you try to use deprecated configuration values:
See the Migration Guide for upgrading from legacy configurations.

Environment-Specific Configuration

Manage different configurations per environment:
Load based on environment:

Best Practices

  1. Never commit secrets - Use environment variables or secret management systems for credentials
  2. Disable reset in production - Set allow_reset=False to prevent accidental data loss
  3. Enable SSL for remote connections - Always use chroma_server_ssl_enabled=True in production
  4. Monitor memory usage - Set chroma_memory_limit_bytes based on your system capacity
  5. Choose appropriate telemetry granularity - Use "operation" for production, "all" only for debugging
  6. Use persistent storage - Set is_persistent=True for any non-ephemeral use cases
  7. Configure file descriptors - Increase chroma_server_nofile for high-concurrency deployments

Next Steps