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/12/07 10:29]
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 :)+Moved to [[digital:server:matrixprojects|Matrix projects]] 
 + 
 +## Synpase maintenance tools 
 + 
 +https://matrix-org.github.io/synapse/latest/usage/administration/database_maintenance_tools.html 
 + 
 +## Show the public rooms on the server 
 + 
 +* ''https://example.com/_matrix/client/r0/publicRooms''
  
 ## Coturn ## Coturn
Line 23: Line 28:
 opening ports opening ports
  
 +## Installing Bots
  
-## Add an SRV Record+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.
  
-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''.+Install python3
  
-After the A record is set up, create a SRV Record that looks like +<code>sudo apt install python3</code>
  
-<code>_matrix._tcp.<yourdomain.com> <ttl> IN SRV 10 0 <port> <synapse.server.name></code>+then install pip
  
-So, for example use+<code>sudo apt install python3-pip</code>
  
-<code>_matrix._tcp.example.com. 3600 IN SRV 10 0 8448 synapse.example.com.</code>+then matrix-bot-api from pyp
  
-and when creating the Synapse server use ''example.com'' for the servername. +<code>pip3 install matrix-bot-api</code>
  
-Stefan+and finally fill out the config and start it 
  
-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.  +<code>python3 pollbot.py</code>
-If i'm using example.com and making the redirect with nginx, there is no need for a SRV record?+
  
-kythyria+## Exclude a server from a channel
  
-The SRV record is how other servers find your server (and putting matrix federation behind a reverse proxy is a bit fragile)+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
  
-Mathijs +- Chat `/devtools` 
-the relevant url is where the federated servers can connect to you+- `Send Custom Event` 
 +- Rechts unten roten Button `Event` drücken 
 +- Event Type: `m.room.server_acl` 
 +- State Key: leer lassen 
 +- Event Content: 
  
-kythyria+``` 
 +
 + "allow":
 + "*" 
 + ], 
 + "allow_ip_literals": false, 
 + "deny":
 + "kiwifarms.net", 
 + "*.kiwifarms.net", 
 + "zygoat.club", 
 + "*.zygoat.club" 
 +
 +
 +```
  
-It's so your server_name (what's in MXIDs) doesn't have to be the hostname of the machine synapse is running on.+- `Send` 
 +- Bestätigung im Chat `[CURRENT USER] set the server ACLs for this room.`
  
-## Optional Adminshell+## Send custom reactions to messages (Powerlevel 1)
  
-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.+- Chat `/devtools` 
 +- `Send Custom Event` 
 +- Event Type: `m.reaction` 
 +- Event Content: 
  
-There is another way but you should **not** work like that all the time because its not secureThere is a reason you have to write ''sudo'' for a lot of commandsFor an initial server setup you may have to type a lot of commandsto 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.+``` 
 +
 +    "m.relates_to":
 +        "rel_type": "m.annotation", 
 +        "event_id": "$164569109460761pvPSY:matrix.org", 
 +        "key": "BOMP!" 
 +    } 
 +
 +```
  
-## Synpase maintenance tools+## Send custom reactions to messages (Powerlevel >=50)
  
-https://github.com/matrix-org/synapse/wiki/Synapse-database-maintenance-tools +Chat `/devtools` 
- +`Send Custom Event` 
-## Installing Bots +Rechts unten roten Button `Event` drücken 
- +Event Type: `m.reaction` 
-Matrix Synapse currently does not have a concept of bots, a bot is just a normal userUsally 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. +State Key: leer lassen 
- +Event Content: 
-Install python3 +
- +
-<code>sudo apt install python3</code> +
- +
-then install pip +
- +
-<code>sudo apt install python3-pip</code> +
- +
-then matrix-bot-api from pyp +
- +
-<code>pip3 install matrix-bot-api</code> +
- +
-and finally fill out the config and start it  +
- +
-<code>python3 pollbot.py</code>+
  
-## deactivate presence+``` 
 +
 +    "m.relates_to":
 +        "rel_type": "m.annotation", 
 +        "event_id": "$164569109460761pvPSY:matrix.org", 
 +        "key": "BOMP!" 
 +    } 
 +
 +```
  
-  * https://github.com/matrix-org/synapse/issues/3971+`Send`
  
-put ''use_presence: false'' in your synapse config (''homeserver.yaml'' )+## Tombstone Event
  
-## How calls work+https://spec.matrix.org/latest/client-server-api/#events-17
  
-Info about WebRTC: https://www.pkc.io/blog/untangling-the-webrtc-flow/  +- Chat `/devtools` 
 +- `Send Custom Event` 
 +- Rechts unten roten Button `Event` drücken 
 +- Event Type: `m.room.tombstone` 
 +State Key: leer lassen 
 +Event Content: 
  
-more or less like this? https://i.imgur.com/dWAwi7f.png with jitsi.riot.im instead of scalar.vector.im+``` 
 +
 +    "body""This room has been replaced", 
 +    "replacement_room": "!ERZvriGbDxJDxaCBxX:matrix.org" 
 +  } 
 +```
  
-more or less, but you can also host your own jitsi server if you want, jitsi is still FOSS and self-hostable+`Send`
  
-also, it's a bit nitpicky, but if you use turn, you may want to add a turn-server on the left side, because it's not synapse that does the webrtc relay+## Inactive room blocking address
  
-jitsi is its own thing, riot just allows integrating jitsi in riot+IIRC you can request release of alias at support@matrix.org
  
-note that you can self-host jitsi, but if you want riot to use your selfhosted jitsi by default when opening conference calls you'll also want to host an integrations server (ie dimension) 
  
-everybody assumes it works like this, but it doesn't: assuming both HSs have turn, you actually want red lines via homeserver 1, homeserver 2 and then one going through both ie. the media may go through one or both turn servers (or none, as in your green line)