Support Postgres extensions

https://github.com/railwayapp-templates/postgres-ssl/issues/17

Our Postgres templates currently do not support Postgres extensions.

We use the base debian-flavored official Postgres images, and each extension has an extra install step for the package and and init step for to bootstrap the extension on the Postgres instance. Typically, it's:

apt-get install postgresql-${MAJ_VERSION}-pgvector
psql -c 'CREATE EXTENSION IF NOT EXISTS vector;'

If we want to bake an extension in, we'll need to ensure we install the extension on the image first.

We also don't want to bake all requested extensions in, so ideally we have a way for users to specify what extensions they want from a list of officially supported ones, and a sane way to do that (ex: RAILWAY_PG_EXTENSIONS variable).

If you'd like to see an extension, please leave a comment here!

In Progress

1 Thread mentions this feature

21 Replies

a year ago

Great one


wpsoul
HOBBY

a year ago

I have same problem. Currently I don't know how to add extensions so I can't use Postgres from railway


joggienl
HOBBY

a year ago

Yes, postgis!


nmetsare
HOBBY

a year ago

pg_vector please - there's a container in marketplace with pg_vector installed, but it doesn't support SSL


a year ago

idk why we dont have this already, sure I can learn build it myself but surely there must be a easier way for (less experience) guy


nhc
PRO

9 months ago

pgmq for queues like supabase do. https://github.com/pgmq/pgmq


yyuyulm
HOBBY

9 months ago

this would be great because now one have to switch to a new image when decide to add a new extension. also custom postgres image does not have the table preview and other admin functionality...


fehmisener
FREE

8 months ago

Any updates on this, especially for pg_vector?


6 months ago

This is live (in priority boarding)! Let us know what you think

https://railway.com/changelog/2025-08-15-better-databases


Status changed to Completed jake 6 months ago


Status changed to In Progress ray-chen 6 months ago


6 months ago

Moving this back to In Progress because what we have only supports extensions that are installed - for third-party extensions such as pgvector, etc. that require additional dependencies/image modifications, they cannot be installed via the UI currently. We'll work on adding support for that bow emoji


rohianon
PRO

6 months ago

Can't wait to see this coming. Particularly eager to see pgvector + postgis together on the fly.


pbronez
HOBBY

6 months ago

The new hstore extension support allowed me to deploy Miniflux. I wrote up a detailed feedback post about my experience with the database feature on my first Railway project.


anthony-michel
PRO

6 months ago

Would love to have that, trying to get supabase vault extension in to migrate a bunch of DBs to Railway


jorgt
PRO

6 months ago

timescale would be great


fauzifadhi
PRO

5 months ago

for me, if you guys cant provide the combination of extension like postgis + vector + etc. please give us the base postgres image that we can extend easily to install the extension, like fill in the blank at the documentation.


Anonymous
PRO

4 months ago

postgis!!


therobotcarlson
PRO

4 months ago

+1 to pgvector - this would be an awesome addition to the already awesome PG flow.


thejufo
HOBBY

4 months ago

any update on this?


markwitt1
PRO

3 months ago

+1 to pgvector. Should be quite simple to add.


xanderclaessens
HOBBY

2 months ago

Would be nice to also have pgvector in the HA postgres cluster.


a month ago

any chance we get the postgis extension or any extension that handles coordinates?


Loading...