Skip to content
Live $100 credit at signup, up to $300 total Offer ends December 31, 2026 Get started →

Mattermost

Mattermost is an open-source, self-hosted messaging and collaboration platform for teams. It provides channels, direct messages, file sharing, search, and integrations as a private alternative to hosted chat services, with your data staying on your own infrastructure. The server listens on port 8065.

ComponentVersion
Mattermost Team Edition11.8.3
PostgreSQL18 Alpine
Ubuntu24.04 LTS

Set these optionally when you deploy from the marketplace. Leave a field blank to have a secure value generated.

VariableDescription
DOMAINPublic domain for Mattermost
POSTGRES_PASSWORDPostgreSQL password
MM_SERVICESETTINGS_SITEURLPublic site URL for Mattermost
ssh ubuntu@<your-vm-ip>

On first boot, Mattermost generates a database password and starts PostgreSQL, Mattermost, and Nginx as a Docker Compose stack. Track progress with:

sudo journalctl -u mattermost-first-boot.service -f

Then verify the stack:

cd /opt/mattermost && docker compose ps

If you set DOMAIN or MM_SERVICESETTINGS_SITEURL at deploy time, point a DNS record for that hostname at the VM and open it over HTTPS through a reverse proxy that terminates TLS:

https://<your-domain>

If you left those unset, reach the VM directly by IP:

http://<your-vm-ip>

Complete the setup wizard to create your administrator account. The first account you create becomes the System Administrator. The image does not create shared default login credentials.

Mattermost runs as a Docker Compose stack in /opt/mattermost.

# Check status
cd /opt/mattermost && docker compose ps
# Restart
cd /opt/mattermost && docker compose restart
# View logs
cd /opt/mattermost && docker compose logs -f
PathPurpose
/opt/mattermost/docker-compose.ymlCompose stack
/opt/mattermost/.envDatabase and Mattermost environment
/opt/mattermost/volumes/db/PostgreSQL data
/opt/mattermost/volumes/app/mattermost/Mattermost config, files, logs, and data

Mattermost is exposed through Nginx on port 80. The application port 8065 stays inside the Docker network. UFW is enabled and allows HTTP (port 80) and SSH (port 22).

To restrict the UI to a specific IP:

sudo ufw delete allow 80/tcp
sudo ufw allow from <trusted-ip> to any port 80

To access the UI without leaving port 80 open, use an SSH tunnel:

First close the public port on the VM, since it is open by default:

sudo ufw delete allow 80/tcp
# Run this on your local machine
ssh -L 8080:localhost:80 ubuntu@<your-vm-ip>
# Then open in a browser
http://localhost:8080

For production use, place Mattermost behind a reverse proxy with a trusted TLS certificate and set its site URL to your public HTTPS domain.

Last updated: