Skip to main content
pgconsole listens on port 9876 by default (configurable via --port). You can access it directly or put it behind a reverse proxy.

Direct Access

Users access pgconsole directly at its host and port. No additional configuration is needed.

Behind a Reverse Proxy

A reverse proxy handles TLS termination and exposes pgconsole on a public domain. Set external_url in pgconsole.toml to the public-facing URL so that pgconsole constructs correct OAuth callback URLs.
pgconsole.toml

Nginx

Caddy

Caddy provides automatic HTTPS with Let’s Encrypt.

Kubernetes Ingress

Use an Ingress resource to expose pgconsole with TLS termination inside a Kubernetes cluster.
The pgconsole-tls Secret holds your TLS certificate. If you use cert-manager, add the annotation cert-manager.io/cluster-issuer to provision it automatically.

Kubernetes Gateway API

The Gateway API is the successor to Ingress. Define a Gateway for TLS termination and an HTTPRoute for routing:

OAuth Callback

When SSO is configured, external_url is used to construct the OAuth callback URL. The OAuth provider redirects users back to external_url after authentication.