Step 1: Add a database connection
Create apgconsole.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.Step 2: Start
- Docker (Recommended)
- npx
- npm
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:
- Docker
- npx
- npm
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
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
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