1. Home
  2. Docs
  3. Connect
  4. Railway
DOCS

Railway.

Railway gives you the superuser, so it is one ALTER SYSTEM, a restart, and the public address.

Waltail needs three things from Railway: wal_level = logical, a user that is allowed to replicate, and a way to reach the database over the network. Set them up in the steps below. When you paste the connection string in Waltail, the console runs six checks and tells you if anything is still missing.

1. Turn on logical replication

Connect with the postgres user Railway created and run:

ALTER SYSTEM SET wal_level = 'logical';

Then restart the Postgres service from the Railway dashboard. show wal_level; should now say logical.

2. User

The postgres superuser passes every check and owns the tables. If you want a separate user, run CREATE ROLE waltail WITH LOGIN REPLICATION PASSWORD '…' and grant it membership in the owning role.

3. Use the public address

Copy the service's public connection string — the TCP proxy host and port under Connect. The internal railway.internal host name only works inside your Railway project.

Then, in Waltail

  1. Paste the connection string

    Use the direct database host. A transaction-mode pooler (PgBouncer and similar) cannot carry a replication connection, so the reachable check would fail there.

  2. Pick tables

    Choose the tables to stream. A table needs a primary key — or REPLICA IDENTITY FULL or an index identity — for updates and deletes to replicate. The console marks any table that does not qualify and says why.

  3. Add a destination

    Waltail creates a publication and a replication slot on your database (both named pgcdc_<pipeline>) and starts streaming. The quickstart walks through the rest.

Start streaming in minutes.