Mattermost is a self-hosted corporate chat with channels, direct messages, and integrations that can be deployed on your own VDS as a replacement for cloud services like Slack. All messages and files stay on the company's own server rather than with an outside provider.
When Mattermost replaces Slack, and when it is not worth trying
Mattermost fits a company that needs employee conversations and message history to stay inside its own infrastructure — relevant for teams with data retention requirements, or simply for teams that would rather not depend on an outside service.
If a team is small and a cloud messenger's capabilities are already enough for it, running and maintaining a dedicated server makes little sense: updates, backups, and availability then have to be handled in-house instead of by a provider in the cloud.
What the server needs for Mattermost
Mattermost is deployed through Docker — setting up Docker on a VDS is covered in the article on setting up Docker on a VPS. The standard way to run it is an application container together with a PostgreSQL database container.
For a small team, 2 to 4 GB of memory is enough — the lower end fits a few dozen active users, while the upper end leaves room for simultaneous calls and bot integrations.
Comparing Mattermost with cloud messengers
The basic set of messaging features matches between Mattermost and cloud alternatives; the difference is in who is responsible for the server and the data.
| Parameter | Cloud messenger | Mattermost on your own VDS |
|---|---|---|
| Where message history is stored | on the service provider's servers | on your own server |
| Bot integrations | through the official marketplace | through an open API with no limits |
| Limit on channels and members | depends on the plan | depends on the VDS resources |
| Responsibility for backups | the service provider | the server administrator |
Installation and domain setup
The application and database containers start together through Docker Compose, after which a domain still needs to be set up.
# Running Mattermost and PostgreSQL through Docker Compose
docker compose up -d
# By default the application listens on port 8065
To open Mattermost over HTTPS on port 443, rather than by IP and port 8065, the domain is connected through a reverse proxy with an SSL certificate — how to do that with Nginx and Certbot is covered in the article on setting up SSL on Nginx.
What to do when notifications or login do not work
Most Mattermost problems after installation are not about the chat itself, but about the environment around it.
- Check the SMTP settings in the admin console — without a working mail server, email notifications and password reset messages do not arrive.
- Make sure the server sending the mail is configured correctly and is not flagged as spam — setting up your own mail server is covered in the article on Postfix on a VPS.
- Check port 587 if mail goes out through an external SMTP relay — that is the port most commonly used for authenticated sending.
- Check the application container's system logs — they show exactly which part of a login or mail request failed.
- Compare the domain in the site settings (Site URL) with the real address — a mismatch breaks links in emails and push notifications.
Frequently asked questions
Can Mattermost connect to mobile apps?
Yes, Mattermost has official apps for mobile platforms that connect to the server at the site address the same way a browser does.
Does Mattermost need a dedicated server?
No, Mattermost can run on the same VDS where other containers are already running, as long as there is enough memory for every service at once — 2 to 4 GB is needed for Mattermost and its database alone.
What happens to the message history when moving to another server?
The history is stored in the PostgreSQL database, so moving to a new server comes down to moving the database volume and the configuration — the messages themselves are not lost in the process.