Ch
Machine Learning Azure

Chroma on Ubuntu 24.04 on Azure User Guide

| Product: Chroma on Ubuntu 24.04 LTS on Azure

Overview

Chroma is the open-source embeddings and vector database used to give AI applications long-term memory and to power retrieval-augmented generation (RAG). It stores documents, their embeddings and metadata, and serves fast similarity search over an OpenAI-style API. The cloudimg image installs Chroma 1.5 in a Python virtual environment at /opt/chroma, fronts it with an nginx reverse proxy on TCP 80, persists all data on a dedicated Azure data disk, and generates a unique password on the first boot of every VM. Backed by 24/7 cloudimg support.

What is included:

  • Chroma 1.5 server in a Python venv at /opt/chroma
  • nginx reverse proxy on :80 in front of the Chroma server (bound to loopback :8000)
  • A dedicated Azure data disk at /var/lib/chroma holding persisted collections, embeddings and indexes — separate from the OS disk and re-provisioned with every VM
  • Per-VM password (CHROMA_PASSWORD) generated at first boot, in a root-only file
  • chroma.service + nginx.service as systemd units, enabled and active
  • 24/7 cloudimg support

Prerequisites

An active Azure subscription, an SSH key pair, and a VNet + subnet in the target region. Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point; scale up for larger collections or higher query volume. NSG inbound: allow 22/tcp from your management network and 80/tcp from the clients that query Chroma (front port 80 with TLS for public exposure — see Enabling HTTPS).

Step 1 — Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Chroma by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size; under Administrator account choose SSH public key and paste your key; under Inbound port rules allow SSH (22) and HTTP (80). Review the dedicated data disk on the Disks tab, then Review + createCreate.

Step 2 — Deploy from the Azure CLI

az vm create \
  --resource-group <your-rg> \
  --name chroma \
  --image <marketplace-image-urn> \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard

az vm open-port --resource-group <your-rg> --name chroma --port 80 --priority 1010

Step 3 — Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 — Confirm the services are running

systemctl is-active chroma.service nginx.service
curl -s http://127.0.0.1/api/v2/heartbeat

Both services report active and the heartbeat endpoint returns a nanosecond timestamp.

Step 5 — Retrieve your password

The password is generated uniquely on the first boot of your VM and written to a root-only file:

sudo cat /root/chroma-credentials.txt

The CHROMA_PASSWORD value is the password; clients authenticate as admin with it.

Step 6 — Connect with the Chroma client

Install the client and connect over HTTP with your password. Replace <vm-public-ip> and <password>:

pip install chromadb

python3 - <<'PY'
import chromadb
from chromadb.config import Settings
client = chromadb.HttpClient(
    host="<vm-public-ip>", port=80,
    settings=Settings(
        chroma_client_auth_provider="chromadb.auth.basic_authn.BasicAuthClientProvider",
        chroma_client_auth_credentials="admin:<password>",
    ),
)
col = client.get_or_create_collection("docs")
col.add(documents=["hello world", "vector databases are great"], ids=["a", "b"])
print(col.query(query_texts=["greeting"], n_results=1))
PY

Collections you create persist on the dedicated data disk at /var/lib/chroma.

Step 7 — Confirm the runtime

/opt/chroma/venv/bin/pip show chromadb | grep ^Version

Enabling HTTPS

For production, terminate TLS at nginx with a real domain pointed at the VM's public IP. Install certbot and request a certificate (replace the domain):

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.com

Backup and maintenance

All Chroma data — collections, embeddings and indexes — lives on the dedicated data disk at /var/lib/chroma. Snapshot that disk in Azure to back up your vector store, and keep the OS patched with sudo apt update && sudo apt upgrade. The server restarts cleanly with sudo systemctl restart chroma.

Support

This image is backed by 24/7 cloudimg support. Contact us by email and chat for help with client integration, collections and indexing, scaling, TLS and backups.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.