Introducing a new way to review your PRs.

Read the announcement

getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.

View on GitHub

20 documents · Updated Nov 11, 2026

docs / configuration-and-organizations

Configuration and organization settings

Redash resolves runtime behavior from three boundaries: deployment values loaded at process start, settings stored for the current organization, and optional deployment hooks. This split lets one deployment set system-wide limits and features while each organization controls its own login, display, and product choices. See Application runtime and service composition, Data model and persistence lifecycle, and Background jobs and scheduling for the surrounding systems.

Configuration layers

The configuration model separates values that belong to the deployment from values that belong to an organization. A runtime component must use the layer that owns the decision instead of treating all settings as one shared pool.

Static application configuration

Static application configuration comes from environment values when the Python process starts. It supplies shared infrastructure and policy choices such as the application database, Redis, security controls, query limits, SQL parsing resource bounds, enabled connectors, notification destinations, and feature flags. The settings module parses common types and applies defaults, while some values are derived from other settings. The cookie secret is required before the application can start.

These values are deployment-wide. An organization administrator cannot change them through the organization settings page. The environment can also select the module used for deployment-specific hooks, which creates a controlled boundary between the standard application and local runtime policy.

References: redash/…/__init__.py• L19-79 redash/…/__init__.py• L137-159 redash/…/__init__.py• L355-368 redash/…/__init__.py• L425-476 redash/…/helpers.py• L10-30

Organization-scoped configuration

Organization-scoped configuration belongs to the organization record and is stored with its data. The supported organization option set has process-level defaults in redash/…/organization.py. An organization can override a supported option in its stored settings; runtime lookup first uses that override and then falls back to the default.

The organization record also carries related state that is not part of the normal option override map. Google Apps domains, public visibility, and the disabled state are examples. This distinction matters because these values can have their own access path or behavior even though they share the organization settings data.

References: redash/…/organizations.py• L13-25 redash/…/organizations.py• L43-78 redash/…/organization.py• L12-36

Deployment extension configuration

Deployment extension configuration is a code-level hook for sites that need policy beyond environment values and organization overrides. The selected dynamic settings module can change query time limits, add periodic jobs, provide SSH tunnel authentication, adjust database key definitions, choose query-result persistence, and request database extensions.

This module is not the organization settings store. Its hooks run at application or worker boundaries and may receive organization or user context when a runtime decision needs it. Use it for deployment policy rather than for values that an organization administrator must edit at runtime.

References: redash/…/dynamic_settings.py• L4-11 redash/…/dynamic_settings.py• L14-30 redash/…/dynamic_settings.py• L33-65 redash/…/__init__.py• L366-368

Organization settings flow

The organization settings flow combines defaults with the current organization, exposes the result to an administrator, and stores only the changes that belong to that organization. The same resolved values then reach server behavior and the browser client.

flowchart TD
    A[Deployment environment] --> B[Static settings]
    C[Organization record] --> D[Organization overrides]
    B --> E[Resolved organization settings]
    D --> E
    F[Organization slug or default] --> G[Current organization]
    G --> D
    E --> H[Admin settings API]
    H --> I[Organization settings page]
    E --> J[Server behavior]
    E --> K[Client configuration]

Organization resolution boundary

The current organization is resolved from the organization slug in the request when one is present. Otherwise, the request uses the organization stored in the request context or the default slug. Organization-scoped handlers then use that resolved record for settings and data access, which keeps one organization’s runtime choices from being applied to another organization.

References: redash/…/org_resolving.py• L9-24 redash/…/settings.py• L28-33 redash/…/api.py• L284-287

Settings administration boundary

Only an administrator can read or write the organization settings API. A read returns the supported settings with the organization’s overrides merged over defaults. A write updates the organization record, treats Google Apps domains as a special organization value, records an edit event, and returns the newly resolved values.

The browser settings page loads this merged view and keeps unsaved edits separate from saved values. After a successful save, it refreshes its state and updates the browser’s date and time formats. This makes the server response the source of truth after a change.

References: redash/…/settings.py• L9-25 redash/…/settings.py• L28-66 client/…/organizationSettings.js• L4-15 client/…/useOrganizationSettings.js• L16-64

Organization behavior categories

Organization settings shape the experience and some server decisions for one tenant. They do not replace deployment controls such as database connections, process security, or the global list of enabled integrations.

General organization behavior

General settings control presentation and selected product behavior for the organization. They include date and number formats, null display, search behavior, permission controls, public URL behavior, visualization display, failed scheduled-query notices, and usage-data consent. The server exposes these values in client configuration so the browser and server use the same organization choice.

Some of these choices affect background work as well as the page. For example, disabling an organization stops scheduled query refresh checks, and the failed-query notice option controls whether failure messages are collected for email delivery.

References: redash/…/organization.py• L26-36 redash/…/organization.py• L46-83 redash/…/authentication.py• L238-263 redash/…/authentication.py• L275-303 redash/…/maintenance.py• L33-52 redash/…/failure_report.py• L68-84

Authentication organization behavior

Authentication settings choose which organization login methods are available and provide organization-specific values for SAML. The deployment still controls whether provider support exists at all, while the organization can enable or disable the supported organization-level choices. The login flow reads the resolved organization settings before it shows or accepts a method.

The browser prevents an administrator from turning off every available login method through the settings form. If all other methods are unavailable, it keeps password login enabled so the organization does not lose its normal administrative entry path.

References: redash/…/organization.py• L12-25 redash/…/organization.py• L38-44 redash/…/authentication.py• L148-217 redash/…/saml_auth.py• L27-36 client/…/index.jsx• L11-35

Initial organization setup

The setup flow creates the first usable organization when the deployment has no resolved organization and is not in multi-organization mode. It creates the default organization with built-in administrator and default groups, creates the first user as an administrator, starts that user’s session, and then redirects to the application.

The setup form also collects optional newsletter and security-notification choices. Subscription work is sent to a background task after the organization and user are committed, so setup does not need to perform that external work before the user can enter the application.

In multi-organization mode, the setup route redirects away instead of creating the default organization. Organization creation and selection must then follow the deployment’s multi-organization path.

References: redash/…/setup.py• L13-51 redash/…/setup.py• L54-75 redash/…/org_resolving.py• L9-20

Runtime option resolution

A request or worker resolves options in a defined order: it identifies the organization, asks for an organization-aware value when the choice is tenant-specific, and uses a static or deployment hook when the choice is global or requires custom policy. The browser receives a related snapshot through the configuration endpoint, but the server remains responsible for enforcing server-side behavior.

This boundary explains why two organizations can see different formats or login choices in one deployment, while query queues, database access, and enabled connector families remain deployment concerns. It also explains why a setting change can affect a worker or later request without changing the process environment.

sequenceDiagram
    participant R as Request or worker
    participant O as Current organization
    participant S as Static settings
    participant H as Deployment hooks
    participant B as Behavior

    R->>O: Resolve slug or default organization
    alt Organization-specific option
        R->>O: Read override, then default
        O-->>B: Resolved organization value
    else Deployment-wide option
        R->>S: Read process setting
        S-->>B: Shared value
    else Custom runtime policy
        R->>H: Call selected hook
        H-->>B: Policy result
    end

Browser configuration boundary

The /api/config and session responses send the client a configuration snapshot that combines global client flags with current-organization values. The browser uses this snapshot to select visible features, format data, and present login choices. Organization administration uses a separate API because only administrators may change stored organization settings.

References: redash/…/authentication.py• L238-303 redash/…/authentication.py• L318-344 client/…/OrganizationSettings.jsx• L17-65

Worker configuration boundary

Workers use both static settings and organization state. Static values define shared job limits and schedules, while deployment hooks can add periodic work or compute a query time limit from the scheduled state, user, and organization. Organization state can also prevent refresh work or control failure reporting.

References: redash/…/execution.py• L75-94 redash/…/schedule.py• L82-91 redash/…/maintenance.py• L33-52 redash/…/failure_report.py• L68-84

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the keys in redash/…/organization.py aligned with the settings API’s merge and write rules. A key that has a default but no supported write path can appear editable without being stored as expected.
  • Keep organization-aware server behavior and /api/config fields aligned. A browser flag can look changed while a server guard still uses a different source.
  • When changing a setting that affects jobs, check both the request path and the worker path. Organization disable state and failure-report preferences cross that boundary.
  • When changing setup behavior, preserve the link between the default organization, its built-in groups, the first administrator, and the active login session.
  • When changing a deployment hook, check every caller of the selected hook. A hook can affect web requests, workers, database creation, or data source connections.
  • When changing SQL parsing limits, check both the query formatting path and the worker resource budget. The limits are deployment-wide and can trade support for large statements against CPU time.

Important failure modes

TriggerConsequenceGuard
Missing REDASH_COOKIE_SECRETThe application stops during settings load.Set the required deployment secret before starting the service.
An organization slug resolves to the wrong organizationSettings and organization-owned data can be read or changed in the wrong tenant.Preserve slug resolution and pass the resolved organization through organization-scoped handlers.
A setting key is absent from the supported organization settings mapThe organization model rejects the update or runtime lookup raises a missing-key error.Add the key to the default map and keep the API and consumers on the same contract.
All available login methods are disabledAdministrators can lose the normal login path.Keep password login enabled when no other provider is available.
An organization is disabled while scheduled work is dueQuery refresh work is skipped, and related failure handling can stop or change.Check organization state in worker paths and re-enable it when work should resume.
Setup runs in multi-organization modeThe setup route redirects without creating the default organization.Use the multi-organization creation and selection flow.
A query exceeds the SQL parsing grouping limitsAutomatic query limiting or formatting can fail, or an unbounded setting can let one request use a worker for too long.Keep grouping limits enabled by default and raise them only for workloads that need larger statements.

Key files

FileWhy to read it
redash/…/__init__.pyDefines deployment-wide settings, including query parsing resource bounds, and selects the deployment hook module.
redash/…/organization.pyDefines defaults for values that organizations can resolve or override.
redash/…/dynamic_settings.pyShows the code-level policy hooks available to a deployment.
redash/…/organizations.pyDefines organization state and the override-then-default lookup boundary.
redash/…/settings.pyDefines the administrator API and the merge, save, and audit flow.
redash/…/org_resolving.pyDefines how a request selects its current organization.
redash/…/authentication.pyBuilds the client configuration snapshot and applies organization settings to login and formatting.
redash/…/setup.pyDefines first-organization creation and initial administrator setup.
client/…/useOrganizationSettings.jsShows how the browser loads, edits, saves, and applies organization settings.
redash/…/execution.pyShows how query execution combines worker settings with deployment policy.
redash/…/schedule.pyShows where static scheduling choices and custom periodic jobs meet.