matterbridge

repository·master·Indexed 27 days ago

https://github.com/42wim/matterbridge

A chat bridge that enables communication across different messaging protocols, including Discord, Slack, Telegram, and Matrix. It supports message edits, deletes, threading, and file attachments. The tool can be installed via binaries or Go, configured using TOML files, and deployed using Docker or Systemd.

Tokens
1.1K
Snippets
4
Records
9
Agent score
43%

What's inside matterbridge

  1. Build with WhatsApp multidevice support (beta)

    master

    Because the WhatsApp multidevice library is GPL3, binaries are not provided. You must build it yourself using the whatsappmulti build tag. This also requires building from source via Go.

    go install -tags whatsappmulti github.com/42wim/matterbridge@master
    
    # If low on memory and not using msteams
    go install -tags nomsteams,whatsappmulti github.com/42wim/matterbridge@master
  2. Install matterbridge via Go

    master

    You can install matterbridge using go install. Go 1.18+ is required.

    To build without a C compiler (useful on Windows or to avoid GCC dependencies), set CGO_ENABLED=0 before the command.

    Note: Building with all bridges enabled requires approximately 3GB of RAM. You can reduce memory usage by using build tags like nomsteams or nozulip to exclude specific bridges.

  3. Install matterbridge via binaries

    master

    Download the latest stable release binaries from the GitHub releases page. On *nix platforms, you must make the binary executable using chmod a+x before running it.

    Example for Linux:

    chmod a+x matterbridge-1.26.0-linux-64bit
  4. Configure a bridge between Mattermost and IRC

    master

    Use the following TOML configuration structure to bridge a Mattermost team to an IRC channel on Libera.Chat. This example uses a gateway to link the two accounts.

    [irc]
        [irc.libera]
        Server="irc.libera.chat:6667"
        Nick="yourbotname"
    
    [mattermost]
        [mattermost.work]
        Server="yourmattermostserver.tld"
        Team="yourteam"
        Login="yourlogin"
        Password="yourpass"
        PrefixMessagesWithNick=true
        RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
    
    [[gateway]]
    name="mygateway"
    enable=true
        [[gateway.inout]]
        account="irc.libera"
        channel="#testing"
    
        [[gateway.inout]]
        account="mattermost.work"
        channel="off-topic"
  5. Configure a bridge between Slack and Discord

    master

    Use the following TOML configuration to bridge a Slack channel to a Discord server using tokens for authentication.

    [slack]
    [slack.test]
    Token="yourslacktoken"
    PrefixMessagesWithNick=true
    
    [discord]
    [discord.test]
    Token="yourdiscordtoken"
    Server="yourdiscordservername"
    
    [general]
    RemoteNickFormat="[{PROTOCOL}/{BRIDGE}] <{NICK}> "
    
    [[gateway]]
        name = "mygateway"
        enable=true
    
        [[gateway.inout]]
        account = "discord.test"
        channel="general"
    
        [[gateway.inout]]
        account ="slack.test"
        channel = "general"
  6. Run matterbridge with CLI flags

    master

    You can run the matterbridge binary using several command-line flags to specify configuration, enable debugging, or enable the gops agent. By default, it looks for a configuration file named matterbridge.toml.

    Usage of ./matterbridge:
      -conf string
            config file (default "matterbridge.toml")
      -debug
            enable debug
      -gops
            enable gops agent
      -version
            show version