Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 2026-04-24

## Support for bridging to Meshtastic via meshtastic-matrix-relay

Thanks to [luschmar](https://github.com/luschmar), the playbook now supports bridging to [Meshtastic](https://meshtastic.org/) mesh networks via [meshtastic-matrix-relay](https://github.com/jeremiah-k/meshtastic-matrix-relay) (mmrelay).

To learn more, see our [Setting up a Matrix <-> Meshtastic bridge](./docs/configuring-playbook-bridge-meshtastic-relay.md) documentation page.

## (BC Break) mautrix-telegram has been rewritten in Go (bridgev2)

The [mautrix-telegram](./docs/configuring-playbook-bridge-mautrix-telegram.md) bridge has been [rewritten in Go](https://mau.fi/blog/2026-04-mautrix-release/) on top of the [bridgev2](https://docs.mau.fi/bridges/go/) architecture. See the [upstream v26.04 release notes](https://github.com/mautrix/telegram/releases/tag/v0.2604.0) for what changed in the bridge itself (shared-portal behavior, management-room state, new features, etc.).
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Bridges can be used to connect your Matrix installation with third-party communi
| [matrix-steam-bridge](https://github.com/jasonlaguidice/matrix-steam-bridge) | ❌ | Bridge to [Steam](https://steampowered.com/) | [Link](docs/configuring-playbook-bridge-steam.md) |
| [matrix-wechat](https://github.com/duo/matrix-wechat) | ❌ | Bridge to [WeChat](https://www.wechat.com/) | [Link](docs/configuring-playbook-bridge-wechat.md) |
| [Heisenbridge](https://github.com/hifi/heisenbridge) | ❌ | Bouncer-style bridge to [IRC](https://wikipedia.org/wiki/Internet_Relay_Chat) | [Link](docs/configuring-playbook-bridge-heisenbridge.md) |
| [meshtastic-matrix-relay](https://github.com/jeremiah-k/meshtastic-matrix-relay) | ❌ | Bridge to [Meshtastic](https://meshtastic.org/) mesh networks | [Link](docs/configuring-playbook-bridge-meshtastic-relay.md) |
| [mx-puppet-groupme](https://gitlab.com/xangelix-pub/matrix/mx-puppet-groupme) | ❌ | Bridge to [GroupMe](https://groupme.com/) | [Link](docs/configuring-playbook-bridge-mx-puppet-groupme.md) |
| [mx-puppet-steam](https://codeberg.org/icewind/mx-puppet-steam) | ❌ | Bridge to [Steam](https://steamapp.com/) | [Link](docs/configuring-playbook-bridge-mx-puppet-steam.md) |
| [Postmoogle](https://github.com/etkecc/postmoogle) | ❌ | Email to Matrix bridge | [Link](docs/configuring-playbook-bridge-postmoogle.md) |
Expand Down
95 changes: 95 additions & 0 deletions docs/configuring-playbook-bridge-meshtastic-relay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!--
SPDX-FileCopyrightText: 2025 - 2026 luschmar
SPDX-FileCopyrightText: 2026 Slavi Pantaleev

SPDX-License-Identifier: AGPL-3.0-or-later
-->

# Setting up a Matrix <-> Meshtastic bridge (optional)

The playbook can install and configure [meshtastic-matrix-relay](https://github.com/jeremiah-k/meshtastic-matrix-relay) (sometimes referred to as `mmrelay`) for you — a bridge between [Matrix](https://matrix.org/) and [Meshtastic](https://meshtastic.org/) mesh networks.

See the [project's documentation](https://github.com/jeremiah-k/meshtastic-matrix-relay) to learn what it does and why it might be useful to you.

## Prerequisites

You need a Matrix account for the bot. You can either [register the bot account manually](registering-users.md) or let the playbook create it when running `ansible-playbook … --tags=ensure-matrix-users-created`. Either way, you'll need the account's **password** to configure the bridge — unlike most other bridges in this playbook, `mmrelay` authenticates with a password and creates its own session (optionally with End-to-End Encryption material).

You also need access to a Meshtastic device, connected to the server via one of:

- **TCP**: the device is reachable on the network (e.g. a Meshtastic node running the TCP API),
- **Serial**: the device is plugged in via USB and available on the host (e.g. `/dev/ttyUSB0`),
- **BLE**: the device is reachable via Bluetooth Low Energy from the host.

## Adjusting the playbook configuration

To enable the bridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:

```yaml
matrix_meshtastic_relay_enabled: true

# Password for the bot's Matrix account.
# On first startup, the bridge uses this to log in and persist credentials
# (including End-to-End Encryption material) under its data directory.
# After that, the password can be removed from this variable.
matrix_meshtastic_relay_matrix_bot_password: "PASSWORD_FOR_THE_BOT"

# How the bridge connects to your Meshtastic device.
# One of: tcp, serial, ble
matrix_meshtastic_relay_connection_type: tcp

# For connection_type: tcp
matrix_meshtastic_relay_tcp_host: "meshtastic.local"

# For connection_type: serial
# matrix_meshtastic_relay_serial_port: "/dev/ttyUSB0"

# For connection_type: ble
# matrix_meshtastic_relay_ble_address: "AA:BB:CC:DD:EE:FF"

# Matrix rooms to bridge to Meshtastic channels.
matrix_meshtastic_relay_matrix_rooms_list:
- id: "#meshtastic:{{ matrix_domain }}"
meshtastic_channel: "0"
```

By default, the bot's Matrix ID is `@meshtasticbot:{{ matrix_domain }}`. To change it, adjust `matrix_meshtastic_relay_matrix_bot_user_id`.

### Bluetooth (BLE) connections

When `matrix_meshtastic_relay_connection_type` is `ble`, the container runs with `--network=host` and bind-mounts the host's DBus socket — both are required for Bluetooth pairing/communication. Only use this connection type if you trust the playbook-managed host and are comfortable with these privileges.

### Serial connections

When `matrix_meshtastic_relay_connection_type` is `serial`, the host device referenced by `matrix_meshtastic_relay_serial_port` is passed through to the container. Make sure that `matrix_user_uid` / `matrix_user_gid` have read/write access to that device (e.g. by adding the matrix user to the `dialout` group, or adjusting udev rules).

### Extending the configuration

There are some additional things you may wish to configure about the bridge.

Take a look at:

- `roles/custom/matrix-bridge-meshtastic-relay/defaults/main.yml` for some variables that you can customize via your `vars.yml` file. You can override individual `matrix_meshtastic_relay_*` variables, or make finer-grained adjustments via `matrix_meshtastic_relay_configuration_extension_yaml`.

## Installing

After configuring the playbook, run the playbook with [playbook tags](playbook-tags.md) as below:

<!-- NOTE: let this conservative command run (instead of install-all) to make it clear that failure of the command means something is clearly broken. -->
```sh
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
```

The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`.

`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too.

## Usage

Invite the bot to the Matrix rooms listed in `matrix_meshtastic_relay_matrix_rooms_list` and it will relay between Matrix and the corresponding Meshtastic channel. Messages sent on Meshtastic will appear in Matrix and vice versa.

See the [project's wiki](https://github.com/jeremiah-k/meshtastic-matrix-relay/wiki) for details about commands, plugins and advanced usage.

## Troubleshooting

As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-meshtastic-relay`.
2 changes: 2 additions & 0 deletions docs/configuring-playbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ Bridges can be used to connect your Matrix installation with third-party communi

- [Setting up Heisenbridge bouncer-style IRC bridging](configuring-playbook-bridge-heisenbridge.md)

- [Setting up a Matrix <-> Meshtastic bridge](configuring-playbook-bridge-meshtastic-relay.md)

- [Setting up WeChat bridging](configuring-playbook-bridge-wechat.md)

### Bots
Expand Down
40 changes: 40 additions & 0 deletions group_vars/matrix_servers
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ devture_systemd_service_manager_services_list_auto: |
'groups': ['matrix', 'bridges', 'hookshot', 'bridge-hookshot'],
}] if matrix_hookshot_enabled else [])
+
([{
'name': 'matrix-meshtastic-relay.service',
'priority': 2000,
'restart_necessary': (matrix_meshtastic_relay_restart_necessary | bool),
'groups': ['matrix', 'bridges', 'meshtastic-relay'],
}] if matrix_meshtastic_relay_enabled else [])
+
([{
'name': 'matrix-mautrix-bluesky.service',
'priority': 2000,
Expand Down Expand Up @@ -2489,6 +2496,39 @@ matrix_hookshot_public_hostname: "{{ matrix_server_fqn_matrix }}"
#
######################################################################

######################################################################
#
# matrix-bridge-meshtastic-relay
#
######################################################################

# We don't enable bridges by default.
matrix_meshtastic_relay_enabled: false

matrix_meshtastic_relay_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_meshtastic_relay_container_image_registry_prefix_upstream_default }}"

matrix_meshtastic_relay_matrix_host: "{{ matrix_domain }}"

matrix_meshtastic_relay_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"

matrix_meshtastic_relay_container_network: "{{ matrix_addons_container_network }}"

matrix_meshtastic_relay_systemd_required_services_list_auto: |
{{
matrix_addons_homeserver_systemd_services_list
}}

matrix_meshtastic_relay_container_additional_networks_auto: |
{{
([] if matrix_addons_homeserver_container_network == '' or matrix_addons_homeserver_container_network == matrix_meshtastic_relay_container_network else [matrix_addons_homeserver_container_network])
}}

######################################################################
#
# /matrix-bridge-meshtastic-relay
#
######################################################################

######################################################################
#
# matrix-bridge-mx-puppet-steam
Expand Down
Loading