immich-vectorchord-db-unofficial

immich-vectorchord-db-unofficial

Docker app from rorar's Repository

Overview

EXPERIMENTAL: PostgreSQL 18.3 with VectorChord 1.1.1 and pgvector 0.8.2 for Immich. VectorChord is the successor to pgvecto.rs and uses RaBitQ compression for efficient vector search. Immich uses these extensions for face recognition (face_index) and CLIP-based image search (clip_index). This image uses the official TensorChord image with an optimized PostgreSQL configuration (based on Immich defaults: 512MB shared_buffers, SSD-optimized I/O parameters). SSD vs HDD: This template ships with SSD-tuned settings (effective_io_concurrency=200, random_page_cost=1.2). If your database runs on an HDD, edit the Post Arguments and remove these two parameters to use PostgreSQL defaults. Note: The official Immich image is ghcr.io/immich-app/postgres – this template uses the latest VectorChord version directly from TensorChord instead. Watch the Immich base-images repo for configuration updates: SSD config: https://github.com/immich-app/base-images/blob/main/postgres/postgresql.ssd.conf HDD config: https://github.com/immich-app/base-images/blob/main/postgres/postgresql.hdd.conf Version matrix: https://github.com/immich-app/base-images/blob/main/postgres/versions.yaml

VectorChord

Ready for the Billion-Scale Era. Host 100M vectors on a single i4i.xlarge ($247/mo) and scale seamlessly to 1B+.

Official Site · Blog · Docs · Feedback · Contact Us

VectorChord (vchord) is a PostgreSQL extension engineered for scalable, high-performance, and cost-effective vector search.

To efficiently store vectors while preserving search quality, VectorChord applies RaBitQ[^1] compression together with autonomous reranking. With VectorChord, you can store 400,000 vectors for just $1, enabling significant savings: 6x more vectors compared to Pinecone's optimized storage and 26x more than pgvector/pgvecto.rs for the same price.

[^1]: Gao, Jianyang, and Cheng Long. "RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search." Proceedings of the ACM on Management of Data 2.3 (2024): 1-27.

Features

VectorChord introduces remarkable enhancements over pgvecto.rs and pgvector:

💰 Affordable Vector Search: Host 100M × 768-dimensional vectors → AWS i4i.xlarge ($247/month)[^2], host 1B × 96-dimensional vectors → i7ie.6xlarge ($2246/month)[^3], helping you keep infrastructure costs down while maintaining competitive search quality.

[^2]: Please check out our blog post for more details. [^3]: Please check out our blog post for more details.

⚡ Accelerated Index Build: Index 100 million vectors in just 20 minutes. Powered by hierarchical K-means and highly optimized disk operations, VectorChord eliminates the bottleneck of vector indexing on a single machine with limited hardware resources.

[^4]: Please check out our blog post for more technique details and document for usages.

📈 Smoothly Scale Up: Scale with confidence as your data grows. Through dimensionality reduction and sampling[^5], VectorChord effectively controls memory growth, enabling 1B-vector indexes to be built on machines with 128GB of memory in practice.

[^5]: Please check out our blog post for more technique details and document for usages.

🔌 Seamless Integration: Fully compatible with pgvector data types and syntax while providing optimal defaults out of the box - no complex parameter tuning needed. Just drop in VectorChord for enhanced experience.

💾 Efficient Storage with Low-Bit Data type: Drastically reduce storage costs with our native 4-bit (RaBitQ4) and 8-bit (RaBitQ8) vector types. Achieve massive space savings without compromising search quality—RaBitQ8 maintains high precision with <1% recall loss.

Quick Start

For new users, we recommend using the Docker image to get started quickly. If you do not prefer Docker, please read installation guide for other installation methods.

docker run \
  --name vectorchord-demo \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -p 5432:5432 \
  -d ghcr.io/tensorchord/vchord-postgres:pg18-v1.1.1

[!NOTE] In addition to the base image with the VectorChord extension, we provide an all-in-one image, tensorchord/vchord-suite:pg17-latest. This comprehensive image includes all official TensorChord extensions, including VectorChord, VectorChord-bm25 and pg_tokenizer.rs . Developers should select an image tag that is compatible with their extension's version, as indicated in the support matrix.

Then you can connect to the database using the psql command line tool. The default username is postgres, and the default password is mysecretpassword.

psql -h localhost -p 5432 -U postgres

Now you can play with VectorChord!

VectorChord depends on pgvector, including the vector representation. Since you can use them directly, your application can be easily migrated without pain!

CREATE EXTENSION IF NOT EXISTS vchord CASCADE;

Similar to pgvector, you can create a table with vector column and insert some rows to it.

CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
INSERT INTO items (embedding) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);

With VectorChord, you can create vchordrq indexes.

CREATE INDEX ON items USING vchordrq (embedding vector_l2_ops);

And then perform a vector search using SELECT ... ORDER BY ... LIMIT ....

SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;

For more usage, please read:

License

This software is licensed under a dual license model:

  1. GNU Affero General Public License v3 (AGPLv3): You may use, modify, and distribute this software under the terms of the AGPLv3.

  2. Elastic License v2 (ELv2): You may also use, modify, and distribute this software under the Elastic License v2, which has specific restrictions.

You may choose either license based on your needs. We welcome any commercial collaboration or support, so please email us vectorchord-inquiry@tensorchord.ai with any questions or requests regarding the licenses.

Install immich-vectorchord-db-unofficial on Unraid in a few clicks.

Find immich-vectorchord-db-unofficial in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for immich-vectorchord-db-unofficial Review the template variables and paths Click Install

Requirements

Database files must reside on locally attached storage (SSD/NVMe), not on a remote-mounted filesystem (e.g. NFS/SMB from another machine). Used as the database backend for Immich. Full setup guide: https://rorar.github.io/immich-unraid-manual/

Download Statistics

213,435
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
tensorchord/vchord-postgres:pg18-v1.1.1
Last Updated2026-02-28
First Seen2026-07-01

Runtime arguments

Network
immich_internal
Shell
bash
Privileged
false
Extra Params
--shm-size=128m --health-cmd="pg_isready -U postgres" --health-interval=10s --health-retries=5 --health-start-period=30s --health-timeout=5s

Template configuration

--- Database ---Variable

Core PostgreSQL settings for Immich.

POSTGRES_USERVariable

Database username

Default
postgres
Value
postgres
POSTGRES_PASSWORDVariable

Database password – please change! Use only A-Za-z0-9, no special characters. Generate a secure one in the Unraid terminal: openssl rand -base64 32 | tr -dc A-Za-z0-9 | head -c 32

Default
postgres
Value
postgres
POSTGRES_DBVariable

Database name

Default
immich
Value
immich
POSTGRES_INITDB_ARGSVariable

Arguments for initdb. --data-checksums enables checksums for data integrity.

Default
--data-checksums
Value
--data-checksums
Port: PostgreSQLPorttcp

PostgreSQL database port (5432)

Target
5432
Default
5432
Value
5432
Path: DB DataPathrw

Persistent database data directory. PG 18+ stores data in a version-specific subdirectory (18/docker). Must be on locally attached storage (SSD/NVMe), not a remote filesystem.

Target
/var/lib/postgresql
Default
/mnt/user/appdata/immich-vectorchord-db/
Value
/mnt/user/appdata/immich-vectorchord-db/
--- System ---Variable

Timezone and permissions.

Variable: TZVariable

Timezone. See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List

Target
TZ
Default
Europe/Berlin
Value
Europe/Berlin
Variable: PUIDVariable

User ID (default: 99 for nobody)

Target
PUID
Default
99
Value
99
Variable: PGIDVariable

Group ID (default: 100 for users)

Target
PGID
Default
100
Value
100