Skip to main content
pgconsole uses a TOML configuration file for all settings. Pass the config file with the --config flag. Without --config, pgconsole starts in demo mode.

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 the labels 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

To run without authentication, omit the [auth] section entirely.
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 a password can sign in with basic auth. Users without a password are SSO-only.
pgconsole.toml

Owner Role

Users with owner = 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:
  • connection must be * or reference a valid connection ID
  • permissions must only contain valid values: read, write, ddl, admin, explain, execute, export, or *
  • members must use valid formats: user:<email>, group:<id>, or *
  • group:<id> must reference a defined group
Invalid rules will cause the server to fail at startup with an error message.

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 whose members include agent:<id>. It is granted only what those rules say (*/group:/user: rules never apply to agents).
  • Delegated agent (on_behalf_of set) — acts on behalf of a user and inherits that user’s permissions, optionally narrowed by the permissions/connections caps. It can never exceed the user, and automatically loses access when the user does.
An agent only sees the MCP tools its effective permissions unlock — a 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