Skip to main content

Setting Up Well Known Delegation

Well Known Delegation Configuration

From the Installer's Integrations page, click "Install" under "Well-Known Delegation".

Add any client configuration here:

well-known-client.png

A sample client configuration might look like:

  {
    "im.vector.riot.jitsi": {
      "preferredDomain": "jitsi.dev.local"
    }
  }

Add any server configuration here:

well-known-server.png

  • Re-run the installer for the changes to take effect.

Troubleshooting the Well Know config

The clients and servers will need to be able to access these configuration settings. You can check if everything is in place with curl. The following request is useful if your base domain is actually the same as your main webserver. This curl goes directly to the ingress of the kubernetes, which is implemented with nginx. Keeping the request header as "my.base.domain" allows nginx to route the request to the correct pod.

$ curl -X GET --header "HOST: my.base.domain" "https://matrix.my.base.domain/.well-known/matrix/client"
{
    "io.element.e2ee": {
        "default": false
    },
    "m.homeserver": {
        "base_url": "https://matrix.my.base.domain"
    }

The check above worked. But we need the following request to the main webserver working as well. The main web server should be implementing a reverse proxy for everything that is under https://my.base.domain/.well-known/matrix/ . All these requests should be sent to https://matrix.my.base.domain/.well-known/matrix/. If the main web server would run on Apache the config for this could look like this :

    ProxyPass               /.well-known/matrix/ https://matrix.MYBASEDOMAIN/.well-known/matrix/
    ProxyPassReverse        /.well-known/matrix/ https://matrix.MYBASEDOMAIN/.well-known/matrix/
    ProxyPreserveHost On

Let's check if this actually works :

$ curl -X GET https://my.base.domain/.well-known/matrix/client
{
    "io.element.e2ee": {
        "default": false
    },
    "m.homeserver": {
        "base_url": "https://matrix.my.base.domain"
    }
}

You can take a look into the ingress logs as well. Check that the request is reaching the nginx and verify that it is going to the correct path. You will need to replace ${XXXX} with the actual name in your deployment ( $ kubectl get pods -A will list that ).

$ kubectl logs nginx-ingress-microk8s-controller-${XXXX} -n ingress
...