Skip to main content
Chroma can also be configured to run in client/server mode. In this mode, the Chroma client connects to a Chroma server running in a separate process. To start the Chroma server, run the following command:
chroma run --path /db_path
Then use the Chroma HttpClient to connect to the server:
import chromadb

chroma_client = chromadb.HttpClient(host='localhost', port=8000)
That’s it! Chroma’s API will run in client-server mode with just this change.Chroma also provides the async HTTP client. The behaviors and method signatures are identical to the synchronous client, but all methods that would block are now async. To use it, call AsyncHttpClient instead:
import asyncio
import chromadb

async def main():
    client = await chromadb.AsyncHttpClient()

    collection = await client.create_collection(name="my_collection")
    await collection.add(
        documents=["hello world"],
        ids=["id1"]
    )

asyncio.run(main())
If you deploy your Chroma server, you can also use our http-only package.