Skip to content
Switch branches/tags
Go to file


Build Status Coverage Status

This is an application service that bridges Matrix to Rocket.Chat.

This Project is currently not maintained. There were breaking changes in the matrix API, which means that inviting the bot doesn't work (other things might be broken too). I might work on a re-write of the bridge. But if I ever release it, then it will take quite some time.

Warning: This application service is still in development. Do not use it! There will be breaking changes!


Compiling from Source

To compile the application service you need Rust >= 1.34.

It's highly recommended that you use rustup.

git clone
cd matrix-rocketchat
cargo build --release


SQLite is used to store the data:

# On Ubuntu
sudo apt-get install libsqlite3-dev

# On Arch Linux
sudo pacman -S sqlite

If you are using the application service on Linux, you'll have to install OpenSSL:

# On Ubuntu
sudo apt-get install libssl-dev

# On Arch Linux
sudo pacman -S openssl


It's strongly recommended to use HTTPS when running the service!

The HTTPS configuration can either be done as part of the application service or a reverse proxy can be used.

Application Service

The service can be exposed via HTTPS by providing a PKCS 12 file and a password to decrypt the file.

To convert a certificate and a private key into a PKCS 12 file, the following command can be used:

openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out cert.p12

The command will prompt for a password.

Configuration parameters:

as_address: ""
as_url: ""
use_https: true
pkcs12_path: "/pass/to/cert.p12
pkcs12_password: "p12password"

Reverse Proxy

The application service can be run behind a reverse proxy and let the reverse proxy handle the HTTPS.

In this case, it's important to bind the application service only to localhost!

NGINX example config:

http {
  ssl_certificate       /etc/letsencrypt/live/;
  ssl_certificate_key   /etc/letsencrypt/live/;
  ssl_protocols         TLSv1.2 TLSv1.1;
  ssl_ciphers           EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;

  server {
    listen       443 ssl;
    location / {
      proxy_pass          http://localhost:8822/;
      proxy_set_header    Host            $host;
      proxy_set_header    X-Real-IP       $remote_addr;
      proxy_set_header    X-Forwarded-for $remote_addr;
      port_in_redirect    off;

Configuration parameters:

as_address: ""
as_url: ""
use_https: false


I learned a lot by reading the code of the following projects:

From the first one I learned a lot about Rust and Iron. The second one helped me to understand how a Matrix bridge works.


Special thanks to Steffi who created the logo for this project.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


Application service to bridge Matrix <-> Rocket.Chat.




No releases published


No packages published