mirror of
https://github.com/mautrix/whatsapp.git
synced 2026-11-16 23:05:00 +00:00
No results
19
Bridge setup
Tulir Asokan edited this page 2020-10-19 15:47:33 +03:00
Requirements
Compilation (optional)
- Go 1.13+ (download & installation instructions at https://golang.org/dl/)
- Olm dev headers and a C/C++ compiler (if you want end-to-bridge encryption)
Runtime
- A Matrix homeserver that supports application services (e.g. Synapse)
- A WhatsApp client running on a phone or in an emulated Android VM.
- libolm3 (if you compiled manually and want end-to-bridge encryption)
- ffmpeg (if you want to send gifs from Matrix)
Installation
You may either compile the bridge manually or download a prebuilt executable from the mau.dev CI.
Compiling manually
- Clone the repo with
git clone https://github.com/tulir/mautrix-whatsapp.git - Enter the directory (
cd mautrix-whatsapp) - Run
./build.shto fetch Go dependencies and compile (build.shwill simply callgo buildwith some additional flags).- If you want end-to-bridge encryption, make sure you have a C/C++ compiler and the Olm dev headers (
libolm-devon debian-based distros) installed.- If you use libolm2 (currently in Debian stable), use
./build.sh -tags nosasto build in libolm2 compatibility mode. By default, libolm3 is required.
- If you use libolm2 (currently in Debian stable), use
- If not, use
./build.sh -tags nocryptoto disable encryption
- If you want end-to-bridge encryption, make sure you have a C/C++ compiler and the Olm dev headers (
Downloading a prebuilt executable
- Go to https://mau.dev/tulir/mautrix-whatsapp/pipelines?scope=branches&page=1
- Find the entry for the
masterbranch and click the download button on the right-hand side in the list.- The builds are all static with olm included, but SQLite may not work. Postgres is recommended anyway.
- Extract the downloaded zip file into a new directory.
Configuring and running
- Copy
example-config.yamltoconfig.yaml - Update the config to your liking.
- You need to make sure that the
addressanddomainfield point to your homeserver. - You will also need to add your user of admin user under the
permissionssection.
- You need to make sure that the
- Generate the appservice registration file by running
./mautrix-whatsapp -g.- You can use the
-cand-rflags to change the location of the config and registration files. They default toconfig.yamlandregistration.yamlrespectively.
- You can use the
- Add the path to the registration file (
registration.yamlby default) to your synapsehomeserver.yamlunderapp_service_config_files. You will then need to restart the synapse server. Remember to restart it every time the registration file is regenerated. - Run the bridge with
./mautrix-whatsapp.
Updating
If you compiled manually, pull changes with git pull and recompile with go build.
If you downloaded a prebuilt executable, simply download a new one and replace the old one.
Finally, start the bridge again.
Wiki deprecated
mautrix-whatsapp docs are now on docs.mau.fi