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
| Setting | Type | Default | Description |
|---|---|---|---|
environment | str | "" | Environment name for deployment tracking |
chroma_api_impl | str | "chromadb.api.rust.RustBindingsAPI" | API implementation to use. Options: chromadb.api.rust.RustBindingsAPI, chromadb.api.segment.SegmentAPI, chromadb.api.fastapi.FastAPI |
chroma_server_nofile | int | None | Maximum number of open file descriptors (Unix only) |
chroma_server_thread_pool_size | int | 40 | Thread pool size for synchronous FastAPI tasks |
Client Mode Settings
For connecting to a remote Chroma server:| Setting | Type | Default | Description |
|---|---|---|---|
chroma_server_host | str | None | Hostname of the Chroma server |
chroma_server_http_port | int | None | HTTP port of the Chroma server |
chroma_server_ssl_enabled | bool | False | Enable SSL/TLS for server connections |
chroma_server_ssl_verify | bool|str | None | SSL certificate verification. Can be True, False, or path to CA bundle |
chroma_server_headers | Dict[str, str] | None | Additional HTTP headers to send with requests |
chroma_server_api_default_path | APIVersion | APIVersion.V2 | Default API version path (/api/v1 or /api/v2) |
chroma_server_cors_allow_origins | List[str] | [] | CORS allowed origins (e.g., ["http://localhost:8000"]) |
chroma_http_keepalive_secs | float | 40.0 | HTTP keepalive timeout in seconds |
chroma_http_max_connections | int | None | Maximum number of HTTP connections |
chroma_http_max_keepalive_connections | int | None | Maximum number of keepalive connections |
Server Mode Settings
For embedded or server deployments:| Setting | Type | Default | Description |
|---|---|---|---|
is_persistent | bool | False | Enable persistent storage |
persist_directory | str | "./chroma" | Directory for persistent data |
chroma_memory_limit_bytes | int | 0 | Memory limit in bytes (0 = unlimited) |
chroma_segment_cache_policy | str | None | Cache policy for segments. Only "LRU" is supported |
allow_reset | bool | False | Allow database reset operations (enable only in development) |
Authentication Settings
Client Authentication
| Setting | Type | Default | Description |
|---|---|---|---|
chroma_client_auth_provider | str | None | Client auth provider implementation |
chroma_client_auth_credentials | str | None | Credentials for client authentication |
chroma_auth_token_transport_header | str | None | Header name for auth token (default: "Authorization") |
Server Authentication
| Setting | Type | Default | Description |
|---|---|---|---|
chroma_server_authn_provider | str | None | Server authentication provider |
chroma_server_authn_credentials | str | None | Authentication credentials (mutually exclusive with credentials_file) |
chroma_server_authn_credentials_file | str | None | Path to credentials file |
chroma_server_authz_provider | str | None | Server authorization provider |
chroma_server_authz_config | str | None | Authorization config (mutually exclusive with config_file) |
chroma_server_authz_config_file | str | None | Path to authorization config file |
chroma_overwrite_singleton_tenant_database_access_from_auth | bool | False | Override tenant/database access from auth provider |
Telemetry Settings
| Setting | Type | Default | Description |
|---|---|---|---|
anonymized_telemetry | bool | True | Send anonymous usage telemetry |
chroma_product_telemetry_impl | str | "chromadb.telemetry.product.posthog.Posthog" | Product telemetry implementation |
chroma_otel_collection_endpoint | str | "" | OpenTelemetry collection endpoint |
chroma_otel_service_name | str | "chromadb" | Service name for OpenTelemetry |
chroma_otel_collection_headers | Dict[str, str] | {} | Headers for OpenTelemetry collector |
chroma_otel_granularity | str | None | Tracing granularity: "none", "operation", "operation_and_segment", "all" |
Migration Settings
| Setting | Type | Default | Description |
|---|---|---|---|
migrations | Literal["none", "validate", "apply"] | "apply" | Migration mode: none (skip), validate (check only), apply (auto-apply) |
migrations_hash_algorithm | Literal["md5", "sha256"] | "md5" | Hash algorithm for migration verification (set once, cannot change) |
Distributed Chroma Settings
For distributed/production deployments:| Setting | Type | Default | Description |
|---|---|---|---|
chroma_coordinator_host | str | "localhost" | Coordinator service hostname |
chroma_server_grpc_port | int | None | gRPC port for system database |
chroma_sysdb_impl | str | "chromadb.db.impl.sqlite.SqliteDB" | System database implementation |
chroma_producer_impl | str | "chromadb.db.impl.sqlite.SqliteDB" | Producer implementation |
chroma_consumer_impl | str | "chromadb.db.impl.sqlite.SqliteDB" | Consumer implementation |
chroma_segment_manager_impl | str | "chromadb.segment.impl.manager.local.LocalSegmentManager" | Segment manager implementation |
chroma_segment_directory_impl | str | "chromadb.segment.impl.distributed.segment_directory.RendezvousHashSegmentDirectory" | Segment directory implementation |
chroma_segment_directory_routing_mode | RoutingMode | RoutingMode.ID | Routing mode: node or id |
chroma_memberlist_provider_impl | str | "chromadb.segment.impl.distributed.segment_directory.CustomResourceMemberlistProvider" | Memberlist provider for distributed routing |
chroma_executor_impl | str | "chromadb.execution.executor.local.LocalExecutor" | Query executor implementation |
chroma_query_replication_factor | int | 2 | Replication factor for queries |
chroma_logservice_host | str | "localhost" | Log service hostname |
chroma_logservice_port | int | 50052 | Log service port |
worker_memberlist_name | str | "query-service-memberlist" | Name of worker memberlist |
Rate Limiting & Quotas
| Setting | Type | Default | Description |
|---|---|---|---|
chroma_quota_provider_impl | str | None | Quota provider implementation |
chroma_quota_enforcer_impl | str | "chromadb.quota.simple_quota_enforcer.SimpleQuotaEnforcer" | Quota enforcer implementation |
chroma_rate_limiting_provider_impl | str | None | Rate limiting provider implementation |
chroma_rate_limit_enforcer_impl | str | "chromadb.rate_limit.simple_rate_limit.SimpleRateLimitEnforcer" | Rate limit enforcer implementation |
chroma_async_rate_limit_enforcer_impl | str | "chromadb.rate_limit.simple_rate_limit.SimpleAsyncRateLimitEnforcer" | Async rate limit enforcer |
gRPC Timeouts
| Setting | Type | Default | Description |
|---|---|---|---|
chroma_logservice_request_timeout_seconds | int | 3 | Log service request timeout |
chroma_sysdb_request_timeout_seconds | int | 3 | System database request timeout |
chroma_query_request_timeout_seconds | int | 60 | Query request timeout |
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