What is Mattermost?
Mattermost is a secure collaboration platform for accelerating mission-critical collaborative work. The platform is built to meet the custom needs of technical and operational teams in rigorous and complex environments, including government, defense, and critical infrastructure. Mattermost gives organizations full control over their data with self-hosted and private deployment options and access to the source code. - https://docs.mattermost.com/about/product.html
Installing Docker
- Log into the Linux based device
- Run the following commands in the terminal
# install prerequisites
sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
# add docker software repository
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
# install docker
sudo apt install docker-ce docker-compose containerd.io -y
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER
Running Mattermost
- Now that Docker is installed, run the following commands to setup the Mattermost Docker container and run it
# clone git repo
git clone https://github.com/mattermost/docker ~/docker/mattermost
# create working directories
mkdir ~/docker/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes} -p
# create a copy of .env
cp ~/docker/mattermost/env.example ~/docker/mattermost/.env
# set owner of working directories
sudo chown "$USER":"$USER" ~/docker -R
# allow the container to write to working directories
sudo chmod a+rwx -R ~/docker/mattermost
# replace default paths
sudo sed -i "s|/volumes||" ~/docker/mattermost/.env
# edit .env
nano ~/docker/mattermost/.env - Modify at least the following values in .env to suit your needs
DOMAIN=ubuntuserver.local
TZ=America/New_York
POSTGRES_USER=mattermost_rw
POSTGRES_PASSWORD=Matt3rM0st - Press CTRL+O, Enter, CTRL+X to write the changes to .env
- Continue with the following commands
# cd to matter most directory
cd ~/docker/mattermost
# run mattermost container
sudo docker compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d - Open a web browser and navigate to http://DNSorIP:8065
- Click the View in Browser button
- Complete the form to create an account
- Enter an Organization Name > Click Continue
- Complete the remaining prompts or choose to skip
- Welcome to Mattermost running in Docker
Source: https://docs.mattermost.com/install/install-docker.html