Running multiple activitypub services on single domain (lemmy.world)
from thisisawayoflife@lemmy.world to selfhosted@lemmy.world on 17 Dec 2023 17:19
https://lemmy.world/post/9679386

How do you configure your webfingers to support multiple subdomains that host AP services?

Edit: looks like someone filed this issue. If you have a GitHub account, please thumbs up/bump it!

github.com/pixelfed/pixelfed/issues/3563

#selfhosted

threaded - newest

[deleted] on 17 Dec 2023 17:20 next collapse

.

poVoq@slrpnk.net on 17 Dec 2023 23:43 next collapse

You can’t have them all on the same webfinger on the root domain, but having them separately on subdomains should work without issues.

thisisawayoflife@lemmy.world on 17 Dec 2023 23:49 collapse

I was hoping that pixelfed would request a different rel than mastodon. I’m pretty sure I have my webfinger configured to use myemail@mydomain.tld, which works fine for diaspora and mastodon because they operate off different resources - but I think pixelfed copies mastodon so requesting the mastodon rel gives my mastodon user. That seems like a bug in pixelfed, to me.

poVoq@slrpnk.net on 18 Dec 2023 00:09 collapse

Maybe there is some kind of workaround, but I have not seen it so far.

thisisawayoflife@lemmy.world on 18 Dec 2023 07:02 collapse

Looks like someone has filed this issue:

github.com/pixelfed/pixelfed/issues/3563

poVoq@slrpnk.net on 18 Dec 2023 07:31 collapse

Yes, but I think this still would not allow having two different AP services on the same root domain.

For that it would need to do some webfinger multiplexing and also the s2s connections would need to be somehow marked according to what specific type of AP software they are supposed to address.

thisisawayoflife@lemmy.world on 18 Dec 2023 07:35 next collapse

If a service was serving the webfinger, it could guess which account needed to be returned based on the requesters user agent. If the UA was mastodon, it could return the mastodon link rel, if pixelfed then return that link rel, etc.

Might be able to rig it with some more complex conditional logic and regex in nginx as a bandaid. AFAICT, the webfinger spec doesn’t really allow for this, which if true, was pretty short sighted.

I haven’t considered more in depth S2S connections. I’ll have to watch the traffic logs and see what exactly is being requested and see if all of it can be directed accordingly. I see now you commented on that issue. Also, to be clear, I’m still running the services in subdomains, but I’m trying to use user@domain.tld as the discovery account.

lemmyvore@feddit.nl on 19 Dec 2023 07:32 collapse

How do you run two AP services on the same domain?

Decronym@lemmy.decronym.xyz on 18 Dec 2023 07:45 next collapse

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
AP WiFi Access Point
HTTP Hypertext Transfer Protocol, the Web
nginx Popular HTTP server

2 acronyms in this thread; the most compressed thread commented on today has 7 acronyms.

[Thread #362 for this sub, first seen 18th Dec 2023, 07:45] [FAQ] [Full list] [Contact] [Source code]

stown@sedd.it on 18 Dec 2023 13:32 collapse

I’ve wanted somebody to create a webfinger proxy for a while now. Let me know if you find anything.

thisisawayoflife@lemmy.world on 18 Dec 2023 18:20 collapse

I’ll start researching what the user agents are for the various services and then work on creating a simple POC with nginx. If that actually works, I can try to put together a production quality app to handle it.