Matterbridge
How-To Guide: Edit the Cron Job
SSH to OpenSupernova.org and run:
sudo crontab -e
Explanation: Matterbridge
Matterbridge connects messaging channels across platforms such as Slack,
Mattermost, and Gitter. The matterbridge binary is used with a TOML
configuration file:
./matterbridge -conf config-tardis-matterbridge.toml
The TOML file contains parameters required to connect rooms, including tokens and passwords. When the application runs, messages can be shared between the connected rooms.
TARDIS keeps a service running on the OpenSupernova.org server to run Matterbridge as a daemon. Configuration files are stored in a private GitHub repository, including the custom TOML and Linux service files.
The server runs Ubuntu 14.04, so TARDIS uses an Upstart script instead of a Systemd service file. A Systemd file is also included in the repository. A cron job restarts the service periodically to prevent disconnections.
Reference: Matterbridge Reference
Matterbridge command:
./matterbridge -conf config-tardis-matterbridge.toml
Matterbridge configuration:
Use the TOML file in
tardis-matterbridgeas an example.Configure as many gateways as needed.
For Slack, follow the Matterbridge wiki Slack setup steps and read the linked comment warning not to add scopes manually.
For Gitter, create a dedicated GitHub bot account and copy the token.
For Mattermost, follow the Matterbridge wiki Mattermost setup steps.
Important paths:
Matterbridge executable:
/usr/local/bin/matterbridgeMatterbridge TOML config:
/usr/local/etc/matterbridge/config-tardis-matterbridge.tomlUpstart service config:
/etc/init/matterbridge.conf
Important repositories and services:
OpenSupernova.org server: http://opensupernova.org
Private Matterbridge repository: https://github.com/tardis-sn/tardis-matterbridge
Matterbridge releases: https://github.com/42wim/matterbridge/releases/latest
How-To Guide: Set Up Matterbridge
SSH to the OpenSupernova.org server.
Download the Matterbridge binary for Linux from the releases section.
Make the file executable and rename it to
matterbridge.Copy the
matterbridgeexecutable to/usr/local/bin.Clone the
tardis-matterbridgerepository in$HOME.Copy
config-tardis-matterbridge.tomlto/usr/local/etc/matterbridge/.Copy
matterbridge.confto/etc/init/.Start the service:
sudo service matterbridge start
Test the gateways.
How-To Guide: Update Server Configuration
After updating the TOML file:
SSH to the OpenSupernova.org server.
Copy the new
config-tardis-matterbridge.tomlto/usr/local/etc/matterbridge/.Restart the service:
sudo service matterbridge restart
Test the gateways.
If everything works, open a pull request to
tardis-matterbridgewith the new TOML file.
Matterbridge links:
OpenSupernova.org: http://opensupernova.org
Private Matterbridge repository: https://github.com/tardis-sn/tardis-matterbridge
Upstart script: https://www.digitalocean.com/community/tutorials/the-upstart-event-system-what-it-is-and-how-to-use-it
Systemd service: https://freedesktop.org/software/systemd/man/systemd.service.html
Slack setup: https://github.com/42wim/matterbridge/wiki/Slack-bot-setup
Mattermost setup: https://github.com/42wim/matterbridge/wiki/Section-Mattermost-%28basic%29
Slack scopes comment: https://github.com/42wim/matterbridge/issues/964#issuecomment-612721850
Gitter authentication: https://developer.gitter.im/docs/authentication
Matterbridge releases: https://github.com/42wim/matterbridge/releases/latest