# Raspberry Pi 4, Mattermost inside Docker?

**URL:** <https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112>\
**Category:** Troubleshooting\
**Created:** [September 14, 2019, 5:13am UTC](https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112 "2019-09-14T05:13:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![esbeeb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/esbeeb/32/3211_2.png) [@esbeeb](https://forum.mattermost.com/u/esbeeb)\
**Post date:** [September 14, 2019, 5:13am UTC](https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112/1 "2019-09-14T05:13:05Z")

</div>

First Post. 🙂

Has anyone tinkered with getting Mattermost working on a Raspberry Pi 4? Doing a normal Docker install of Mattermost? I’m guessing that [running from an SSD, in a SATA-to-USB3 enclosure](https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/) (~~200ish MB/sec) would be smart, to get far faster disk I/O than what can be had on a MicroSD card (~20ish MB/sec).

Are there any obvious ARM-related bugs which can and will happen in Mattermost, or any of it’s dependencies, which do not happen on AMD64?

---

<div class="post-metadata">

**Author:** ![fbartels](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/fbartels/32/3835_2.png) [@fbartels](https://forum.mattermost.com/u/fbartels)\
**Post date:** [September 16, 2019, 7:54am UTC](https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112/2 "2019-09-16T07:54:45Z")

</div>

Hi @esbeeb,

I have never run Mattermost on something else than good ol’ Intel and AMD chips, but there is a project on Github which builds the Mattermost team edition for different architectures and OSs.

You can find it at [https://github.com/SmartHoneybee/ubiquitous-memory](https://github.com/SmartHoneybee/ubiquitous-memory)

---

<div class="post-metadata">

**Author:** ![esbeeb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/esbeeb/32/3211_2.png) [@esbeeb](https://forum.mattermost.com/u/esbeeb)\
**Post date:** [September 19, 2019, 2:28am UTC](https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112/3 "2019-09-19T02:28:00Z")

</div>

A couple of notable developments:  
“Balena releases first fully functional 64-bit OS for the Raspberry Pi 4”:

> **[balena releases first fully functional 64-bit OS for the Raspberry Pi 4](https://www.balena.io/blog/balena-releases-first-fully-functional-64-bit-os-for-the-raspberry-pi-4/)**
>
> Today, we are excited to announce the release of 64-bit balenaOS for the Raspberry Pi 4, providing support for the full 4GB of memory and allowing the simultaneous, side-by-side running of 32-bit and 64-bit Docker containers - a first for the...

This might be the best way at present to run Mattermost in a Docker container, on a RPi 4 SBC.

Also, the Raspberry Pi Engineers themselves are working hard, to add a 64-bit Linux kernel to Raspbian, then later will follow all 64-bit userland software:  
[https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=250730](https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=250730)

---

<div class="post-metadata">

**Author:** ![esbeeb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/esbeeb/32/3211_2.png) [@esbeeb](https://forum.mattermost.com/u/esbeeb)\
**Post date:** [March 23, 2020, 7:32am UTC](https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112/4 "2020-03-23T07:32:55Z")

</div>

The official installation instructions for Mattermost are not helpful, at present, **if you are on a different architecture than AMD64** (since they distribute no other pre-compiled installation .tar.gz, besides for AMD64). There also aren’t really any build instructions to speak of. What they _do_ provide is advice on how do become a **developer** , and set up a development environment (where building is part of the process). For **sysadmins** merely seeking to **install** (but not **develop** ) on a Raspberry Pi 4, the Mattermost documentation seems to almost painstakingly sneak around divulging any straightforward (non-docker) method to compile and install, from source code.

If one tries to build Mattermost within Raspbian 32-bit (armv7l), one will run into plenty of trouble. The trouble includes, but is not limited to the following:

- At present, **there is no docker image for mysql for the armv7l architecture**. But the build system aggressively assumes there will be one. (Note, there is talk about a docker image for mysql, for 64-bit ARM, as in aarch64, but it’s slow in coming. See [here](https://github.com/docker-library/mysql/issues/318). This bodes badly for building mattermost on any 64-bit OS for the Raspberry Pi 4, such as Ubuntu 18.04, or BalenaOS as well. **This mysql docker image dependency in the build system will be the “achilles heel” each time** ). 😳

- The Debian package “dh-autoreconf” needs to be installed before trying to “npm install image-webpack-loader”.

- Also, Node.js version 12, not 10, will be required, because there are a few npm modules which won’t install properly in Node v10 **on armv7l** , but _will_ install properly on Node v12, **on armv7l**. These problematic modules are node-sass, gifsicle, and image-webpack-loader (which tries to pull in mozjpeg, which is where the failure is).

- when you do a “make build-linux” in ~/mattermost-server, guess which architecture it tries to build for. armv7l? No! AMD64! 😵 It’s like the twilight zone of compiling from source.

So in summary, the build system heavily assumes the AMD64 architecture, **even when you download the source yourself, and try to make/build/compile/install/whatever it on armv7l**. The build system would require heavy re-architecting to come out of this AMD64 assumption. It also doesn’t accommodate those who would prefer to not use docker (and thereby save about 3GB of RAM during the build process).

The build system also doesn’t seem to accommodate the use of postgres (instead of mysql) for building with docker. **Postgres supports [arm64v8](https://hub.docker.com/r/arm64v8/postgres/), [arm32v7](https://hub.docker.com/r/arm32v7/postgres/) and [arm32v6](https://hub.docker.com/r/arm32v6/postgres/), for its docker images**. For this reason, and others, I would sure like to have postgres be the default, go-to database instead!

PS: To install Mattermost on a Raspberry Pi 4, the most straightforward, docker-avoiding pathway is probably to use Arch Linux, or an Arch-derivative, like [Manjaro](https://manjaro.org/downloads/arm/raspberry-pi-4/arm8-raspberry-pi-4-xfce/). There is a Mattermost AUR package, where a refreshingly old-school, docker-avoiding, alternative-to-AMD64-arch-friendly Makefile has been written, and is maintained. See [here](https://aur.archlinux.org/packages/mattermost/), for more details. 😔

---

<div class="post-metadata">

**Author:** ![esbeeb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/esbeeb/32/3211_2.png) [@esbeeb](https://forum.mattermost.com/u/esbeeb)\
**Post date:** [March 25, 2020, 11:15am UTC](https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112/5 "2020-03-25T11:15:13Z")

</div>

> [@esbeeb](#):
>
> PS: To install Mattermost on a Raspberry Pi 4, the most straightforward, docker-avoiding pathway is probably to use Arch Linux, or an Arch-derivative, like [Manjaro](https://manjaro.org/downloads/arm/raspberry-pi-4/arm8-raspberry-pi-4-xfce/). There is a Mattermost AUR package, where a refreshingly old-school, docker-avoiding, alternative-to-AMD64-arch-friendly Makefile has been written, and is maintained. See [here](https://aur.archlinux.org/packages/mattermost/), for more details.

I’ve changed my mind. These instructions are a bit outdated (at present), but are awesome, and were just what I was looking for!! 😀

> <https://github.com/justinegeffen/mattermost_raspberrypi_recipe/blob/master/README.md>

---

<div class="post-metadata">

**Author:** ![esbeeb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/esbeeb/32/3211_2.png) [@esbeeb](https://forum.mattermost.com/u/esbeeb)\
**Post date:** [March 27, 2020, 10:49pm UTC](https://forum.mattermost.com/t/raspberry-pi-4-mattermost-inside-docker/8112/6 "2020-03-27T22:49:00Z")

</div>

By the way, MariaDB, which is pretty much a drop in replacement for MySQL, does make an ARM64 docker image (and MySQL doesn’t). If the build system/documentation were to elect to use MariaDB instead, this would open up the door to installing Mattermost, by way of Docker, on Ubuntu 18.04 64-bit for the Raspberry Pi 4.

 ![docker_mariadb](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/4/41f0d5e3715200f12972b7b89fe1cd668d82ba6d.png)

_Note: I use MariaDB on my own Raspberry Pi 4 just fine, with Mattermost._
