Mattermost is an accurate clone of Slack, providing open-source self-hosted team chat. Mattermost Inc produces client apps for most platforms, the back-end is written in Go so I imagine even a single instance should scale rather well.
Download Mattermost, I followed Mattermost docs.
> cd /tmp
> wget https://releases.mattermost.com/X.Y.Z/mattermost-X.Y.Z-linux-amd64.tar.gz
> tar -vxzf mattermost-*.gz
> mv mattermost /srv/
> chown -R mattermost:mattermost /srv/example.net/mattermost
> mkdir -p /mnt/DATA_DISK/mattermost.example.net/data
> chown mattermost:mattermost -R /mnt/DATA_DISK/mattermost.example.net/data
> useradd --system mattermost
Update config/config.json
:
--- config/config.json.dist
+++ config/config.json
"SqlSettings": {
+ "DriverName": "postgres",
+ "DataSource": "postgres:///mattermost?host=/run/postgresql",
...
"FileSettings": {
+ "DriverName": "local",
+ "Directory": "/mnt/DATA_DISK/mattermost",
...
Here are some more settings which are set in the admin web interface, no need to edit these directly in config.json
.
--- config/config.json.dist
+++ config/config.json
- "SiteURL": "",
+ "SiteURL": "https://mattermost.example.net",
# Fetch link metadata to embed in chat
- "EnableLinkPreviews": false,
+ "EnableLinkPreviews": true,
# MFA
- "EnableMultifactorAuthentication": false,
+ "EnableMultifactorAuthentication": true,
# Custom image emojis
- "EnableCustomEmoji": false,
+ "EnableCustomEmoji": true,
# Email invites
- "EnableEmailInvitations": false,
+ "EnableEmailInvitations": true,
# Allow new bots
- "EnableBotAccountCreation": false,
+ "EnableBotAccountCreation": true,
# Allow users to close their account
- "EnableUserDeactivation": false,
+ "EnableUserDeactivation": true,
# Autoreply/OutOfOffice messages
- "ExperimentalEnableAutomaticReplies": false,
+ "ExperimentalEnableAutomaticReplies": true,
# Email users with pending notifications
- "SendEmailNotifications": false,
+ "SendEmailNotifications": true,
# Email verification
- "RequireEmailVerification": false,
+ "RequireEmailVerification": true,
# ...
- "EnablePreviewModeBanner": true,
+ "EnablePreviewModeBanner": false,
# Hide user email addresses
- "ShowEmailAddress": true,
+ "ShowEmailAddress": false,
# Disable Mattermost survery sent to all users
- "Plugins": {},
+ "Plugins": {
+ "com.mattermost.nps": {
+ "enablesurvey": false
+ }
+ },
# Security: Check signature of installed plugins
- "RequirePluginSignature": false,
+ "RequirePluginSignature": true,
# Timezone in user settings
- "ExperimentalTimezone": false
+ "ExperimentalTimezone": true