Postgres Replication outside of fly

Are there any guides on replicating postgres data externally? I would like to have a read replica living in GCP. Ideally secured via wireguard as well.

We don’t have guides for this but it’s totally doable. The basic steps are:

  1. Create wireguard peer, connect from the host you want to replicate to.
  2. Get credentials out of your existing Postgres for replication (ssh in and look for the REPL_PASSWORD environment variable)
  3. Configure your replica

You’ll want to make sure your pg config is the same as your Fly DB, and you’ll also need to be careful that your replica continues working when your Fly hosted DB fails over. Everything you need is there, though, we just don’t have a guide. :slight_smile:

1 Like