Skip to content
A minimal implementation of a room directory server for Matrix
Go Dockerfile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api Support a dedicated origin header Aug 6, 2019
common Appservice processing and admin user invite acceptance Aug 1, 2019
db Order rooms by joined members Aug 6, 2019
directory Serve federation public rooms from DB Aug 5, 2019
key_server Proof of concept for directory Aug 1, 2019
logging Early project (health endpoint, no logic) Jul 31, 2019
matrix_appservice Basic appservice management Aug 5, 2019
matrix_appservice_processor Don't react to membership events Aug 8, 2019
meta Early project (health endpoint, no logic) Jul 31, 2019
util
.gitignore Early project (health endpoint, no logic) Jul 31, 2019
Dockerfile Early project (health endpoint, no logic) Jul 31, 2019
LICENSE Early project (health endpoint, no logic) Jul 31, 2019
README.md Fix readme Aug 5, 2019
go.mod Early project (health endpoint, no logic) Jul 31, 2019
go.sum Early project (health endpoint, no logic) Jul 31, 2019
main.go Serve federation public rooms from DB Aug 5, 2019

README.md

matrix-room-directory-server

A minimal implementation of a room directory server for Matrix

Support room: #matrix-room-directory-server:t2bot.io

Caution: Although this claims to be a room directory server, it is not yet recommended for full-featured deployment. Check the github issues before deploying.

Building and running

This project does not provide any guidelines on how to run this in your infrastructure. It is up to you to determine how best to deploy this, and how much of it actually gets deployed.

The process is meant to be run only attached to a postgres instance and does not have any on-disk requirements other than the executable itself.

You will need to be running or otherwise have access to a matrix-key-server. This project also expects that you have extensive knowledge on how to set up an application service for your server, as demonstrated by the program arguments.

This project uses Go modules and requires Go 1.12 or higher. To enable modules, set GO111MODULE=on.

# Build
git clone https://github.com/t2bot/matrix-room-directory-server.git
cd matrix-room-directory-server
go build -v -o bin/matrix-room-directory-server

# Run
./bin/matrix-room-directory-server \
    -keyserver="https://keys.t2host.io" \
    -address="0.0.0.0" \
    -port=8080 \
    -postgres="postgres://username:password@localhost/dbname?sslmode=disable" \
    -astoken="RandomStringForAppserviceToken" \
    -hstoken="RandomStringForHomeserverToken" \
    -hsurl="https://t2bot.io" \
    -adminuser="@alice:example.org"

Docker

docker run -it --rm \
    -e "ADDRESS=0.0.0.0" \
    -e "PORT=8080" \
    -e "KEYSERVER=https://keys.t2host.io" \
    -e "POSTGRES=postgres://username:password@localhost/dbname?sslmode=disable" \
    -e "ASTOKEN=RandomStringForAppserviceToken" \
    -e "HSTOKEN=RandomStringForHomeserverToken" \
    -e "HSURL=https://t2bot.io" \
    -e "ADMINUSER=@alice:example.org" \
    t2bot/matrix-room-directory-server

Build your own by checking out the repository and running docker build -t t2bot/matrix-room-directory-server .

You can’t perform that action at this time.