Requirements
- Docker
- A Matrix homeserver that supports application services (e.g. Synapse)
- A PostgreSQL server. You can use the same one you use for Synapse or run another instance in a Docker container.
Setup
Docker images are hosted on dock.mau.dev
- Create a directory for the bridge and cd into it:
mkdir mautrix-facebook && cd mautrix-facebook.
N.B. The docker image will chown its /data directory to UID 1337. The commands below mount the working directory as /data, so make sure you always run them in the correct directory.
- Pull the docker image with
docker pull dock.mau.dev/tulir/mautrix-facebook:latest
- Run the container for the first time, so it can create a config file for you:
docker run --rm -v `pwd`:/data:z dock.mau.dev/tulir/mautrix-facebook:latest
- Update the config to your liking. You'll at least need to change the homeserver and database settings, and add yourself to the permissions section.
- Generate the appservice registration by running the container again, same command as above.
- Add the path to the registration file to your Synapse's
homeserver.yaml under the app_service_config_files section:
app_service_config_files: ["/path/to/your/mautrix-facebook/registration.yaml"]
- Restart Synapse to apply changes.
- Run the bridge:
docker run --restart unless-stopped -v `pwd`:/data:z dock.mau.dev/tulir/mautrix-facebook:latest
If your Synapse is outside Docker, add -p 29319:29319 before -v ... to expose the bridge port.
Upgrading
- Pull the new version (setup step 1)
- Start the new version (setup step 7)
Docker compose
Create a directory as in step #0 and create docker-compose.yml that contains something like this:
version: "3.7"
services:
mautrix-facebook:
container_name: mautrix-facebook
image: dock.mau.dev/tulir/mautrix-facebook:latest
restart: unless-stopped
ports:
- '29319:29319'
volumes:
- .:/data
Use docker-compose up -d to start, docker-compose stop to stop and docker-compose pull to update.