Skip to content

Add Support for External Database in Mattermost Omnibus #117

@abdallah

Description

@abdallah

Currently, Mattermost Omnibus provisions and manages its own bundled database (PostgreSQL) as part of the installation. In production environments, it’s common to use an external database (managed RDS, Aurora, or an existing PostgreSQL cluster) for scalability, availability, and operational consistency.
This request proposes adding native support for configuring and using an external database when deploying Mattermost via Omnibus.

Use Case / Motivation
• Production-readiness: Many organizations prefer to run Mattermost on a managed database service for high availability and backups.
• Infrastructure flexibility: Decoupling the application from the database allows teams to manage DB upgrades, scaling, and failover independently.
• Migration scenarios: Existing Mattermost installations on external DBs should be able to move to Omnibus without downtime or data migration to a bundled DB.

Proposed Solution

  1. Add configuration options in mmomni.yml (or .env) to allow specifying:
  • DB_HOST
  • (Optional) SSL parameters for secure connections
  1. Update Omnibus installation scripts to:
  • Skip local PostgreSQL provisioning when external DB settings are present.
  • Update mmomni.mattermost.env with the values of MM_CONFIG and MM_SQLSETTINGS_DATASOURCE with the new DB_HOST

Happy to open a PR with these changes for review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions