Additional Installation Methods
Docker
Get the Docker image with:
docker pull pgvector/pgvector:pg17-trixie
This adds pgvector to the Postgres image (replace 17 with your Postgres server version, and run it the same way).
Supported tags are:
pg17-trixie,0.8.1-pg17-trixiepg17-bookworm,0.8.1-pg17-bookworm,pg17,0.8.1-pg17pg16-trixie,0.8.1-pg16-trixiepg16-bookworm,0.8.1-pg16-bookworm,pg16,0.8.1-pg16pg15-trixie,0.8.1-pg15-trixiepg15-bookworm,0.8.1-pg15-bookworm,pg15,0.8.1-pg15pg14-trixie,0.8.1-pg14-trixiepg14-bookworm,0.8.1-pg14-bookworm,pg14,0.8.1-pg14pg13-trixie,0.8.1-pg13-trixiepg13-bookworm,0.8.1-pg13-bookworm,pg13,0.8.1-pg13
You can also build the image manually:
git clone --branch v0.8.1 https://github.com/pgvector/pgvector.git
cd pgvector
docker build --pull --build-arg PG_MAJOR=17 -t myuser/pgvector .
If you increase maintenance_work_mem, make sure --shm-size is at least that size to avoid an error with parallel HNSW index builds.
docker run --shm-size=1g ...
Homebrew
With Homebrew Postgres, you can use:
brew install pgvector
Note: This only adds it to the postgresql@17 and postgresql@14 formulas
PGXN
Install from the PostgreSQL Extension Network with:
pgxn install vector
APT
Debian and Ubuntu packages are available from the PostgreSQL APT Repository. Follow the setup instructions and run:
sudo apt install postgresql-17-pgvector
Note: Replace 17 with your Postgres server version
Yum
RPM packages are available from the PostgreSQL Yum Repository. Follow the setup instructions for your distribution and run:
sudo yum install pgvector_17
# or
sudo dnf install pgvector_17
Note: Replace 17 with your Postgres server version
pkg
Install the FreeBSD package with:
pkg install postgresql17-pgvector
or the port with:
cd /usr/ports/databases/pgvector
make install
conda-forge
With Conda Postgres, install from conda-forge with:
conda install -c conda-forge pgvector
This method is community-maintained by @mmcauliffe
Postgres.app
Download the latest release with Postgres 15+.