PostgreSQL 15
PostgreSQL 15 database with data persistence and TCP Proxy
Postgres-15
railwayapp-templates/postgres-ssl:15
Just deployed
/var/lib/postgresql/data
Overview
PostgreSQL version 15 database service, deployed with Railway's official SSL-enabled image.
-
A volume is mounted to the service to persist data between builds.
-
TCP proxying is configured to allow accessing the database from anywhere.
How to use
Reference the DATABASE_URL
variable from your service to connect to the database in your tool of choice (e.g. ${{Postgres.DATABASE_URL}}
)
Connecting
Connect to the database using the proxied domain and port found on the service settings page. The password can be found on the Variables page.
In a terminal, for example:
psql "postgres://railway:PASSWORD@PROXY_DOMAIN:PROXY_PORT/railway"
Template Content
Postgres-15
ghcr.io/railwayapp-templates/postgres-ssl:15