Install Matrix-Synapse including Whatsapp bridge using docker-compose

Hi @LayLow

If I remember well:

The file config.json should contain your server name as:

{
    "default_server_config": {
        "m.homeserver": {
            "base_url": "https://chat.myserver.com",
            "server_name": "chat.myserver.com"
        },
        "m.identity_server": {
            "base_url": "https://vector.im"
        }
    },
...

The file ...well-known/matrix/server should contain;

{ “m.server”: “chat.myserver.com:443” }

The port 443 may not be required.

At: https://federationtester.matrix.org/ , enter your domain for a test:
chat.myserver.com => Go.

Michel-André

P.S.
homeserver.yaml must contain:

enable_registration: true

P.P.S.

2 Likes

Mercie Bien Michel-André,

Ok, where would this file be (path) please?

This file would be at the default apache path of NS I guess?

That shows me that I have very poor skills :wink:

Thanks for the links and assist. I’ll report back!

Please also check the container logs for errors by using portainer or command line.

Show logs of db container for example:

docker logs synapse-docker-db-1

Show all synapse logs using docker-compose:

docker-compose logs

2 Likes

Hi @LayLow

The config.json in under the “client” element and you copy it from config.sample.json in the same directory or just rename it to config.json.

The file .well-known/matrix/server is in the default web directory: /var/www/html/.well-known/matrix/server.

When login in and the server name is not right you have to use https: i.e. https://chat.myserver.com

Don’t forget to clear the browser cache…

You can have a look at my document (translated in English by a web page which I don’t remember). The translation is not bad, I didn’t do any correction:
https://www.micronator.org/affaires/PDF/NethServer-701/RF-232_Cours_NethServer-701-01_Matrix_Synapse_2021-03-30_12h51_CHAT-EN.pdf.

Michel-André

1 Like

Please see synapse_1 | Starting synapse with args -m synapse.app.homeserver --con - Pastebin.com

There is an error somewhere. I also learned that a yaml file CAN NOT contain any tabs, but idents have to be made by spaces.

See anything?

Hi @michelandre ,

Thanks so much for the details. Let me digest!

Thanks!

There seem to be errors in your homeserver.yaml, check lines 12 and 29:

yaml.parser.ParserError: while parsing a block mapping
in "/data/homeserver.yaml", line 12, column 1
expected <block end>, but found '<block mapping start>'
in "/data/homeserver.yaml", line 29, column 3

You may also share your homeserver.yaml.

Please see DM. I will share the outcome here

Nope, no tabs, and indentation is critical. An indent of two spaces means something completely different than an indent of four spaces.

2 Likes

Ok…

  1. I had a typo. I used ‘arg’ instead of ‘args’
  2. I had to add suppress_key_server_warning: true (homeserver.yaml)
  3. had to add enable_registration_without_verification: true
  4. Got rid of 4 lines with tabs and replace the with space to the correct position

Obviously verification should be required to prevent spam and bots etc. ut for this testing purpose is allowed me to finally register.

The command ‘docker-compose logs’ is very informative.

Thanks for this time around y’all.

1 Like

My Synapse installation isn’t on Nethserver, but it’s set up to disable registration entirely, and use synapse-admin to add (and otherwise manage) users. Not sure how relevant that is here, though.

2 Likes

Every use case is an interesting read I guess. I am still at Matrix nOOb stage, so I’ll take any use case :slight_smile:

I’m not far at all ahead of you, but it’s sure nice having a single chat app/interface that includes Signal, Telegram, iMessage, and Discord, as well as Matrix itself. And that means I can do iMessage on a Windows machine, or via the web, both of which are nice features that Apple doesn’t give you.

It is indeed!

@danb35 could you ‘show’ a schematic how you have organised the various platforms into spaces/rooms/persons/favourites etc? I am struggling a bit with the ‘best’ way of organising the possibilities and at the same time keep it simple.

Thanks!

I haven’t really done anything to organize them, though that would probably be a good idea. They’re each listed as an entry under “People” in Element. Each chat–i.e., each recipient–is created as its own room, and I’ve renamed them from, e.g., imessage_nnnnnnnnnn, to First Last (iMessage).

With respect to the iMessage bridge specifically, though, it suffers from a major limitation: any given instance of that bridge is tied to a specific macOS, and therefore iMessage, account. The WhatsApp, Telegram, and Signal bridges, AFAICT, each allow multiple users with their own logins to use them. So, if you set up a Synapse server with any (or all) of those bridges, you can have multiple users on that server, and each of those users can be logged into their own accounts with any (or all) of those services. Not so with iMessage.

I ran into anoher option to implement Whatsapp bridge in Matrix. It depends on WhatsappWeb but as far as I understood it is not necessary to run a seperate client.

3 Likes

Carefully asking, did you or anybody else test it yet?

Turned out it’s already in use on my instance, thnx to @mrmarkuz

2 Likes

3 posts were split to a new topic: Matrix-Synapse Docker Database Connection Error