Overview
Chroma provides extensive configuration options through theSettings 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:- Environment variables - Set via
.envfile or system environment - Settings class - Pass directly when creating a client
- YAML configuration - For advanced deployments
Using Environment Variables
Create a.env file in your working directory:
.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:Validation and Errors
Required Settings
Some settings are required depending on your deployment mode. Use therequire() method to validate:
Legacy Configuration Error
Chroma will raise an error if you try to use deprecated configuration values:Environment-Specific Configuration
Manage different configurations per environment:Best Practices
- Never commit secrets - Use environment variables or secret management systems for credentials
- Disable reset in production - Set
allow_reset=Falseto prevent accidental data loss - Enable SSL for remote connections - Always use
chroma_server_ssl_enabled=Truein production - Monitor memory usage - Set
chroma_memory_limit_bytesbased on your system capacity - Choose appropriate telemetry granularity - Use
"operation"for production,"all"only for debugging - Use persistent storage - Set
is_persistent=Truefor any non-ephemeral use cases - Configure file descriptors - Increase
chroma_server_nofilefor high-concurrency deployments
Next Steps
- Learn about Observability configuration
- Understand Performance Tuning
- Set up Schema Migrations