this post was submitted on 16 Jun 2023
4 points (100.0% liked)

Self Hosted - Self-hosting your services.

11230 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

If you see a rule-breaker please DM the mods!

founded 3 years ago
MODERATORS
 

I’m interested in setting up my own instances for Lemmy, Mastodon, and Matrix.

Can I use the same https://domain.tld for all of them without any subdomains?

For example:
lemmyuser@mydomain.tld
mastodonuser@mydomain.tld
matrixuser@mydomain.tld

Will this work across all of my self-hosted instances, or do I need to append a subdomain for each, e.g., lemmyuser@lemmy.mydomain.tld?

top 7 comments
sorted by: hot top controversial new old
[–] makr_alland@lemmy.world 2 points 1 year ago

All those services use a protocol named WebFinger that allows for having the servers in different domains but showing the users as being in a main domain. For example, my self-hosted Synapse server is at matrix.domain.tld, but my users are all like user@domain.tld.

Unfortunately I don't really know how to set it all up manually, I just let Yumohost take care of managing it.

[–] nif@feddit.de 1 points 1 year ago

Should partly be possible to do. Matrix: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-well-known.md

Lemmy is not working. But might be at some point: https://github.com/LemmyNet/lemmy/issues/2608 But that issue also mentions on how it works with mastodon.

[–] lemmymarud@lemmy.marud.fr 1 points 1 year ago

No you can't. One way or another your request from your browser that have to reach (let's say) mastodon will have to go through the web server then to the mastodon backend. Your request reaches domain.tld and your reverseproxy will send the traffic to the corresponding service... But you have 3 services answering to domain.tld. You won't be able to get anywhere, or maybe to the first service where your reverse proxy matches but nowhere else. I don't even know if a reverse proxy will allow to start with that kind of configuration. You'll have to use subdomains, you're not even (always) allowed to use subdirs (like domain.tld/lemmy) sometimes.

[–] poVoq@slrpnk.net 1 points 1 year ago

Matrix (or even easier XMPP) can coexist on the same domain with Lemmy or Mastodon, but with two ActivityPub services that is AFAIK not possible.

[–] GNUmer@sopuli.xyz 1 points 1 year ago* (last edited 1 year ago)

Regardless of configuration, you still need to access the instance from mastodon.mydomain.tld or lemmy.mydomain.tld, but you can configure the Mastodon to use @mastodonuser@mydomain.tld as its identifier by setting WEB_DOMAIN to mydomain.tld.

Mastodon documentation on the topic: https://docs.joinmastodon.org/admin/config/#web_domain

[–] Swimmerman96@beehaw.org 1 points 1 year ago (1 children)

You are able to host all these services and more on the same domain. I do a similar thing with different services at different subdomains. I don't believe the username@ portion can help point to different services, that syntax is usually associated with email addresses.

I think the best way to go about it would be having different subdomains such as lemmy.domain.tld, matrix.domain.tld, etc.
To accomplish that, I have a wildcard subdomain point to my server, my reverse proxy (Caddy) handles figuring out which subdomain maps to which service on top of handling TLS certificates for me.

[–] RiotEarp@lemmy.studio 1 points 1 year ago* (last edited 1 year ago)

Good to know and I was hoping that's the case. As soon as my new domain resolves I'm going to install lemmy, matrix, and funkwhale.

Are you running all of yours in containers?

load more comments
view more: next ›