Not my proudest work, but I needed a quick shell script.

I’ve been diving deeper into Matrix bridges lately — those connectors that let Matrix users communicate with other platforms like WhatsApp, Telegram, Discord, Slack, and more. In doing so, I’ve learned a lot about how these bridges are built, deployed, and maintained. The twist? I’m running everything on OpenBSD.

Running -current on OpenBSD is great, but it does mean I often need to compile packages faster than the official release cycle provides. That’s where this little helper script came in — a quick way to clone, patch, and compile the Go-based Matrix bridges so they run cleanly on my OpenBSD systems.

The Script

The script, available here:
👉 https://gitlab.com/oneguynick/openbsd-script-to-build-go-matrix-bridges

handles a lot of the grunt work:

  • Checks for dependencies (go and olm) and installs them if missing.
  • Clones or updates the various mautrix-* repositories.
  • Applies BSD-friendly tweaks to each build.sh (fixing shebangs, export paths, and replacing GNU-specific date flags).
  • Compiles and organizes the resulting binaries into a single directory for deployment.

It’s not pretty, but it’s functional — and it lets me rebuild all my Matrix bridges in one go without waiting on ports or releases.

Supported Bridges

Right now, the script handles the following bridges, all verified to compile on OpenBSD:

  • mautrix-whatsapp: Bridges Matrix with WhatsApp, allowing communication between Matrix users and WhatsApp contacts.
  • mautrix-meta: Bridges Matrix with Instagram, Facebook, and Facebook Messenger, allowing Matrix users to chat with contacts across all three platforms.
  • mautrix-gmessages: Bridges Matrix with Google Messages, enabling interaction with users on the Google Messages platform.
  • mautrix-twitter: Bridges Matrix with Twitter, enabling Matrix users to post and read tweets from Twitter accounts.
  • mautrix-linkedin: Bridges Matrix with LinkedIn, allowing Matrix users to send messages and view posts from LinkedIn.
  • mautrix-slack: Bridges Matrix with Slack, enabling Matrix users to chat in Slack channels and direct messages.
  • mautrix-bluesky: Bridges Matrix with Bluesky, a decentralized social network that is in active development.
  • mautrix-gvoice: Bridges Matrix with Google Voice, providing Matrix users the ability to make and receive Google Voice calls and messages.
  • mautrix-telegramgo: Bridges Matrix with Telegram, allowing Matrix users to communicate with Telegram contacts.
  • mautrix-discord: Bridges Matrix with Discord, letting Matrix users send and receive messages in Discord channels.
  • mautrix-twilio: Bridges Matrix with Twilio, enabling the sending of SMS messages from Matrix to phone numbers through Twilio’s API.

Each one builds from its upstream Git repository, applies OpenBSD-safe patches, and drops the finished binary in ~/git/matrix-binaries.

What’s Still Broken

Signal.
It’s the one that refuses to cooperate. The mautrix-signal bridge still fails on OpenBSD due to an issue with compiling libsignal crypto. The libsignal crypto library, which is crucial for the Signal bridge to work, doesn’t compile correctly on OpenBSD due to platform-specific issues. I’ve been tracking this issue intermittently, but until the libsignal compile issues are resolved, Signal remains the outlier in the set.

Why This Exists

While Matrix bridges are generally Linux-first, there’s no reason they shouldn’t run well on OpenBSD. The system’s simplicity, correctness, and security model make it an ideal base for hosting bridges and bots. My eventual goal is to turn these tweaks into proper OpenBSD ports, so others can install them directly via pkg_add instead of compiling manually.

For now, the script gets the job done — it’s a work in progress, but one that’s helping me understand both Matrix internals and how OpenBSD handles Go-based software at scale.

If you’re running OpenBSD and want to experiment with Matrix bridges, you can start with this script and follow the official Mautrix documentation here:
📘 https://docs.mau.fi/bridges/