Self-hosting Chroma the easy way

Self-hosting Chroma the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
7 min

Chroma is the open-source vector database built for AI applications. It handles embeddings, semantic search, and retrieval out of the box, making it a popular choice for RAG pipelines, chatbots, and recommendation systems. Managed vector database services can get expensive quickly, especially as your data grows.

Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get Chroma up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy Chroma >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's Chroma preset. Here's what it includes:

  • Official chromadb/chroma Docker image (version 1.5.9)
  • Persistent storage mounted to /data so your embeddings survive restarts
  • IS_PERSISTENT set to TRUE for durable storage mode
  • HTTP health check via /api/v2/heartbeat
  • Listening on port 8000
  • Telemetry disabled by default

Chroma exposes a REST API, so once deployed you can immediately start creating collections and adding embeddings from any language or framework that speaks HTTP.

Next steps

After deployment, access Chroma using the domain Sliplane provides (e.g. chroma-xxxx.sliplane.app). Chroma does not have a web UI by default - it's an API-first database. You interact with it via the REST API or one of the official client libraries.

Connecting to Chroma

Use the Python client to connect:

import chromadb

client = chromadb.HttpClient(host="chroma-xxxx.sliplane.app", port=443, ssl=True)
collection = client.get_or_create_collection("my-collection")

Or use the JavaScript client:

import { ChromaClient } from "chromadb";

const client = new ChromaClient({ path: "https://chroma-xxxx.sliplane.app" });
const collection = await client.getOrCreateCollection({ name: "my-collection" });

Replace chroma-xxxx.sliplane.app with your actual Sliplane domain.

Environment variables

Here are some useful environment variables you can customize in your Sliplane service settings:

VariableDefaultDescription
IS_PERSISTENTTRUEEnable persistent storage
PERSIST_DIRECTORY/dataWhere Chroma stores data
CHROMA_SERVER_AUTHN_PROVIDER(none)Set to chromadb.auth.token_authn.TokenAuthenticationServerProvider to enable token auth
CHROMA_SERVER_AUTHN_CREDENTIALS(none)The auth token when token auth is enabled
ANONYMIZED_TELEMETRYFALSESet to TRUE to re-enable telemetry

Enabling authentication

By default, Chroma runs without authentication. For production use, you should enable token-based auth by adding these environment variables in your Sliplane service settings:

VariableValue
CHROMA_SERVER_AUTHN_PROVIDERchromadb.auth.token_authn.TokenAuthenticationServerProvider
CHROMA_SERVER_AUTHN_CREDENTIALSyour-secret-token

Then pass the token in your client:

client = chromadb.HttpClient(
    host="chroma-xxxx.sliplane.app",
    port=443,
    ssl=True,
    headers={"Authorization": "Bearer your-secret-token"}
)

Logging

Chroma logs to STDOUT by default, which works well with Sliplane's built-in log viewer. For general Docker log tips, check out our post on how to use Docker logs.

Cost comparison

You can also self-host Chroma with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

What is Chroma used for?

Chroma is a vector database designed for AI applications. It stores embeddings (vector representations of text, images, or other data) and lets you perform fast similarity searches. Common use cases include retrieval-augmented generation (RAG), semantic search, recommendation engines, and chatbot memory. If you're building anything with LLMs that needs to search through documents, Chroma is a solid choice. It pairs well with tools like Langflow or AnythingLLM.

How do I configure authentication?

By default, Chroma runs without authentication. To enable token-based auth, set CHROMA_SERVER_AUTHN_PROVIDER to chromadb.auth.token_authn.TokenAuthenticationServerProvider and set CHROMA_SERVER_AUTHN_CREDENTIALS to a secret token of your choice. Then pass this token in the Authorization header when connecting with a client. See the Enabling authentication section above for details.

How do I update Chroma?

Change the image tag in your Sliplane service settings and redeploy. Check Docker Hub for the latest stable version. Your data is stored on a persistent volume, so it will survive the update.

Are there alternatives to Chroma?

Yes. Qdrant is another popular open-source vector database with a strong focus on performance and filtering. Weaviate offers built-in vectorization modules. Milvus is designed for large-scale production workloads. If you just need basic vector search, some traditional databases like PostgreSQL (with pgvector) also support it.

Can I use Chroma with other AI tools on Sliplane?

Absolutely. You can run Chroma alongside other AI services on the same Sliplane server. For example, pair it with Langflow for visual AI workflow building, or connect it to Open WebUI for a chat interface with RAG capabilities. Since all services on the same server share an internal network, you can connect them using internal hostnames like chroma.internal:8000.

Self-host Chroma now - It's easy!

Sliplane gives you everything you need to run Chroma without server hassle.