Delegation: Difference between revisions

From IM Wiki
Jump to navigation Jump to search
Matrix>Sininenkissa
Create delegation
 
Matrix>Sininenkissa
m Use {{ic|example}} instead of <code>
Line 1: Line 1:
Delegation is a Matrix feature allowing a homeserver admin to retain an URL of example.com so that user IDs, etc. continue to look like <code>*:example.com</code>, whilst having federation traffic routed to a different server and/or port (e.g. <code>matrix.example.com:443</code>). There are multiple ways to do this. This includes with the <code>.well-known</code> file and SRV DNS records.
Delegation is a Matrix feature allowing a homeserver admin to retain an URL of example.com so that user IDs, etc. continue to look like {{ic|*:example.com}}, whilst having federation traffic routed to a different server and/or port (e.g. {{ic|matrix.example.com:443}}). There are multiple ways to do this. This includes with the {{ic|.well-known}} file and SRV DNS records.


== .well-known delegation ==
== .well-known delegation ==


To use this method, you need to be able to configure the server at {{ic|https://<server_name>}} to serve a file at <code>https://<server_name>/.well-known/matrix/server</code>. There are two ways to do this, shown below.
To use this method, you need to be able to configure the server at {{ic|https://<server_name>}} to serve a file at {{ic|https://<server_name>/.well-known/matrix/server}}. There are two ways to do this, shown below.


=== Using a web server ===
=== Using a web server ===


This is the more commonly used method, and is the only method if you are using server software that is not Synapse. You need to configure a server such as nginx or Apache to serve the <code>https://<server_name>/.well-known/matrix/server</code> file. Setting up such a server is out of the scope of the wiki, but note that it is often possible to configure your reverse proxy for this.
This is the more commonly used method, and is the only method if you are using server software that is not Synapse. You need to configure a server such as nginx or Apache to serve the {{ic|https://<server_name>/.well-known/matrix/server}} file. Setting up such a server is out of the scope of the wiki, but note that it is often possible to configure your reverse proxy for this.


The URL <code>https://<server_name>/.well-known/matrix/server</code> should be configured to return a JSON structure containing the key <code>m.server</code> like this:<syntaxhighlight lang="json">
The URL {{ic|https://<server_name>/.well-known/matrix/server}} should be configured to return a JSON structure containing the key {{ic|m.server}} like this:
<syntaxhighlight lang="json">
{
{
     "m.server": "<synapse.server.name>[:<yourport>]"
     "m.server": "<synapse.server.name>[:<yourport>]"

Revision as of 22:12, 15 January 2024

Delegation is a Matrix feature allowing a homeserver admin to retain an URL of example.com so that user IDs, etc. continue to look like *:example.com, whilst having federation traffic routed to a different server and/or port (e.g. matrix.example.com:443). There are multiple ways to do this. This includes with the .well-known file and SRV DNS records.

.well-known delegation

To use this method, you need to be able to configure the server at https://<server_name> to serve a file at https://<server_name>/.well-known/matrix/server. There are two ways to do this, shown below.

Using a web server

This is the more commonly used method, and is the only method if you are using server software that is not Synapse. You need to configure a server such as nginx or Apache to serve the https://<server_name>/.well-known/matrix/server file. Setting up such a server is out of the scope of the wiki, but note that it is often possible to configure your reverse proxy for this.

The URL https://<server_name>/.well-known/matrix/server should be configured to return a JSON structure containing the key m.server like this:

{
    "m.server": "<synapse.server.name>[:<yourport>]"
}
Note:
  • Specifying a port is optional. If no port is specified, then it defaults to 8448.

File:Tango-view-fullscreen.svgThis article or section needs expansion.File:Tango-view-fullscreen.svg

Reason: Finish creating/building the basics of the page using this resource. (Discuss in Talk:Delegation)