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.shows Buta wecorrectly needsetup well-knwn repsponse, for the followingdirect request to the maincluster. webserverIn workingsome assetups well.there Theis a web server in front of your Element installation. In these cases 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 ApacheApache, the config for this couldwould 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'sThis is the 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 intocheck the ingress logslogs. as well. Check thatVerify the request is reaching the nginx and verifycheck that it is going tofor the correct path. You will need to replaceReplace ${XXXX} with the actual name in your deployment ( $ kubectl get pods -A will listreveal that name ).

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