Skip to main content

PostgreSQL

PostgreSQL is a popular relational database used in many modern applications. This guide provides the basic steps to tunnel a connection through Pomerium to a Postgres instance.

Basic Connection

  1. Create a TCP tunnel, using either pomerium-cli or the Pomerium Desktop client:
$ pomerium-cli tcp pgsql.localhost.pomerium.io:5432 --listen localhost:5432
  1. Initiate your Postgres connection, pointing to localhost:
$  psql -h localhost -W -U postgres -c '\dn'

Resources