RailwayDocs

Databases

Railway enables you to deploy and manage databases alongside your applications. Whether you need a quick PostgreSQL instance or want to run a specialized database, Railway's platform primitives allow you to build any database service your system requires.

Getting started

The fastest way to deploy a database is through Railway's database templates:

DatabaseDescription
PostgreSQLThe world's most advanced open source relational database
MySQLPopular open source relational database
RedisIn-memory data store for caching and real-time data
MongoDBDocument-oriented NoSQL database

These templates are maintained by Railway and come pre-configured with sensible defaults.

Deploy any database

Railway isn't limited to the databases above. You can deploy any open source database by using:

  • Docker Images: Deploy any database available as a Docker image
  • Templates: Browse the database and storage templates for pre-configured options
  • Custom Builds: Build your own database service from source code

Explore these community and official templates in the marketplace:

  • All Storage Templates - Browse databases, caches, and storage solutions
  • ClickHouse, CockroachDB, Cassandra, and more
  • Specialized databases like TimescaleDB, InfluxDB, and Neo4j

Platform features

Railway provides essential features for running production databases:

FeatureDescription
VolumesPersistent storage that survives deployments and restarts
TCP ProxyConnect to your database from outside Railway's network
Private NetworkingSecure, low-latency connections between services
BackupsPoint-in-time recovery for your data

Building custom database services

Need to run a database that isn't in the templates marketplace? Check out the guide on building a database service to learn how to configure volumes, networking, and persistence for any database.

Important notes

Railway-provided database templates are unmanaged services - you're responsible for:

  • Configuring backups and disaster recovery
  • Tuning performance for your workload
  • Managing security and access control
  • Monitoring and maintenance

For managed database requirements or compliance needs, consider Enterprise or connecting to external managed database providers.