Chroma
What is Chroma?
Chroma is a lightweight open-source vector database with a simple HTTP API, handy for semantic-search and RAG (retrieval-augmented generation) prototypes where you want something simpler to operate than Weaviate or Qdrant.
Start Chroma
docker compose up -d chroma
Stop Chroma
docker compose stop chroma
This stops the container without deleting your data (kept in the chroma Docker volume). To remove the container: docker compose rm -f chroma.
Configuration
All settings live in chroma/defaults.env and can be overridden by adding the same line to your own .env:
| Variable | Default | What it does |
|---|---|---|
CHROMA_VERSION | latest | Image tag from the chromadb/chroma Docker Hub image. |
CHROMA_HOST_PORT | 8001 | Host-side port mapped to the Chroma HTTP API (container port 8000). |
Data persists in the chroma named Docker volume at /data across restarts.
Connect
The API is at http://localhost:8001 from your host. Heartbeat check: /api/v2/heartbeat. From another container, use http://chroma:8000, note the internal port is 8000, different from the host-mapped 8001.
Common issues
- Confusing host vs container port. The container listens on
8000internally;CHROMA_HOST_PORT(8001) is only the host-side mapping. From other containers, always use port8000. - Data disappeared after recreating the container. Data lives in the
chromanamed volume; runningdocker compose down -v(which removes volumes) rather thandocker compose downwipes it. - Port already in use on your host. Change
CHROMA_HOST_PORTin.envand restart:docker compose up -d chroma. - App can't connect but the container is running. Use the container name
chroma, notlocalhost, from inside another container.
Comparing vector databases? See Qdrant and Weaviate. New to Laradock? Start with Getting Started.