meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
digital:server:matrixsynapsemisc [2018/11/08 17:46]
natrius
digital:server:matrixsynapsemisc [2022/05/18 13:08] (current)
natrius [Tombstone Event]
Line 3: Line 3:
 Different things, sometimes advanced and some things that just did not fit in the regular guide.  Different things, sometimes advanced and some things that just did not fit in the regular guide. 
  
-## .well-known section +## Matrix tips they don't tell you 
-Mathijs   +https://wordsmith.social/cos/matrix-tips-they-dont-tell-you
-it's a little early, but you could also add a section about .well-known +
-which just means you have nginx serve a json file on example.com/.well-known/matrix/client +
-I did it for apache, but it's probably fairly easy for nginx as well+
  
-Mathijs   +## Interesting projects
-https://matrix.org/docs/spec/client_server/r0.4.0.html#server-discovery +
-if you like reading spec :)+
  
-## Add an SRV Record+Moved to [[digital:server:matrixprojects|Matrix projects]]
  
-To use the domain ''matrix.example.com'' and still just use ''@user:example.com'' instead of ''@user:matrix.example.com'' we need to set up an SRV record. At first an A (possibly AAAA) record is needed for ''matrix.example.com''.+## Synpase maintenance tools
  
-After the A record is set up, create a SRV Record that looks like +* https://matrix-org.github.io/synapse/latest/usage/administration/database_maintenance_tools.html
  
-<code>_matrix._tcp.<yourdomain.com> <ttl> IN SRV 10 0 <port> <synapse.server.name></code>+## Show the public rooms on the server
  
-So, for example use+* ''https://example.com/_matrix/client/r0/publicRooms''
  
-<code>_matrix._tcp.example.com. 3600 IN SRV 10 0 8448 synapse.example.com.</code>+## Coturn
  
-and when creating the Synapse server use ''example.com'' for the servername+Coturn is a turn server and it is used for 1:1 voip calls through the client (example: riot).
  
-Stefan+<code>apt install coturn</code>
  
-So, when I'm using the domain matrix.example.com and want to use exmpale.com for the registration and so on, i should use SRV.  +Edit Config files
-If i'm using example.com and making the redirect with nginx, there is no need for a SRV record?+
  
-kythyria+opening ports
  
-The SRV record is how other servers find your server (and putting matrix federation behind a reverse proxy is a bit fragile)+## Installing Bots
  
-Mathijs +Matrix Synapse currently does not have a concept of bots, a bot is just a normal user. Usally there is a config and a ''.py'' file, download the files, unpack them and run the ''.py'' file. Running and downloading things via pip is not recommended.
-the relevant url is where the federated servers can connect to you+
  
-kythyria+Install python3
  
-It's so your server_name (what's in MXIDs) doesn't have to be the hostname of the machine synapse is running on.+<code>sudo apt install python3</code>
  
-## Optional Adminshell+then install pip
  
-If you forgot to write ''sudo'' and don't want to rewrite the whole command, just type ''sudo !!'' to execute the last command with sudo rights.+<code>sudo apt install python3-pip</code>
  
-There is another way but you should **not** work like that all the time because its not secure. There is a reason you have to write ''sudo'' for a lot of commands. For an initial server setup you may have to type a lot of commands, to avoid typing ''sudo *'' all the time, it is possible to type in ''sudo su''. This opens a admin-shell and you should be able to work without typing ''sudo'' in. Keep in mind, ''exit'' after step 8 and don't use ''sudo su'' when you just have to type in some commands.+then matrix-bot-api from pyp
  
-## Synpase maintenance tools+<code>pip3 install matrix-bot-api</code>
  
-https://github.com/matrix-org/synapse/wiki/Synapse-database-maintenance-tools+and finally fill out the config and start it 
  
-## Change listener port+<code>python3 pollbot.py</code>
  
-Now check if the HTTP and HTTPS listener port '8008' and '8448' are bound to the local IP address ''0.0.0.0'' (and not to ''127.0.0.1''.+## Exclude a server from a channel
  
-<code>sudo nano /etc/matrix-synapse/homeserver.yaml</code>+Info von https://matrix.org/docs/guides/moderation#banning-servers-from-rooms-server-acls bzw. direkt https://spec.matrix.org/latest/client-server-api/#server-access-control-lists-acls-for-rooms
  
-<code> +- Chat `/devtools` 
-    port: 8448 +- `Send Custom Event` 
-    bind_addresses: +- Rechts unten roten Button `Event` drücken 
-      '0.0.0.0'+Event Type: `m.room.server_acl` 
 +- State Key: leer lassen 
 +- Event Content: 
  
-    - port8008 +``` 
-    bind_addresses: ['127.0.0.1'+
-</code>+ "allow"[ 
 + "*" 
 + ], 
 + "allow_ip_literals": false, 
 + "deny": [ 
 + "kiwifarms.net", 
 + "*.kiwifarms.net", 
 + "zygoat.club", 
 + "*.zygoat.club" 
 +
 +
 +```
  
-## Installing Bots+- `Send` 
 +- Bestätigung im Chat `[CURRENT USER] set the server ACLs for this room.`
  
-Matrix Synapse currently does not have a concept of bots, a bot is just a normal user. Usally there is a config and a ''.py'' file, download the files, unpack them and run the ''.py'' file. Running and downloading things via pip is not recommended.+## Send custom reactions to messages (Powerlevel 1)
  
-Install python3+- Chat `/devtools` 
 +- `Send Custom Event` 
 +- Event Type: `m.reaction` 
 +- Event Content: 
  
-<code>sudo apt install python3</code>+``` 
 +
 +    "m.relates_to":
 +        "rel_type": "m.annotation", 
 +        "event_id": "$164569109460761pvPSY:matrix.org", 
 +        "key": "BOMP!" 
 +    } 
 +
 +```
  
-then install pip+## Send custom reactions to messages (Powerlevel >=50)
  
-<code>sudo apt install python3-pip</code>+Chat `/devtools` 
 +- `Send Custom Event` 
 +- Rechts unten roten Button `Event` drücken 
 +- Event Type: `m.reaction` 
 +- State Key: leer lassen 
 +- Event Content: 
  
-then matrix-bot-api from pyp+``` 
 +
 +    "m.relates_to":
 +        "rel_type": "m.annotation", 
 +        "event_id": "$164569109460761pvPSY:matrix.org", 
 +        "key": "BOMP!" 
 +    } 
 +
 +```
  
-<code>pip3 install matrix-bot-api</code>+- `Send` 
 + 
 +## Tombstone Event 
 + 
 +https://spec.matrix.org/latest/client-server-api/#events-17 
 + 
 +- Chat `/devtools` 
 +- `Send Custom Event` 
 +- Rechts unten roten Button `Event` drücken 
 +- Event Type: `m.room.tombstone` 
 +- State Key: leer lassen 
 +- Event Content:  
 + 
 +``` 
 +
 +    "body": "This room has been replaced", 
 +    "replacement_room": "!ERZvriGbDxJDxaCBxX:matrix.org" 
 +  } 
 +``` 
 + 
 +- `Send` 
 + 
 +## Inactive room blocking address 
 + 
 +IIRC you can request release of alias at support@matrix.org
  
-and finally fill out the config and start it  
  
-<code>python3 pollbot.py</code>