Deploy pgvector
pgvector 0.8.7 [Dec '26] | Postgres 18 Vector DB (AI Embeddings, RAG)
Postgres
Just deployed
/var/lib/postgresql
Deploy and Host
Deploy PostgreSQL 18 with pgvector 0.8.7 on Railway, from the pgvector project's official image. One service, the database alone, zero input at deploy. The image is the stock pgvector build (pgvector/pgvector:pg18, floating tag), so a deploy picks up the newest pgvector on the PG18 line.
About Hosting
The database runs as a single Railway service with a persistent volume at /var/lib/postgresql. Connect from another service in the same project with DATABASE_URL (also exposed as PGURL), or from outside Railway with DATABASE_PUBLIC_URL through the TCP proxy on port 5432. After deploy, run CREATE EXTENSION vector in your application database, then create a vector column and query it.
Why Deploy
You need vector search in Postgres without running a second service or wiring an extension yourself. pgvector is built into the image, so one CREATE EXTENSION and you can create a vector column and run nearest-neighbour queries. The image tag floats on the PG18 line, so new pgvector releases on PG18 arrive automatically.
Common Use Cases
- Semantic search over embeddings from your app
- Retrieval-augmented generation (RAG) backing store for an LLM app
- Recommendations and similarity search
- Any Postgres workload that needs a vector column alongside relational data
Dependencies for
This is a database only. It has no app code and no dependencies of its own. Your app connects with DATABASE_URL over the private network, or DATABASE_PUBLIC_URL from outside Railway.
Honest scope
- Single node. No replication, high availability, or failover.
- No backups in this template. The volume keeps data across redeploys, but a deleted volume is gone.
- No TLS: the stock image serves plain connections. Put the database behind your app's private network, or front it yourself if you need encryption.
- The vector extension is not created automatically. Run CREATE EXTENSION vector once after deploy.
- No major-version auto upgrade. Moving to a future major version is a dump and restore.
- Version: PostgreSQL 18, pgvector 0.8.7 (floating pg18 tag). When pgvector 0.9.0 lands on the PG18 line, new deploys pick it up automatically.
- Live-tested: a fresh Railway deploy from this draft passed 2026-11-30 (PostgreSQL 18.7, pgvector 0.8.7, extension created, nearest-neighbour query correct, rows survived a restart), test project deleted after.
Template Content
Postgres
pgvector/pgvector:pg18