---
title: "Deploy peerdb"
description: "peerdb template (by Chartcastr - data analyst you hire into slack)"
category: "Other"
url: https://railway.com/deploy/peerdb
---

# Deploy peerdb

peerdb template (by Chartcastr - data analyst you hire into slack)

**[Deploy peerdb on Railway](https://railway.com/template/peerdb)**

- **Creator:** drummerduck
- **Category:** Other
- **Total deploys:** 2

## Template content

### peerdb-flow-worker https://cdn.prod.website-files.com/64ad1156332ae9274bcbccb7/66a2baa8c131bfb270b23b45_Frame%2057.png

- **Image:** ghcr.io/peerdb-io/flow-worker:latest-dev

### peerdb-server https://cdn.prod.website-files.com/64ad1156332ae9274bcbccb7/66a2baa8c131bfb270b23b45_Frame%2057.png

- **Image:** ghcr.io/peerdb-io/peerdb-server:latest-dev

### peerdb-temporal https://temporal.io/favicon.svg

- **Image:** temporalio/auto-setup:latest

### peerdb-ui https://cdn.prod.website-files.com/64ad1156332ae9274bcbccb7/66a2baa8c131bfb270b23b45_Frame%2057.png

- **Image:** ghcr.io/peerdb-io/peerdb-ui:latest-dev

### peerdb-catalog https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host PeerDB on Railway

[PeerDB](https://github.com/PeerDB-io/peerdb) is an open-source CDC (Change Data Capture) platform that replicates data from PostgreSQL to destinations like BigQuery, Snowflake, and S3 using native logical replication. It reads the Postgres WAL directly — no connectors, no Kafka, no Debezium — making it fast, simple, and Postgres-native.

## About Hosting PeerDB

PeerDB runs as a 5-service stack: a PostgreSQL catalog database for internal metadata, a Temporal server for workflow orchestration, a flow-worker that reads the WAL and writes to your destination, a gRPC API server, and a web management UI. All services communicate over private networking. The only publicly exposed service is the UI dashboard, used to configure source/sink peers and manage CDC mirrors. This template provisions all five services with auto-generated credentials and pre-wired internal networking.

## Common Use Cases

- **Analytics replication** — replicate your production PostgreSQL tables to BigQuery or Snowflake for analytics, dashboards, and cross-referencing without impacting your production database
- **Real-time data warehousing** — keep a near-real-time copy of your transactional data in a data warehouse with configurable sync intervals (default 60s)
- **Event sourcing and audit trails** — capture every INSERT, UPDATE, and DELETE as versioned rows with soft-delete markers, giving you a complete change history
- **Cross-system data federation** — make your Postgres data available in multiple downstream systems (BigQuery, S3, Snowflake, Kafka) from a single CDC pipeline

## Dependencies for PeerDB Hosting

- **PostgreSQL source database** with `wal_level = logical` enabled (Railway Postgres supports this)
- **Destination data warehouse** — BigQuery, Snowflake, S3, or another supported PeerDB sink
- **GCP service account** (if using BigQuery) with `bigquery.dataEditor` and `bigquery.jobUser` roles

### Deployment Dependencies

- [PeerDB documentation](https://docs.peerdb.io)
- [PeerDB GitHub repository](https://github.com/PeerDB-io/peerdb)
- [Temporal workflow engine](https://temporal.io)
- [PostgreSQL logical replication docs](https://www.postgresql.org/docs/current/logical-replication.html)

### Implementation Details

On the source PostgreSQL database, create a publication for the tables you want to replicate:

```sql
CREATE PUBLICATION my_cdc FOR TABLE "users", "orders", "events";
```

Then create a dedicated replication user:

```sql
CREATE USER peerdb_replicator WITH REPLICATION LOGIN PASSWORD '';
GRANT USAGE ON SCHEMA public TO peerdb_replicator;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO peerdb_replicator;
```

Once deployed, open the PeerDB UI to create your source peer (PostgreSQL), sink peer (BigQuery/Snowflake/S3), and CDC mirror.

Built and used in production by [Chartcastr](https://chartcastr.com) — automated SaaS analysis delivery to Slack.

## Why Deploy PeerDB 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 PeerDB 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.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/peerdb
