projects / matrix / joinlink

matrix-joinlink

A bot that allows the creation of Join Links to non-public Rooms in Matrix

Source on GitHubGPL-3.0

matrix-joinlink allows the creation of join links to non-public rooms in Matrix. It uses the trixnity framework.

Reason for this Bot

I always struggled with the problem that I have private rooms, I want to share with a group of friends. Before the bot, I had to invite all the people. Now I can invite JoinLink and create an invite link. This link can be shared to my friends who want to join my room (including spaces).

Setup

  1. Get a matrix account for the bot (e.g., on your own homeserver or on matrix.org)
  2. Prepare configuration:
    • Copy config-sample.json to config.json
    • Enter baseUrl to the matrix server and username / password for the bot user
    • Set an encryption key. The bot will use this string as key to encrypt the state events.
    • Add yourself (e.g., @user:matrix.org) or your homeserver (e.g., :matrix.org) to the users (empty == allow all). Users can interact with the bot.
    • Add yourself to the admins (can’t be empty)
  3. Either run the bot via jar or run it via the provided docker.
    • If you run it locally, you can use the environment variable CONFIG_PATH to point at your config.json (defaults to ./config.json)
    • If you run it in docker, you can use a command similar to this docker run -itd -v $LOCAL_PATH_TO_CONFIG:/usr/src/bot/data/config.json:ro ghcr.io/dfuchss/matrixjoinlink
    • If you want to persist sessions, you should persist the data volume -v $LOCAL_PATH_TO_DATA:/usr/src/bot/data

Usage

  • A user (see user list in configuration file) can invite the bot to a room.
  • After the bot has joined use !join help to get an overview about the features of the bot (remember: the bot only respond to users in the user list)
  • In order to create a Join Link simply type !join link SomeFancyNameForTheLink and the bot will create a join link. Please make sure that the bot has the ability to invite users.

Help

Creation

Enter

Unlink

← all projects