Levelrail
Skip to content

Self-host pgvector Postgres with Docker ​

PostgreSQL 17 with the pgvector extension preinstalled, for embeddings next to your relational data.

This page describes the Levelrail template for pgvector Postgres (Database Tools). It deploys the services below as one Docker Compose app on your own server.

Project site: https://github.com/pgvector/pgvector.

Recommended memory: about 512 MiB.

Services, ports and volumes ​

ServiceImageContainer portsVolumes
pgvectorpgvector/pgvector:0.8.6-pg17-trixie5432
pgvector_data -> /var/lib/postgresql/data

Environment variables ​

ServiceVariableValue
pgvectorPOSTGRES_DBPreset in the template
pgvectorPOSTGRES_PASSWORDGenerated at deploy
pgvectorPOSTGRES_USERPreset in the template

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

Deploy pgvector Postgres with Levelrail ​

In the dashboard, open Apps, choose New app, then Browse templates, and select pgvector Postgres. Review the Compose body and deploy.

With the CLI:

levelrail-cli templates deploy pgvector --name my-pgvector

See Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.

More Database Tools templates ​

All templates are listed in the self-host gallery.

Released under the Apache 2.0 License.