Set up a single-node EDB Postgres Distributed cluster on Ubuntu

August 14, 2025

Log in or register for a free EDB account and grab your subscription token. Export it in your environment:

$ export EDB_SUBSCRIPTION_TOKEN=whatever-it-is

Now set up repositories for EDB Postgres Distributed (PGD) and EDB Postgres Extended (EDB's distribution of Postgres).

$ curl -1sLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/postgres_distributed/setup.deb.sh" | sudo -E bash
$ curl -1sLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/enterprise/setup.deb.sh" | sudo -E bash

Update apt-get and install the packages for PGD and EDB Postgres Extended.

$ sudo apt-get update -y
$ sudo apt-get install -y edb-pgd6-expanded-pgextended17

Now switch to the postgres user to set up the instance.

$ sudo su postgres
$ cd ~

Use the PGD CLI to create a new Postgres instance and set up a single-node PGD cluster.

$ PGPASSWORD=secret /usr/lib/edb-pge/17/bin/pgd node db1 setup \
 --dsn 'host=localhost dbname=pgd' \
 --pgdata /var/lib/postgresql/db \
 --log-file logfile \
 --group-name pgd-group

Now Postgres is running and PGD is set up. We can see how the nodes in the PGD cluster are doing. (There is only one node.)

$ /usr/lib/edb-pge/17/bin/psql -P expanded=auto -h localhost pgd \
 -c 'SELECT * FROM bdr.node_summary'
-[ RECORD 1 ]----------+-------------------------------------
node_name              | db1
node_group_name        | pgd-group
interface_connstr      | host=localhost dbname=pgd
peer_state_name        | ACTIVE
peer_target_state_name | ACTIVE
node_seq_id            | 1
node_local_dbname      | pgd
node_id                | 2084062396
node_group_id          | 1693353463
node_kind_name         | data
node_uuid              | 19207a60-298e-4d2e-88e5-7cfc9ab3035c

And now you've got a single node PGD cluster!

Share this