mirror of
https://github.com/mautrix/signal.git
synced 2026-11-16 23:13:56 +00:00
Page:
Bridge setup with Docker
No results
9
Bridge setup with Docker
Tulir Asokan edited this page 2020-12-27 12:52:51 +02:00
Table of contents
Requirements
- Docker
- Docker Compose, or knowledge how to read a docker-compose file and run the docker containers yourself
- A Matrix homeserver that supports application services (e.g. Synapse)
Notes
These instructions use theThe upstream image has been updated to match the maunium image.dock.mau.dev/maunium/signaldimage instead ofdocker.io/finn/signaldfor signald, as the former has a more recent version of Java and a sane default data directory.- By default, the bridge runs as root. You can run it as a different user, but make sure you
chownall the files and make signald run as the same user.
Setup
- Create a directory for the bridge and cd into it:
mkdir mautrix-signal && cd mautrix-signal. - Create
docker-compose.ymlthat contains something like this:version: "3.7" services: mautrix-signal: container_name: mautrix-signal image: dock.mau.dev/tulir/mautrix-signal restart: unless-stopped volumes: - ./bridge:/data - ./signald:/signald depends_on: - signald signald: container_name: signald image: docker.io/finn/signald restart: unless-stopped volumes: - ./signald:/signald db: image: postgres:13-alpine restart: unless-stopped environment: POSTGRES_USER: mautrixsignal POSTGRES_DATABASE: mautrixsignal POSTGRES_PASSWORD: foobar volumes: - ./db:/var/lib/postgresql/data - Run
docker-compose up -d signaldto start signald and make sure it doesn't crash. - Run
docker-compose up mautrix-signalto make the bridge generate a config file for you. - Update the config to your liking.
- As usual, you'll at least need to change the homeserver settings and add yourself to the permissions section.
- Only postgres is supported as the bridge database, so configure that too. If you use the docker-compose example above directly, use
postgres://mautrixsignal:foobar@db/mautrixsignalas the database URI (but change the password to something else thanfoobar). - Additionally, you need to update the paths in the
signalsection:socket_pathis/signald/signald.sockoutgoing_attachment_dirshould be/signald/attachments(if you can figure out how, you could even use a shared tmpfs for that directory to avoid unencrypted files being temporarily stored on disk)avatar_diris/signald/avatars
- 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.yamlunder theapp_service_config_filessection:app_service_config_files: ["/path/to/your/mautrix-signal/bridge/registration.yaml"] - Restart Synapse to apply changes.
- Run
docker-compose up -dto start the bridge.
Upgrading
docker-compose pulldocker-compose up -d
Wiki deprecated
mautrix-signal docs are now on docs.mau.fi