Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Implement `/.well-known/matrix/client` endpoint

Scheduled Pinned Locked Moved Solved Matrix (Synapse/Element)
10 Posts 3 Posters 925 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • infogulchI Offline
    infogulchI Offline
    infogulch
    wrote on last edited by infogulch
    #1

    I tried to log in via a new matrix client, Cinny, but login failed. Opening up the browser inspector I found that a GET request to https://my-cloudron-domain/.well-known/matrix/client was returning 404. /.well-known/matrix/client is a well known (pun intended) standard API endpoint used for server discovery. The matrix.org server serves at this endpoint:

    {
        "m.homeserver": {
            "base_url": "https://matrix-client.matrix.org"
        },
        "m.identity_server": {
            "base_url": "https://vector.im"
        }
    }
    

    Cloudron already supports the /.well-known/matrix/server endpoint; I propose that support for the client endpoint is added as well.

    nebulonN 1 Reply Last reply
    1
  • nebulonN Offline
    nebulonN Offline
    nebulon Staff
    replied to infogulch on last edited by
    #2

    @infogulch have you seen and applied the settings mentioned at https://docs.cloudron.io/domains/#matrix-server-location ?

    infogulchI 1 Reply Last reply
    0
  • infogulchI Offline
    infogulchI Offline
    infogulch
    replied to nebulon on last edited by infogulch
    #3

    @nebulon Yes, the matrix server location is already filled in. I've been using Synapse+Riot client on my server for several months and it's been working great. Specifically, the */server endpoint is currently working correctly and serves data as expected from https://my-cloudron-domain/.well-known/matrix/server :

    {"m.server":"matrix.my-cloudron-domain.com:443"}
    

    Note the difference between the existing endpoint and the new one:

    https://my-cloudron-domain/.well-known/matrix/server < existing, works great
    https://my-cloudron-domain/.well-known/matrix/client < what this thread is about

    nebulonN girishG 2 Replies Last reply
    0
  • nebulonN Offline
    nebulonN Offline
    nebulon Staff
    replied to infogulch on last edited by
    #4

    @infogulch ah! thanks for the pointer, I was misreading this indeed. Looks like we have to add this then similarily like we have for matrix and mastodon.

    1 Reply Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    replied to infogulch on last edited by
    #5

    @infogulch This is easy to implement and I will add it in next release. But do you know why there are separate homeserver URL discovery endpoint for server and client ?

    infogulchI 1 Reply Last reply
    1
  • infogulchI Offline
    infogulchI Offline
    infogulch
    replied to girish on last edited by
    #6

    Good question, I'm not sure. I guess */server is for federation (server<->server), and */client is for clients (client->server).

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #7

    I have fixed this for the next release.

    $ curl -s https://example.com/.well-known/matrix/client | python3 -m json.tool
    {
        "m.homeserver": {
            "base_url": "https://matrix.example.com"
        },
        "m.identity_server": {
            "base_url": "https://vector.im"
        }
    }
    
    infogulchI 2 Replies Last reply
    4
  • infogulchI Offline
    infogulchI Offline
    infogulch
    replied to girish on last edited by infogulch
    #8

    Hm, I'm not sure that the identity server is supposed to be pinned to vector.im... I'll see if someone on the matrix channel can chime in.

    1 Reply Last reply
    0
  • infogulchI Offline
    infogulchI Offline
    infogulch
    replied to girish on last edited by infogulch
    #9

    @girish Ok I asked and @tulir on #matrix:matrix.org said that we can just omit the "m.identity_server" server field entirely. Apparently it's used to map third party ids (email/phone) to matrix ids. But since we're using cloudron logins we can just omit it.

    Also note that that field is not marked as required on the API docs page.

    girishG 1 Reply Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    replied to infogulch on last edited by
    #10

    @infogulch ah thanks, i will remove it.

    1 Reply Last reply
    2

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.