Chroma or VecturaDB on a Google Cloud VM

One server in your own Google Cloud project, with its data on a disk of its own, HTTPS, allowed IP addresses and snapshots. From about 13 USD a month on your Google Cloud bill.

Disclaimer. This template and its scripts are provided as is, without warranty of any kind, as stated in the Apache License 2.0. The numbers on this page are what we measured on 5 and 6 November 2026 in europe-west1: your region, sizes, data and versions may behave differently. You are responsible for your data: back it up, and test a restore on a copy before you rely on it.

Not sure about your case? Open an issue in the VecturaDB repository, describe your data and your setup, and we will take a look on a best-effort basis.

What it creates

The template runs one of two servers:

Both keep the Chroma API: the Chroma clients connect with the url output. In our tests the Python client (chromadb 1.5.9) worked over HTTPS with both servers.

ResourceNotes
Compute Engine VM, Ubuntu 24.04Docker runs the server; Caddy serves HTTPS in front of it
Data disk, pd-balancedMounted at /var/lib/chroma; 16 GB by default
VPC, subnet and firewall rules10.42.0.0/24; the rules open only what the access mode needs
Static external IP addressThe address for HTTPS, and the way out to the package and image registries
Service account of the VMNo role in the project; it may read only the secret of the API key
Snapshot scheduleOnly with backups on: snapshots of the data disk
Secret Manager secretOnly VecturaDB with an API key

Deploy

Open in Cloud Shell

Google Cloud has no form that creates a deployment from a link. The button opens Cloud Shell, the terminal of the Google Cloud console, with the template of the tag gcp-v1.1.1 and a guide on the side, which runs Terraform step by step.

  1. Google asks to confirm the clone of the repository. Without “Trust repo”, Cloud Shell is temporary: its files are deleted at the end of the session, and it has no credentials until the guide signs you in. If Google asks to authorize Cloud Shell when it opens, it is not needed: click outside it to close it, the guide signs you in. In a temporary Cloud Shell gcloud auth login first says that you are already authenticated: answer Y.
  2. The guide turns on the APIs that the template uses, installs Terraform, and creates a Cloud Storage bucket for the state of Terraform, <project id>-chroma-tfstate, with versioning and without public access.
  3. You give the IP address of your computer, then terraform apply creates everything. The settings file goes to the bucket too, next to the state.

To change a setting or delete the deployment later, open the guide again: it gets the state and the settings back from the bucket.

In our testsTime
Deployment from zero, until the server answered over HTTPS376-626 s
Terraform installed in Cloud Shellabout 40 s

Most of the creation is the first boot of the VM, which installs Docker and Caddy from the package repositories, so its time depends on them. In the test of 626 seconds the first boot took 6 minutes 29 seconds, and the list of the Ubuntu packages alone 2 minutes 6 seconds.

With Terraform 1.11 or later on your computer:

cd gcp/vm
gcloud services enable compute.googleapis.com iam.googleapis.com secretmanager.googleapis.com storage.googleapis.com
gcloud storage buckets create gs://<bucket> --location=europe-west1 --uniform-bucket-level-access --public-access-prevention
terraform init -backend-config=bucket=<bucket> -backend-config=prefix=chroma
export TF_VAR_project_id=<project id>
terraform apply -parallelism=2 -var-file=chroma.tfvars -var 'allowed_ip_ranges=["203.0.113.10/32"]'

For VecturaDB with an API key, use vecturadb.tfvars and export TF_VAR_api_key=<your key> first. The template and its README are in the VecturaDB.Deploy repository, under gcp/vm.

The commands run Terraform with two operations at a time: in our tests from Cloud Shell, with the default of 10, 5 plans out of 11 failed with a refused connection to the Google APIs, and with 2 none out of 11.

Access and HTTPS

AccessWhat is openAddress
Allowed IP addresses443 from your IP ranges; 80 for the certificate onlyhttps://, with the external IP or your domain
Public443 and 80 from anywhere; VecturaDB with an API key onlyhttps://
InternalNothing from the internet; port 8000 inside the VPChttp://, on the private address

Cost

The sizes of the template, with the list prices of europe-west1 in USD for 730 hours a month, on 4 November 2026:

SizeCPU, memoryVMBoot disk 10 GBData disk 16 GBExternal IPTotal a month
e2-micro (default)2 shared vCPU, 1 GB6.731.001.603.6512.98
e2-small2 shared vCPU, 2 GB13.451.001.603.6519.70
e2-medium2 shared vCPU, 4 GB26.911.001.603.6533.16

Backups and restore

Restore

In the folder of the template, after terraform init with the same bucket and folder:

gcloud compute snapshots list --filter="labels.chroma-backup=chroma"
./restore.sh <snapshot name>

restore.sh creates a disk from the snapshot and attaches it to the VM. Then the agent of the VM stops the server, replaces the data with the data of the snapshot, and starts the server again. In the end the script detaches and deletes the disk. The data written after the snapshot is lost: take a snapshot first if you may want it back. The data disk stays the same, so the snapshots go on.

In our testsTime
Snapshot by hand32-48 s
Disk from the snapshot23-26 s
Attach6-20 s
Copy on the VM, until the server answers7-9 s
Detach and delete8-10 s

With Chroma 1.5.9 and with VecturaDB 1.0.0-preview.8, after each restore the server held all the collections of the snapshot, also the one written right before it.

Updates

In our tests a switch from Chroma 1.5.9 to VecturaDB with an API key took 25 seconds, and VecturaDB read the collections written by Chroma.

Delete everything

terraform destroy deletes the VM, the data disk, the network, the IP address, the service account and the secret. The snapshots stay: delete them after the VM, so that no new snapshot comes after the cleanup. Then delete the state and the settings in the bucket. The last step of the guide has the same commands.

terraform destroy -parallelism=2 -var-file=chroma.tfvars && for s in $(gcloud compute snapshots list --filter="labels.chroma-backup=chroma" --format="value(name)" --verbosity=error); do gcloud compute snapshots delete $s --quiet; done && gcloud storage rm --recursive --all-versions gs://$BUCKET/chroma

In our tests terraform destroy took 99-141 seconds from a computer; afterwards nothing of the deployment was left in the project.

Limits

VecturaDB is an independent fork of Chroma, under the Apache License 2.0. The original code is copyright Chroma Inc. and its contributors.

Not affiliated with, endorsed by or sponsored by Chroma Inc. CHROMA is a registered trademark of Chroma Inc., used here only to describe compatibility.