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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
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
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Matrix (Synapse/Element)
  3. Domain misconfiguration

Domain misconfiguration

Scheduled Pinned Locked Moved Matrix (Synapse/Element)
11 Posts 3 Posters 1.4k Views 3 Watching
  • 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.
    • potemkin_aiP Offline
      potemkin_aiP Offline
      potemkin_ai
      wrote on last edited by
      #1

      I'm installing new server of Matrix on a bare domain - matrix.mydomain.com, but the server attaches itself to mydomain.com (as per yml file), wellknown is empty.

      To reproduce:

      • create wild-card managed sub-domain
      • install Synapse
      • install it on that sub-domain

      That's it.

      girishG 1 Reply Last reply
      0
      • potemkin_aiP potemkin_ai

        I'm installing new server of Matrix on a bare domain - matrix.mydomain.com, but the server attaches itself to mydomain.com (as per yml file), wellknown is empty.

        To reproduce:

        • create wild-card managed sub-domain
        • install Synapse
        • install it on that sub-domain

        That's it.

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @potemkin_ai Have you see https://docs.cloudron.io/apps/synapse/#post-installation already?

        I'm installing new server of Matrix on a bare domain - matrix.mydomain.com

        Is this a typo or did you not mean bare domain? I think bare domain means mydomain.com .

        wellknown is empty

        Do you also have an app installed installed in the bare domain ? the docs explain this is needed

        1 Reply Last reply
        0
        • potemkin_aiP Offline
          potemkin_aiP Offline
          potemkin_ai
          wrote on last edited by
          #3

          Is this a typo or did you not mean bare domain? I think bare domain means mydomain.com .

          My understanding is that bare domain - it's what Cloudron perceive as bare domain; for that purpose I used to create those special subdomains and used them accordingly.

          Do you also have an app installed installed in the bare domain ? the docs explain this is needed

          You mean synapse? Yes, sure.
          Or do you mean if there are any other apps installed on bare domain? If so, that's impossible, from what I understand?

          Right now I have Synapse server installed on my-domain.com and nothing in well-known.

          girishG 1 Reply Last reply
          0
          • potemkin_aiP potemkin_ai

            Is this a typo or did you not mean bare domain? I think bare domain means mydomain.com .

            My understanding is that bare domain - it's what Cloudron perceive as bare domain; for that purpose I used to create those special subdomains and used them accordingly.

            Do you also have an app installed installed in the bare domain ? the docs explain this is needed

            You mean synapse? Yes, sure.
            Or do you mean if there are any other apps installed on bare domain? If so, that's impossible, from what I understand?

            Right now I have Synapse server installed on my-domain.com and nothing in well-known.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            @potemkin_ai said in Domain misconfiguration:

            You mean synapse? Yes, sure.

            No, I mean an app has to be installed on mydomain.com for the well-known to be served. If there is no app, nothing is served.

            The matrix domain setup can be tricky, if you are not using the defaults suggested in https://docs.cloudron.io/apps/synapse/#post-installation . For this reason, can you explain your setup again and also what matrix id you are trying to achieve? List the domains clearly and if you have done the 3 steps listed in the doc link.

            potemkin_aiP 1 Reply Last reply
            0
            • girishG girish

              @potemkin_ai said in Domain misconfiguration:

              You mean synapse? Yes, sure.

              No, I mean an app has to be installed on mydomain.com for the well-known to be served. If there is no app, nothing is served.

              The matrix domain setup can be tricky, if you are not using the defaults suggested in https://docs.cloudron.io/apps/synapse/#post-installation . For this reason, can you explain your setup again and also what matrix id you are trying to achieve? List the domains clearly and if you have done the 3 steps listed in the doc link.

              potemkin_aiP Offline
              potemkin_aiP Offline
              potemkin_ai
              wrote on last edited by
              #5

              @girish it took me a while, but I can double-confirm you that Synapse could be installed and works fine, including federation on sub-domains.

              The only problem now is that cloudron cut subdomain and only leaves domain in the config in various parts.

              I had to enter synapse in recovery mode, change config, dump database, change domain to subdomain everywhere and then rewrite the database.

              I would appreciate if you adjust the code on your side to just leave subdomain as is, without cutting it to domain.

              And I didn't find a word in Synapse docs saying that you can't use subdomains. You shouldn't, but you definitively can.

              jdaviescoatesJ 1 Reply Last reply
              1
              • potemkin_aiP potemkin_ai

                @girish it took me a while, but I can double-confirm you that Synapse could be installed and works fine, including federation on sub-domains.

                The only problem now is that cloudron cut subdomain and only leaves domain in the config in various parts.

                I had to enter synapse in recovery mode, change config, dump database, change domain to subdomain everywhere and then rewrite the database.

                I would appreciate if you adjust the code on your side to just leave subdomain as is, without cutting it to domain.

                And I didn't find a word in Synapse docs saying that you can't use subdomains. You shouldn't, but you definitively can.

                jdaviescoatesJ Offline
                jdaviescoatesJ Offline
                jdaviescoates
                wrote on last edited by
                #6

                @potemkin_ai said in Domain misconfiguration:

                @girish it took me a while, but I can double-confirm you that Synapse could be installed and works fine, including federation on sub-domains.

                Girish never said it couldn't.

                I think most people (including me) probably install it at matrix.primarydomain.coop or something

                I think you also misunderstood when he wrote:

                @girish said in Domain misconfiguration:

                an app has to be installed on mydomain.com for the well-known to be served

                He just meant "an app", not Synapse. Can literally be any app. But an app needs to be installed on primarydomain.coop for well-known to work, as per the docs.

                I use Cloudron with Gandi & Hetzner

                potemkin_aiP 1 Reply Last reply
                2
                • jdaviescoatesJ jdaviescoates

                  @potemkin_ai said in Domain misconfiguration:

                  @girish it took me a while, but I can double-confirm you that Synapse could be installed and works fine, including federation on sub-domains.

                  Girish never said it couldn't.

                  I think most people (including me) probably install it at matrix.primarydomain.coop or something

                  I think you also misunderstood when he wrote:

                  @girish said in Domain misconfiguration:

                  an app has to be installed on mydomain.com for the well-known to be served

                  He just meant "an app", not Synapse. Can literally be any app. But an app needs to be installed on primarydomain.coop for well-known to work, as per the docs.

                  potemkin_aiP Offline
                  potemkin_aiP Offline
                  potemkin_ai
                  wrote on last edited by
                  #7

                  @jdaviescoates said in Domain misconfiguration:

                  @girish said in Domain misconfiguration:

                  an app has to be installed on mydomain.com for the well-known to be served

                  He just meant "an app", not Synapse. Can literally be any app. But an app needs to be installed on primarydomain.coop for well-known to work, as per the docs.

                  I don't know what was meant, but even if it was any app - then Synapse is the app. And I can't installed something on bare domain - mydomain.com, if it's not served by Cloudron.

                  1 Reply Last reply
                  0
                  • potemkin_aiP Offline
                    potemkin_aiP Offline
                    potemkin_ai
                    wrote on last edited by
                    #8

                    Ok, let me make shortcut:

                    the following line:
                    server_name=$(python -c "from publicsuffix2 import get_sld; print(get_sld('${CLOUDRON_APP_DOMAIN}'));")

                    at Dockerfile introduced by Girish 3 years ago looks like a logical error for me.

                    I can see no reason to cut 'sub-domain' from 'sub-domain.domain.co' since it works just fine being installed on 'sub-domain.domain.co', if you revert / fix homeserver.yaml to contain FQDN.

                    Unfortunately, it's not the first time I submit bug report which is almost ignored or, at least, get no noticeable attention, so I don't expect this one will be fixed as well.

                    I have a workaround that works and that I shared with anyone interested: manually edit homeserver.yaml before launching the server and add well-known location. Hope that will be of some use.

                    1 Reply Last reply
                    0
                    • potemkin_aiP Offline
                      potemkin_aiP Offline
                      potemkin_ai
                      wrote on last edited by
                      #9

                      btw, the issue might be with new domains - publicsuffix2 never claimed it has full up to date database and it seem to be not updated for quite a while - so that might be the reason why it started failing just recently and on some occasions.

                      Even so, I can't see reason to cut sub-domain - everything works just fine.

                      girishG 1 Reply Last reply
                      0
                      • potemkin_aiP potemkin_ai

                        btw, the issue might be with new domains - publicsuffix2 never claimed it has full up to date database and it seem to be not updated for quite a while - so that might be the reason why it started failing just recently and on some occasions.

                        Even so, I can't see reason to cut sub-domain - everything works just fine.

                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #10

                        @potemkin_ai sorry for the delay. You are right publicsuffix1 seems to be ancient... In fact, it's 5 years old - https://github.com/nexB/python-publicsuffix2/blob/develop/src/publicsuffix2/public_suffix_list.dat . Let me see how I can replace this.

                        I can see no reason to cut 'sub-domain' from 'sub-domain.domain.co' since it works just fine being installed on 'sub-domain.domain.co', if you revert / fix homeserver.yaml to contain FQDN.

                        This is done to optimize for the default installation. Most people expect the matrix usernames to be @username:domain.co when they install Matrix. In the past, it defaulted to sub-domain.domain.co. But people used matrix for a while and then later wanted "prettier" ids . Unfortunately, matrix doesn't support changing the domain name later. So, we settled on this approach.

                        I tried to explain a bit of the rationale in https://docs.cloudron.io/apps/synapse/#post-installation but maybe I can clarify more.

                        1 Reply Last reply
                        3
                        • potemkin_aiP Offline
                          potemkin_aiP Offline
                          potemkin_ai
                          wrote on last edited by
                          #11

                          I understand the rationale, thanks.

                          But the current decision have the following disadvantages, from what I see:

                          • it ignores my settings - I'm asked at which domain I would like Synapse to be installed and then I get it on my root domain, regardless my input - I've spend quite a time to figure that out
                          • you are dependant on the ever growing list of new domains

                          What we discuss calls delegation in Synapse terminology. It feels like extra feature for me and I really can't see reason to keep in on Cloudron, at least not with current setup.

                          Just in case - I know how to make things working for me, so I would be just fine with things as is, but I believe it's wrong from the logical perspective.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                            • Login

                            • Don't have an account? Register

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