Skip to content

Instantly share code, notes, and snippets.

@timothycarambat
Created November 22, 2023 00:31
Show Gist options
  • Save timothycarambat/754969f00b9815459153ff4f66a5910f to your computer and use it in GitHub Desktop.
Save timothycarambat/754969f00b9815459153ff4f66a5910f to your computer and use it in GitHub Desktop.
Boot ChromaDB docker instance with persistence and an API key
docker run \
-p 8000:8000 \
-e CHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER="chromadb.auth.token.TokenConfigServerAuthCredentialsProvider" \
-e CHROMA_SERVER_AUTH_PROVIDER="chromadb.auth.token.TokenAuthServerProvider" \
-e CHROMA_SERVER_AUTH_CREDENTIALS="new-token" \ # This is your API token once container boots
-e CHROMA_SERVER_AUTH_TOKEN_TRANSPORT_HEADER="X_CHROMA_TOKEN" \
-v /your/path/to/persistence/:/chroma/chroma \ # `/your/path/to/persistence` should be folder on host machine you want to write storage too for Chroma persistence between containers.
chromadb/chroma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment