--config flag. Without --config, pgconsole starts in demo mode.
- Docker
- npx
- npm
Complete Example
pgconsole.toml
General
pgconsole.toml
Announcement Banner
Optional banner displayed at the top of the page. The banner cannot be dismissed by users.pgconsole.toml
Branding
Replace the pgconsole logo with your own.
When
logo_link is omitted, the logo links to /.
pgconsole.toml
Labels
Labels for tagging connections (e.g. Production, Staging). Referenced by thelabels field in [[connections]]. Repeat for multiple labels.
pgconsole.toml
Connections
Database connections. Repeat for multiple connections.If connecting to a database on your host machine from Docker, use
host.docker.internal instead of localhost.pgconsole.toml
Authentication
pgconsole.toml
OAuth Providers
OAuth providers are configured as an array of[[auth.providers]] entries. Each entry requires a type field. Repeat for multiple providers.
pgconsole.toml
Users
User entries. Repeat for multiple users. Users with apassword can sign in with basic auth. Users without a password are SSO-only.
pgconsole.toml
Owner Role
Users withowner = true are marked with an Owner badge in the UI. If no user has owner = true, the first user entry automatically becomes the owner.
Groups
User groups for organizing users. Repeat for multiple groups.
Members are user emails matching
[[users]] entries.
pgconsole.toml
Access Control (IAM)
Rules for controlling access to connections. IAM is opt-in: with no[[iam]] rules defined, all authenticated users have full access, and enforcement begins once you define the first rule. See Database Access Control for a full guide on permissions, patterns, and examples.
pgconsole.toml
Validation
IAM rules are validated when the configuration is loaded:connectionmust be*or reference a valid connection IDpermissionsmust only contain valid values:read,write,ddl,admin,explain,execute,export, or*membersmust use valid formats:user:<email>,group:<id>, or*group:<id>must reference a defined group
AI Providers
Configure providers for the AI Assistant. Repeat for multiple providers.
Use
vendor = "openai-compatible" with base_url for any provider that implements the OpenAI API (Groq, OpenRouter, Together, Ollama, vLLM, LiteLLM, and most self-hosted gateways). api_key may be omitted for local providers that run without authentication (e.g. Ollama, self-hosted vLLM).
pgconsole.toml
Agents
Non-human principals that authenticate to the MCP Server with a bearer token. An agent is not a user — it can’t log into the UI. Repeat for multiple agents.
There are two kinds of agent:
- Pure agent (no
on_behalf_of) — a standalone service account, e.g. a CI bot. Authorize it with normal IAM rules whosemembersincludeagent:<id>. It is granted only what those rules say (*/group:/user:rules never apply to agents). - Delegated agent (
on_behalf_ofset) — acts on behalf of a user and inherits that user’s permissions, optionally narrowed by thepermissions/connectionscaps. It can never exceed the user, and automatically loses access when the user does.
read-only agent sees the discovery and query tools; write_data/run_ddl appear only with those permissions. Give each agent the narrowest grant it needs.
pgconsole.toml