---
title: Charmhub | Deploy Mattermost using Charmhub - The Open Operator Collection
description: Deploy the latest version of Mattermost as a Kubernetes Operator on any
  cloud.
url: https://charmhub.io/mattermost-k8s/docs/architecture
---

# Mattermost

[Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

* [Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

Platform:

stable 18

```
juju deploy mattermost-k8s
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Contacts

##### Maintainers

+ [Launchpad Team](https://launchpad.net/~canonical-is-sre)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# Charm architecture

For an overview of Mattermost architecture, see [this page on the Mattermost site](https://docs.mattermost.com/overview/architecture.html). A brief summary of the key points is provided below:

At its core, Mattermost is a single-compiled Go binary that is exposed as a Restful JSON web server with Javascript and Go clients. See the Restful API docs [here](https://api.mattermost.com/).

It provides the following, supported in this charm:

* **RESTful JSON Web Service**: Handles all incoming API requests (from web clients, apps, and integrations) and ensures that responses are formatted in JSON. Acts as the communication bridge between the clients (Access Layer) and backend systems.
* **Authentication client**: provides the functionality for users to log into Mattermost via email address and password in Team Edition. Enterprise E20 adds the ability to authenticate using SAML SSO providers, which this charm supports.
* **Authentication Provider**: Provides pluggable authentication frameworks to support OAuth, SSO, and third-party identity services. Particularly important for enterprise environments with centralized identity management.
* **Notification service**: sends notifications via SMTP or a Push Notification Service for mobile applications.
* **Data management service**: connects to supported databases and file storage solutions (local or Amazon S3), and manages the reading and writing of data to and from them.

The binary talks to a PostgreSQL database and a filestore such as S3.

## [Charm architecture diagram](https://charmhub.io/mattermost-k8s/docs/architecture#p-26084-charm-architecture-diagram)

```
C4Component
title Component diagram for Mattermost Charm

Container_Boundary(mattermost, "Mattermost") {
  Component(charm, "Mattermost App", "", "Mattermost application")
}
```

## [Containers](https://charmhub.io/mattermost-k8s/docs/architecture#p-26084-containers)

Configuration file for the containers can be found in [the charm repository](https://git.launchpad.net/charm-k8s-mattermost/tree/Dockerfile).

### [Mattermost](https://charmhub.io/mattermost-k8s/docs/architecture#p-26084-mattermost)

Mattermost is a single-compiled Go binary that is exposed as a Restful JSON web server with Javascript and Go clients.

The server is started in HTTP mode (port `8065`) serving all the content.

The workload that this container is running is defined in the [Dockerfile in the charm repository](https://git.launchpad.net/charm-k8s-mattermost/tree/Dockerfile).

## [OCI images](https://charmhub.io/mattermost-k8s/docs/architecture#p-26084-oci-images)

The OCI image is built using [Docker](https://www.docker.com/) that is defined in the [Dockerfile](https://git.launchpad.net/charm-k8s-mattermost/tree/Dockerfile) using [launchpad OCI recipe](https://launchpad.net/charm-k8s-mattermost/+oci/mattermost). It is then published to [Dockerhub](https://hub.docker.com/r/mattermostcharmers/mattermost-canonical-flavour/tags).

## [Integrations](https://charmhub.io/mattermost-k8s/docs/architecture#p-26084-integrations)

### [PostgreSQL](https://charmhub.io/mattermost-k8s/docs/architecture#p-26084-postgresql)

PostgreSQL is an open-source object-relational database used by Mattermost to store all the data needed.

---
