Skip to content
Ragon
Star
Apps

Matrix, over Tailscale

Matrix runs on a private homeserver on the node. The homeserver is a container on an internal Docker network with no route out of the machine. Your phone reaches it through Tailscale, so Tailscale is a prerequisite:

  1. Install Tailscale on the node and sign in. Ragon does not install Tailscale, because installing it needs root and signing in uses your own Tailscale account.
  2. Turn on HTTPS once for your tailnet, in the Tailscale admin console (DNS → HTTPS Certificates). Your phone then gets a real certificate.
  3. Install Tailscale on your phone and sign in to the same tailnet.

Then, on the node:

ragon-admin matrix start              # the homeserver, its loopback proxy and `tailscale serve`
ragon-admin matrix add-user <name>    # your account; its password is shown once
ragon chat start                      # the bridge, as the user unit ragon-chat.service

In Element X on your phone, sign in to https://<the node's tailnet name> with that account, then accept the invite from Ragon.

The homeserver's name is the node's tailnet name, and it cannot change later, because every account's id ends in it. If you rename the machine in Tailscale, start refuses to run until you rename it back. The alternative is ragon-admin matrix remove --yes, which deletes the homeserver and its accounts so you can start again. The tailnet name also appears in public Certificate Transparency logs. Your messages do not.

Push notifications are off: the homeserver has no route out. ragon-admin matrix push on lets them out. A push notification carries an event id but no message text. Even so, it reveals that a message arrived, and when.

ragon-admin matrix stop turns the homeserver off until the next start. Your accounts and messages are kept. ragon-admin matrix status shows how it stands.