Skip to main content
Chroma can be deployed in client-server mode, allowing you to run a persistent Chroma server and connect to it from multiple clients. This is the recommended deployment mode for production applications.

Running the Chroma Server

Using the CLI

The simplest way to run a Chroma server is using the built-in CLI command:
This starts a Chroma server on http://localhost:8000 with default settings.

Configuration Options

Chroma server behavior can be customized using environment variables. Key configuration options from chromadb/config.py:

Server Settings

Memory and Cache Settings

Running with Docker Compose

For production deployments, Docker Compose is recommended:
Save this as docker-compose.yml and run:

Custom Build with Docker

You can also build from source:

Connecting Clients to the Server

Python Client

With SSL/TLS

Custom Headers

Connection Pool Settings

Client API Configuration

The following settings control client behavior:

Verifying the Deployment

Health Check

Version Check

Production Considerations

Security

  1. Enable authentication - See the Authentication guide
  2. Use SSL/TLS - Always use HTTPS in production
  3. Disable reset - Set ALLOW_RESET=FALSE
  4. Configure CORS - Restrict allowed origins

Performance

  1. Adjust thread pool size - CHROMA_SERVER_THREAD_POOL_SIZE based on workload
  2. Enable caching - CHROMA_SEGMENT_CACHE_POLICY=LRU with appropriate memory limits
  3. Persistence - Always enable IS_PERSISTENT=TRUE for production

Monitoring

File Descriptors

For high-load servers, increase the file descriptor limit:

Troubleshooting

Connection Refused

Ensure the server is running and the host/port are correct:

SSL Verification Failures

For self-signed certificates:

Port Already in Use

Change the port in both server and client configuration:

Migration from Embedded Mode

If you’re migrating from embedded Chroma to client-server:
  1. Export your data from embedded client
  2. Start the Chroma server
  3. Import data to the server
  4. Update client code to use HttpClient instead of Client
See the Migration Guide for details.