Deploy PostgreSQL Extensions
PostgreSQL + pgvector, postgis, pg_trgm, pgmq, pg_cron, pgcrypto and more.
karan316/postgres-extensions
Just deployed
Deploy and Host PostgreSQL Extensions on Railway
PostgreSQL Extensions is a production-ready PostgreSQL 18 Docker image with 11 popular extensions pre-installed including pgvector, PostGIS, pgmq, pg_cron, and more. Enable any combination at deploy time with a single environment variable. No compilation, no manual setup.
About Hosting PostgreSQL Extensions
Hosting PostgreSQL with extensions typically requires compiling C libraries from source, managing shared library paths, configuring shared_preload_libraries, and ensuring extensions are created in the right databases. This template handles all of that automatically. Extensions are pre-compiled into the image, and a lightweight entrypoint script validates your selection, configures preloaded libraries, and runs CREATE EXTENSION IF NOT EXISTS on boot. SSL is enabled by default with auto-generated certificates. Just set the EXTENSIONS environment variable and deploy.
Common Use Cases
- AI/ML applications using pgvector for vector similarity search and embeddings storage (RAG, recommendations)
- Location-aware apps using PostGIS for geospatial queries (nearby search, geofencing)
- Background job scheduling with pg_cron (cleanup tasks, report generation, data aggregation)
- Event-driven architectures using pgmq as a lightweight message queue directly in PostgreSQL
- Full-text fuzzy search with pg_trgm for typo-tolerant autocomplete and search
- Time-series data with pg_partman for automated table partitioning and retention policies
Dependencies for PostgreSQL Extensions Hosting
- Docker (the image is hosted on GitHub Container Registry at
ghcr.io/karan316/postgres-extensions) - A persistent volume mounted at
/var/lib/postgresql
Deployment Dependencies
- PostgreSQL 18 Documentation
- pgvector — Vector similarity search
- pgmq — Lightweight message queue
- PostGIS — Geospatial extension
- pg_cron — Job scheduler
- pg_partman — Partition management
- Source Repository
Why Deploy PostgreSQL Extensions on Railway?
Why Deploy PostgreSQL Extensions on Railway?
Railway makes it easy to run PostgreSQL with ease. This template adds the extensions most teams eventually need including vector search, geospatial queries, job scheduling, message queues without maintaining a custom Dockerfile or compiling anything yourself. Set the EXTENSIONS variable, attach a volume, and deploy. Railway handles scaling, networking, and restarts automatically.
Template Content
karan316/postgres-extensions
ghcr.io/karan316/postgres-extensions