Skip to content
Support Postgres extensions

2 years ago

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

34 Replies

2 years ago

Great one


wpsoul

2 years ago

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


joggienl

2 years ago

Yes, postgis!


nmetsare

2 years ago

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


2 years 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

a year ago

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


yyuyulm

a year 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

a year ago

Any updates on this, especially for pg_vector?


a year 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 • about 1 year ago


Status changed to In Progress ray-chen • about 1 year ago


a year 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 🙇


rohianon

a year ago

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


pbronez

a year 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

a year ago

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


jorgt

a year ago

timescale would be great


fauzifadhi

a year 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

a year ago

postgis!!


therobotcarlson

a year ago

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


Anonymous

a year ago

any update on this?


markwitt1

a year ago

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


xanderclaessens

a year ago

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


10 months ago

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


8 months ago

pgcron


fauzifadhi

8 months ago

we have HA and postgres. 18 nice team.

so we are now install the exension like postgis?


coppa

8 months ago

pgcron


sadrok

8 months ago

Also wanted pgcron


Anonymous

6 months ago

Supabase has a well supported extension https://github.com/supabase/pg%5Fjsonschema. This would be great to enable json validation, ensuring data guarantees for json and jsonb values


karan316

6 months ago

If anyone is interested - I've created a PostgreSQL template that includes the popular extensions like pgvector, postgis, pg_cron and many more. You can configure it using an environment variable EXTENSIONS as a list of values (eg. EXTENSIONS="pgvector, postgis"). Everything is is handled by the image.

https://railway.com/deploy/postgresql-extensions?referralCode=URrxaF&utm_medium=integration&utm_source=template&utm_campaign=generic


testuser123

Great one

Anonymous

5 months ago

YH


testuser123

Great one

Anonymous

5 months ago

YH


testuser123

Great one

Anonymous

5 months ago

YH


francois-egner

4 months ago

I need PostGIS baked into the native Postgres solution. Custom templates are not sufficient for serious/high quality database usage without PITR and HA. Sadly those two options are just available via the official Postgres service.

So please add it :)


char-perc

4 months ago

pg-boss please


3 months ago

It seems a lot of these functions are now installable. However PostGIS is a deal breaker for me and is not available. Any word on when we can get it added to the base image at least for PG 18?


coppa

pgcron

coppa

21 days ago

up

Please add pg_cron


Welcome!

Sign in to your Railway account to join the conversation.

Loading...