
Deploy RethinkDB | (Just Updated) Realtime Database, Password On From Boot
RethinkDB realtime DB. Password on from boot, data kept, TCP proxy ready
rethinkdb
Just deployed
/data
Deploy and Host RethinkDB on Railway
RethinkDB is the open-source realtime document database: JSON documents, joins, and changefeeds that push every change to your app the moment it happens. It backs live dashboards, collaborative apps, multiplayer state and anything that would otherwise poll.
This template runs RethinkDB 2.4 as a single service from a digest-pinned official image: the client driver port on a Railway TCP proxy, the admin web UI kept off the public internet, and all data on a Railway volume.
About Hosting RethinkDB
RethinkDB runs on Railway only after a few things are handled for you:
- The admin account has a password from the first boot. A stock
rethinkdbcontainer starts with theadminuser and an empty password, so anyone who can reach the driver port can read and write everything. Here a password is generated per deploy and anonymous connections are rejected. - The web UI is not published. The admin console has no login of its own, so it is not given a public domain. It listens on the private network only; use the driver over the TCP proxy, or reach the console from another service in the same project.
- Data survives redeploys. The data directory is a subfolder of the volume, so the volume's
lost+foundnever reaches RethinkDB (it refuses to start on a directory it did not create). Tables, users and the password live on the attached volume. - The cache and thread count follow your plan. RethinkDB sizes its cache from the machine and
its threads from the CPU count, and Railway containers report the host's. The start command reads
the container's memory and CPU limits and passes
--cache-size(half the memory limit) and--cores.
Common Use Cases
- Realtime dashboards and live feeds using changefeeds
- Collaborative and multiplayer apps that need pushed updates instead of polling
- IoT and event data with flexible JSON documents
- A drop-in server for existing RethinkDB applications and the official drivers
Dependencies for RethinkDB Hosting
- One Railway volume for the data directory (created by the template)
Deployment Dependencies
- RethinkDB documentation: https://rethinkdb.com/docs
- Official image: https://hub.docker.com/_/rethinkdb
Implementation Details
| Variable | Purpose |
|---|---|
RETHINKDB_PASSWORD | Password of the admin user, generated per deploy. |
RETHINKDB_PRIVATE_HOST / RETHINKDB_PRIVATE_PORT | Driver address on the private network, for services in the same project. |
RETHINKDB_PUBLIC_HOST / RETHINKDB_PUBLIC_PORT | Driver address on the TCP proxy, for clients outside Railway. |
Connect with any official driver as user admin and RETHINKDB_PASSWORD. Python:
from rethinkdb import RethinkDB
r = RethinkDB()
conn = r.connect(host="", port=,
user="admin", password="")
The password is applied when the data directory is first created. To change it later, use
r.db("rethinkdb").table("users").get("admin").update({"password": "new"}).
Why Deploy RethinkDB on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying RethinkDB on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
rethinkdb
rethinkdb:2.4.4RETHINKDB_PRIVATE_PORT