Skip to main content

Bill of Materials and Registry Mirroring

On an internet-connected machine, you must gather all required packages, container images, and dependencies needed for the installation process. The resources you'll need will depend on your deployment method.

Bill of materials

Using our provided tarball is recommended as the simplest installation method for air-gapped environments. You can install the Mattermost Server in a few minutes on any air-gapped 64-bit Linux system.

Prerequisites

  • Mattermost tarball. We recommend using the latest ESR for extended support where server upgrades may be infrequent.
  • Database: PostgreSQL installation packages or container images for your Linux distribution.
  • File Storage: Local filesystem storage is sufficient for deployments under 2,000 users. For larger deployments requiring high availability, we recommend using an S3-compatible object storage solution or an NFS (Network File System) server for shared storage needs.
  • Load balancer: If you already have a load balancer running in your air-gapped environment you can skip this resource, otherwise we recommend deploying NGINX from these Linux packages.
  • Desktop app: Download the required package based on your deployment method.

(Optional) Supporting services

Consider downloading these additional resources if you plan to enable these optional components:

Mattermost plugins

Mattermost includes a number of pre-built integrations for mission-critical tools. If you'd like to use any plugins beyond those that are pre-built in the Mattermost package, you'll need to download the plugin binaries from the Mattermost Marketplace. Once you have Mattermost deployed, these plugin binaries can be uploaded directly in the System Console.

SSL/TLS certificates and keys

If your deployment requires SSL, ensure you have the necessary certificates. This includes certificates and keys for enabling HTTPS with Mattermost, as well as any CA files or certificates needed to access internal services such as LDAP or SAML. See Setup TLS for configuration details.

Local documentation

Mattermost documentation can be built and served locally so that installation and configuration guidance is available inside the air-gapped environment. Clone the mattermost/mattermost repository on your internet-connected machine, build the documentation site, and transfer the generated static output across the air gap alongside the rest of your bill of materials.

Prerequisites

git clone https://github.com/mattermost/mattermost.git
cd mattermost/docs/site
npm ci
npm run build

The build writes a self-contained static site to docs/site/build/, which you can serve from any web server in the air-gapped environment. See the documentation site README for the full build options, including how to skip the API reference generation step if you don't need it.

Set up a private registry or mirror

A private container registry securely stores the Docker images necessary for air-gapped deployments, ensuring compliance with data isolation requirements. Similarly, a private package mirror stores operating system packages necessary for air-gapped deployments in Ubuntu or RHEL/CentOS Linux environments. Setting up a local registry or mirror is a critical step in deploying Mattermost to ensure all images, dependencies, and packages are available to you in the air-gapped environment. The steps below outline the process required to set up a local registry or mirror, depending on the deployment method you are using. These steps are a rough guide, and can be supplemented with online resources depending on your specific deployment needs.

(Ubuntu) Set up a private Debian package mirror

We will use Aptly to create a local mirror, although you can also use other options such as debmirror.

  1. Install Aptly (on an internet-connected machine):

    apt-get update
    apt-get install aptly gnupg
  2. Create a GPG key for signing packages:

    gpg --gen-key
  3. Create a mirror configuration:

    aptly mirror create -architectures=amd64 debian-bullseye http://deb.debian.org/debian bullseye main contrib non-free
  4. Update the mirror to download packages:

    aptly mirror update debian-bullseye
  5. Create and publish a snapshot:

    aptly snapshot create debian-bullseye-$(date +%Y%m%d) from mirror debian-bullseye
    aptly publish snapshot debian-bullseye-$(date +%Y%m%d)
  6. Serve the repository:

    aptly serve
  7. Client configuration: Configure apt to use your local mirror:

    cat > /etc/apt/sources.list << EOF
    deb http://mirror.example.com/debian bullseye main contrib non-free
    EOF

(RHEL/CentOS) Set up a private RHEL package mirror

We will use reposync for a local mirror.

  1. Install required tools (on an internet-connected RHEL system):

    yum install yum-utils createrepo
  2. Download packages:

    mkdir -p /var/www/html/repos/rhel8
    reposync -p /var/www/html/repos/rhel8 --download-metadata --repo=rhel-8-for-x86_64-baseos-rpms
    reposync -p /var/www/html/repos/rhel8 --download-metadata --repo=rhel-8-for-x86_64-appstream-rpms
  3. Create repository metadata:

    createrepo /var/www/html/repos/rhel8/rhel-8-for-x86_64-baseos-rpms
    createrepo /var/www/html/repos/rhel8/rhel-8-for-x86_64-appstream-rpms
  4. Set up a web server:

    yum install httpd
    systemctl enable httpd
    systemctl start httpd
  5. Client configuration: Disable existing repositories:

    cd /etc/yum.repos.d/
    mkdir backup
    mv *.repo backup/
  6. Client configuration: Create new repository files:

    cat > /etc/yum.repos.d/local-baseos.repo << EOF
    [local-baseos]
    name=Red Hat Enterprise Linux 8 BaseOS
    baseurl=http://mirror.example.com/repos/rhel8/rhel-8-for-x86_64-baseos-rpms
    enabled=1
    gpgcheck=0
    EOF

    cat > /etc/yum.repos.d/local-appstream.repo << EOF
    [local-appstream]
    name=Red Hat Enterprise Linux 8 AppStream
    baseurl=http://mirror.example.com/repos/rhel8/rhel-8-for-x86_64-appstream-rpms
    enabled=1
    gpgcheck=0
    EOF
  7. Client configuration: Clear cache and test:

    yum clean all
    yum repolist