Railway

Deploy PostgreSQL

Run PostgreSQL 16 on Railway with Docker, volume-ready defaults.

Deploy PostgreSQL

Just deployed

PostgreSQL for railway.app

Template Header

Deploy PostgreSQL 16 on Railway with the official Docker image.

Deploy on Railway

Environment

VariableRequiredDescription
POSTGRES_PASSWORDYesPassword for the postgres user

Optional

VariableDescription
POSTGRES_USERDefaults to postgres
POSTGRES_DBDefaults to postgres

Persistence

railway.toml declares requiredMountPath = "/var/lib/postgresql/data". Attach a Railway volume to that path before production traffic — Railway will prompt for it based on this setting, but it is not created automatically.

Local

docker build -t railwayapp-postgresql .
docker run --rm -e POSTGRES_PASSWORD=dev -p 5432:5432 railwayapp-postgresql

Airbyte Apache Airflow CodiMD Django Email Service FastAPI Flask Flowise GitLab CE Grafana Home Assistant InfluxDB MongoDB Mosquitto MQTT MySQL n8n Node-RED Node.js OpenSearch PostgreSQL Redis TYPO3 CMS


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
33
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51