Domain misconfiguration
-
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.
-
@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
-
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.
-
@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.
-
@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.
-
@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 somethingI 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. -
@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.
-
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.
-
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.
-
@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 tosub-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.
-
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.