This topic covers following an ActivityPub Actor in Discourse with the Discourse ActivityPub Plugin, and follows on from Setting up an ActivityPub Actor. If you’re not sure what this means, head on over to the Discourse ActivityPub Plugin topic first.
Instructions
To follow an ActivityPub Actor:
Set up an actor for the Category or Tag you want to do the following.
Get the “handle” of the Actor you want to follow (see below).
Go to the “Federation” tab in the topic list view of the Category or Tag from Step 1.
Click “New Follow”, enter the handle from Step 2, and click “Find” (see below).
Click “Follow” when the Actor is found.
Actor Handles
Most ActivityPub services use a protocol called WebFinger to allow Actors to be discovered by a “handle”. This is typically in the format
username@domain
Sometimes the username is preceded by a symbol, e.g. @.
Discourse
Obtain the handle of a Discourse Actor by going to the “Federation” tab in the topic list view of the Actor.
The handle in the screenshot is @angusmcleod@mastodon.social
Finding an Actor
When you enter an Actor handle in the “New Follow” modal and click “Find” the plugin is looking up the handle using WebFinger. This lookup may not succeed. If no results are returned:
Check the handle you copied.
Check there is a live ActivityPub-enabled server at domain of the handle.
Try looking up the handle on another ActivityPub service.
If you’ve tried the above and believe the issue may be with your site, or the plugin:
Check the site setting activity pub verbose logging is enabled.
Perform the lookup again.
Check /logs for a logs labelled “ActivityPub”.
Report any issues you find in a reply to this topic.
So far, I’m able to federate posts and replies to and from Discourse and Mastodon, but not between Discourse and Discourse. My federated Discourse categories are open to everyone, but the instances require invite before an account can be created. Do you think that might have anything to do with it?
Also, replies to federated posts made by other people are not federated to other instances involved in the thread. Is that normal and expected?
It could do! Let me test that scenario and get back to you.
Discourse publishes activities in a topic to all participants in the topic, even if they’re not following the relevant actor (i.e. category or tag). So this is not expected. It could be a problem on Discourse’s end (please check the logs and let me know if you see anything). It could also be a problem on the platform you’re expecting to see the replies on.
Sorry @angus, I have to migrate my instance to another server. When I turned on ActivityPub in my two discourse instances my 8 GB Raspberry pi 4 could not handle the ActivityPub traffic and kept overheating and freezing. I will provide an update if I attempt to get ActivityPub working on an experimental instance.
Any suggestions for completely de-listing an app domain after activitating it on ActivityPub?
I’m pretty much unable to use the previous subdomains due to the intense traffic they are still receiving even though I unfollowed the category accounts on the Mastodon instance I’m using.
Hey Rob, I’m sorry to hear you’re having issues. The ActivityPub plugin has a number of protections already to deal with heavy traffic loads, in particular these site settings:
activity_pub_rate_limit_post_to_inbox_per_minute: The default for this is 10. This means that, by default, 10 incoming POST requests per IP per minute are processed. Try lowering this.
activity_pub_rate_limit_get_objects_per_minute: The default for this is 30 per IP per minute. This means that, by default, 30 GET requests per IP per minute are processed. Try lowering this.
activity_pub_blocked_request_origins: This allows you to block all requests from domain(s) that may be causing you issues.
activity_pub_allowed_request_origins: This allows you to restrict requests to certain domains, meaning requests from all other sources are blocked.
If high traffic load is indeed the cause of your issue, the way to deal with it is using the protections listed above, unless you have control over the servers where the traffic is coming from.
Thank you for the advice, Angus. I really appreciate it. I will set up another Discourse instance on an experimental server that won’t affect my other services and try again following your suggestions.
I’m not sure which layer of my infrastructure is where the problem really lies, but it may be the reverse proxy.
I’m using Cosmos Server as a server monitor, docker container management UI, and reverse proxy for my other docker containers like Discourse and other services. I feel like the reverse proxy may need to be similarly configured for adequate rate limiting for incoming ActivityPub connections.
It may have been the incoming ActivityPub sync requests from the external Mastodon server that overwhelmed the reverse proxy and caused the RAM, CPU, and network usage to max out and overheat.
I will update again once I receive my next shipment of Raspberry Pis and have a spare board to use as an experimental server.
Thanks for your neat videos. Did I miss an explanation of and how followers can answer/interact those topics? I wonder if it would make an leightweight “server” for social media team