Portabase Logo
CLICommands

dashboard

Create and configure a dashboard and its login providers.

Create and configure a Portabase dashboard. New here? Follow Set up a dashboard.

dashboard create

Creates the dashboard folder with .env (including a random 64-character PROJECT_SECRET) and docker-compose.yml.

portabase dashboard create [OPTIONS] NAME
OptionDescriptionDefault
NAMEFolder to create, e.g. my-dashboard. Required.—
--port <int>Web port published on the host (HOST_PORT). PROJECT_URL becomes http://localhost:<port>.8887
--tz <str>Timezone (TZ).Europe/Paris
--db-mode <mode>external, internal or custom (see below).external
-s, --startStart the dashboard right after creation.false
-f, --forceOverwrite an existing folder without asking.false
-y, --yesSkip the "Apply this configuration?" confirmation.false

Database modes

ModeWhat you get
externalRecommended. A dedicated postgres:17-alpine container (db) in the same compose, with random credentials and a random host port (PG_PORT).
internalThe database embedded in the Portabase container. No extra service.
customYour own PostgreSQL. DATABASE_URL is built from --db-* (user and password are URL-encoded).

Example

portabase dashboard create my-dashboard

Non-interactive / CI example: see Concepts.

Setup wizard

In interactive mode, when no settings option was passed, the CLI asks "Configure API, MCP and authentication now?" (default: no). Answering yes walks you through:

  1. API & MCP — REST API, OpenAPI / Swagger UI, MCP server.
  2. Onboarding — skip the onboarding wizard; if skipped, the initial user's name, email and password.
  3. Authentication — email/password login, self sign-up, passkeys.

Then the CLI shows the SUMMARY, asks for confirmation, writes the files and prints how to add single sign-on later.

dashboard show

Displays the dashboard's settings grouped by section (Network, API & MCP, Onboarding, Authentication) — secrets are masked — and the table of login providers with their callback URL.

portabase dashboard show <DASHBOARD_PATH>

dashboard set / dashboard unset

Change or reset one or more settings of an existing dashboard, then re-render .env and docker-compose.yml.

portabase dashboard set <DASHBOARD_PATH> KEY VALUE [KEY VALUE ...]
portabase dashboard unset <DASHBOARD_PATH> KEY [KEY ...]

unset removes the variable from .env, so the dashboard falls back to its default.

KeyTypeEnvironment variableDefault
urlhttp(s)://host[:port]PROJECT_URLhttp://localhost:<port>
behind_proxybooleanTUSD_BEHIND_PROXYfalse
trusted_domainscomma-separated listTRUSTED_DOMAINS—
apibooleanAPI_ENABLEDfalse
openapibooleanOPENAPI_ENABLEDfalse
mcpbooleanMCP_ENABLEDfalse
skip_onboardingbooleanSKIP_ONBOARDINGfalse
admin_nametextAUTH_DEFAULT_USER_NAME—
admin_emailtextAUTH_DEFAULT_USER—
admin_passwordstrong password (secret)AUTH_DEFAULT_PASSWORD—
password_authbooleanAUTH_EMAIL_PASSWORD_ENABLEDtrue
signupbooleanAUTH_SIGNUP_ENABLED—
passkeybooleanAUTH_PASSKEY_ENABLED—
account_linkingbooleanAUTH_ALLOW_LINKING—
account_unlinkingbooleanAUTH_ALLOW_UNLINKING—
sync_oidc_rolesbooleanAUTH_SYNC_OIDC_ROLES_ON_LOGIN—
role_mapremote:portabase,...AUTH_ROLE_MAP—
allowed_grouptextALLOWED_GROUP—

See Dashboard environment variables for details on each variable.

portabase dashboard set ./my-dashboard url https://backup.example.com behind_proxy true
portabase dashboard set ./my-dashboard api true mcp true
portabase dashboard unset ./my-dashboard trusted_domains
portabase restart ./my-dashboard

Changing url does not change the published port (HOST_PORT). Expose the dashboard behind a reverse proxy and set behind_proxy true.

Safety checks

The CLI refuses to write a configuration that would break your instance:

  • skip_onboarding true requires admin_email and admin_password.
  • admin_password must have at least 8 characters, a lowercase letter, an uppercase letter, a digit and a special character.
  • password_auth false is refused while no OIDC or OAuth provider is configured (it would lock everyone out).
  • Login providers require a public url — localhost and 127.0.0.1 are refused, since the identity provider must reach the callback.

dashboard auth add

Adds a single sign-on provider. See OIDC and OAuth2 for the provider-side configuration.

portabase dashboard auth add [OPTIONS] <DASHBOARD_PATH> [KIND] [PROVIDER_ID]
OptionOIDCOAuthDescription
KINDYesYesoidc or oauth. Asked if omitted.
PROVIDER_IDYesYesoidc: any slug (lowercase letters, digits, dashes, e.g. keycloak). oauth: one of google, github, discord, apple, linkedin, x, reddit. Asked if omitted.
--issuer <url>YesIssuer / discovery URL (http(s)://…). Asked if omitted.
--client <str>YesYesClient ID. Asked if omitted.
--secret-stdinYesYesRead the client secret from standard input.
--secret <str>YesYesClient secret. Prefer --secret-stdin. Asked if omitted.
--title <str>YesYesName displayed on the login button.
--scopes <str>YesScopes to request.
--pkce / --no-pkceYesUse PKCE. Default false.
--host <str>YesHost override.

An OIDC-only flag used with oauth fails with Not applicable to oauth: --issuer.

Example

portabase dashboard set ./my-dashboard url https://backup.example.com

printf '%s\n' "$KEYCLOAK_SECRET" | portabase dashboard auth add ./my-dashboard oidc keycloak \
  --issuer https://sso.example.com/realms/main \
  --client portabase --secret-stdin \
  --title "Company SSO" --scopes "openid profile email" --pkce

portabase restart ./my-dashboard

Callback URL

After adding a provider, the CLI prints the callback URL to register at the identity provider, built from url. For OIDC it is https://<your-domain>/api/auth/sso/callback/<providerId>. For OAuth providers, check the expected URL in the OAuth2 setup page.

A provider ID must be unique: adding an existing one fails — remove it first.

dashboard auth list

Lists the configured providers: kind, ID, title, issuer (or provider name) and callback URL.

portabase dashboard auth list <DASHBOARD_PATH>

dashboard auth remove

Removes a provider and all its AUTH_OIDC_<ID>_* / AUTH_SOCIAL_<ID>_* variables.

portabase dashboard auth remove [OPTIONS] <DASHBOARD_PATH> [PROVIDER_ID]

-y, --yes skips the confirmation. Without PROVIDER_ID, an interactive menu is shown.

Removing the last provider while password_auth is false is refused. Re-enable password login first: portabase dashboard set <PATH> password_auth true.

Last updated on

On this page