selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
matterbridge logo

Self-host matterbridge

v1.26.0

Chat relay bridging Discord, IRC, Matrix, Slack and more

ReleaseOpen SourceApache-2.0
docker run -ti --mount "type=bind,source=$(pwd)/matterbridge,target=/etc/matterbridge,readonly" 42wim/matterbridge:stable
Updatedlast year
LanguageGo
Setup difficultyEasy
Stars
7 615
Port
4242 (built-in API when an [api] account is configured)
Docker
42wim/matterbridge
matterbridge screenshot 1

What is matterbridge?

matterbridge alternatives

Should you self-host matterbridge?

matterbridge scores 69/100 on selfhost.directory (how scoring works) and ranks #3 of 13 in Instant Messaging. It has 7 615 GitHub stars, +38 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Rocket.Chat (81/100, 46 381 stars). It scores higher overall, so compare the two before you pick. See matterbridge vs Rocket.Chat side by side.

Features

  • File and attachment relay
  • Mattermost-independent operation
  • Message edit and delete relayFull in/out for Discord, Mattermost, Slack, Matrix and Telegram; incoming-only for Gitter and RocketChat; IRC has neither.
  • Multiple chat networks per instance
  • Multi-protocol chat bridging
  • Private group bridging
  • REST API
  • Same-channel gateway mapping
  • Scriptable message rewriting
  • Steam bridgeRemoved because the underlying go-steam library is unmaintained.
  • Thread preservation
  • Username and avatar spoofing
  • WebSocket message stream

matterbridge README

How to install matterbridge

Install matterbridge with Docker

docker run -ti --mount "type=bind,source=$(pwd)/matterbridge,target=/etc/matterbridge,readonly" 42wim/matterbridge:stable

Config is mounted read-only at /etc/matterbridge.

How to configure matterbridge

  • RemoteNickFormatGeneral setting defining how remote users appear on this bridge; supports placeholders like {NICK}, {PROTOCOL}, {GATEWAY}.
  • StripNickfalseGeneral setting that only allows alphanumerical nicks and strips other characters.

    values: true/false

  • IgnoreFailureOnStartfalseDisable a bridge that fails at startup and continue with the other ones.

    values: true/false

  • LogFileFile to write logs into instead of stdout; no log rotation, so logrotate is suggested.
  • MediaDownloadSize1000000Maximum size of attachments, videos and images that matterbridge downloads and re-uploads.

matterbridge releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Why can't Teams messages with attachments or images be received?

The Microsoft API does not support it.

Why do Keybase edits and deletes not work?

The Keybase chat library matterbridge uses does not support them.

Why aren't deleted messages on Gitter removed on the other bridges?

Gitter's API does not emit delete events, so matterbridge cannot pick them up; deletions started on the other side do reach Gitter.

What does the Mattermost "version not supported" error mean?

matterbridge connects over HTTPS by default; for a plain HTTP test server add `NoTLS=true` and point Server at port 8065.

Why does Mattermost not send anything to the other bridges?

Create a dedicated account for matterbridge instead of using your own, as described in the Mattermost section of the wiki.

Why do deleted Telegram messages stay on the other bridges?

Telegram does not expose deleted-message metadata, so matterbridge cannot know a message was removed.

Why does matterbridge not relay messages from Telegram?

Telegram bot privacy mode interferes with what the bot can see; the FAQ points to Telegram's bot privacy-mode documentation for the fix.

Do I need to allow inbound connections for webhooks to work?

No, inbound connections are not required.

Why aren't edited messages updated on Discord but a new "(edit)" message appears?

Discord webhooks cannot edit messages; disable webhooks and authenticate with the token only if you want edits bridged.

Why do role or user mentions show IDs instead of names on the other bridges?

Grant the bot the "Manage Roles" permission so mentions can be resolved to names.

Why is Discord not getting or sending messages?

Check that the channel is addressed correctly; using the numeric channel ID with `channel="ID:number"` instead of the name often fixes it, and make sure the bot was not banned from the server.

Why do Slack messages arrive labelled as coming from the Slack API tester?

The nickname shown comes from the RemoteNickFormat setting; set it explicitly, for example to `RemoteNickFormat="<{NICK}>"`.

Why is a message being skipped?

matterbridge never relays messages sent by the very account it is logged in as, so the bridge needs its own dedicated user account.

More in Instant Messaging

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…