Skip to main content
Get pgconsole running and execute your first query in under a minute.

Step 1: Add a database connection

Create a pgconsole.toml file with at least one connection:
pgconsole.toml
If connecting to a database on your host machine from Docker, use host.docker.internal instead of localhost in your config.
That’s the minimum config. See Config Reference for authentication, access control, AI providers, and more.

Step 2: Start

Once you see the banner in your terminal, pgconsole is ready:
Open http://localhost:9876 in your browser. You’ll see the SQL editor with the schema browser on the left.

Demo mode

If you run pgconsole without --config, it starts in demo mode with an embedded in-memory PostgreSQL database pre-loaded with sample data:
Demo mode data is ephemeral and resets on every restart. To connect to a real database, create a pgconsole.toml as shown in Step 1.

Docker Compose

Add pgconsole as a service alongside your existing PostgreSQL in Docker Compose:
docker-compose.yml
Open http://localhost:9876 — pgconsole connects to your database and you can browse schemas, run queries, and edit data immediately.

Kubernetes

Deploy pgconsole as a Deployment with a ConfigMap for the configuration:
pgconsole.yaml
Open http://localhost:9876 to access pgconsole. To expose pgconsole externally with TLS, see Kubernetes Ingress and Kubernetes Gateway API.

Cloudflare

pgconsole can run on Cloudflare using Containers — our own demo.pgconsole.com is deployed this way. Prerequisites: A Cloudflare account with Containers enabled and the Wrangler CLI installed. See the demo worker source for a complete example — it powers demo.pgconsole.com. Deploy Push the Docker image to the Cloudflare container registry and deploy the worker:

Next steps

External Access

Expose pgconsole to your team

SQL Editor

Autocomplete, formatting, inline editing, and more