# Setting up an ActivityPub Actor

**URL:** https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578
**Category:** Administrators
**Tags:** video, activitypub
**Created:** [July 2, 2024, 8:09am UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578 "2024-07-02T08:09:48Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [July 2, 2024, 8:09am UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/1 "2024-07-02T08:09:48Z")

</div>

This topic covers setting up an ActivityPub Actor in Discourse with the Discourse ActivityPub Plugin. If you’re not sure what this means, head on over to the [Discourse ActivityPub Plugin](https://meta.discourse.org/t/activitypub-plugin/266794) topic first.

https://www.loom.com/embed/552f8b6f91b54e28937121276702b9eb?sid=1592662e-d7f8-4058-a18b-04ccdfe8b3e4

## Next Step

> [@Following an ActivityPub Actor](https://meta.discourse.org/t/how-to-follow-an-activitypub-actor/314580):
>
> This topic covers following an ActivityPub Actor in Discourse with the Discourse ActivityPub Plugin, and follows on from [Setting up an ActivityPub Actor](https://meta.discourse.org/t/how-to-set-up-an-activitypub-actor/314578). If you’re not sure what this means, head on over to the [Discourse ActivityPub Plugin](https://meta.discourse.org/t/activitypub-plugin/266794) topic first. Instructions To follow an ActivityPub Actor: [Set up an actor](https://meta.discourse.org/t/how-to-set-up-an-activitypub-actor/314578) 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 …

## Instructions

To create an ActivityPub actor:

1. Go to Admin \> Plugins \> ActivityPub.
2. Click “Add Actor”.
3. Fill out the Add Actor form (the settings are explained below).
4. Click “Save Actor”.

When you save the Actor, other Actors in the fediverse can start following it. You can disable an actor, by toggling the “Enabled” toggle on the right of the Edit Actor view.

### Actor settings

#### Username

This is the first part of the Actor’s ActivityPub handle, e.g. `announcements` is the username of `announcements@meta.discourse.org`. This will be the base for the Actor’s User’s username on remote Discourse instances (if the username is already taken on that instance, an integer will be added for uniqueness)

👉 This property translates to the `preferredUsername` in the ActivityPub specification.  
👉 Currently, this cannot be changed once set. This will change if or when this PR to Mastodon is merged.

[https://github.com/mastodon/mastodon/pull/30361](https://github.com/mastodon/mastodon/pull/30361)

#### Name

This is the display name of the Actor. How it is used will depend on how other services implement it. In Discourse this will become the Actor’s User’s “Name”.

#### Visibility

This determines whether Activities published by the Actor have “[Public Addressing](https://www.w3.org/TR/activitypub/)”. You should leave this as public unless you know what you’re doing.

👉 This is essentially the same as the difference between “public” and “private” (followers-only) posts on on Mastodon.

#### Post object type

This determines whether the Actor will publish posts as a `Note` or an `Article`. You should leave this as `Note` unless you know what you’re doing.

👉 Mastodon will only publish a link to the original post if it receives an `Article`.

#### Publication type

##### Full Topic

All the posts in a topic associated with the Actor will be published and all replies from the Fediverse to be turned into posts.

##### First Post

Only the first post in a topic associated with the Actor will be published and no replies from the Fediverse will be turned into posts.

---

<div class="post-metadata">

### Author: ![LaF0rge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/laf0rge/32/474195_2.png) [@LaF0rge](https://meta.discourse.org/u/LaF0rge)
#### Post date: [December 18, 2024, 12:48pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/2 "2024-12-18T12:48:09Z")

</div>

I just added the plugin to a discourse 3.3.2 installation. I can see the plugin in the list of plugin, the plugin preferences, etc.

However, when trying to add actors, I can only add actors for Tags (which i don’t need), but not for categories. It looks like some kind of UI / browser-side javascript problem (I’m not a web developer).

I’ve tried with both Firefox and Chromium on Debian, and both render the same behaviour

- adding actors for Tags works as expectred
- adding actors for Categories is impossible as no selection box for the categories is ever rendered right of the _Select a model / Category_ choice.

I’m getting a

```plaintext
runtime.js:912 Uncaught TypeError: Cannot read properties of null (reading 'firstNode')
    at ue.firstNode (runtime.js:912:1)
    at T (runtime.js:241:1)
    at ue.reset (runtime.js:983:1)
    at ae.resume (runtime.js:686:1)
    at Ut.handleException (runtime.js:4309:1)
    at Vt.handleException (runtime.js:4521:1)
    at Dt.throw (runtime.js:4260:1)
    at $e.evaluate (runtime.js:2088:1)
    at Dt._execute (runtime.js:4247:1)
    at Dt.execute (runtime.js:4232:1)
    at qt.rerender (runtime.js:4547:1)
    at hr.render (index.js:4674:1)
    at index.js:4934:1
    at Nt (runtime.js:4080:1)
    at gr._renderRoots (index.js:4916:1)
    at gr._renderRootsTransaction (index.js:4960:1)
    at gr._revalidate (index.js:4992:1)
    at invoke (backburner.js.js:280:1)
    at h.flush (backburner.js.js:197:1)
    at p.flush (backburner.js.js:358:1)
    at B._end (backburner.js.js:798:1)
    at B.end (backburner.js.js:589:1)
    at B._run (backburner.js.js:842:1)
    at B._join (backburner.js.js:819:1)
    at B.join (backburner.js.js:629:1)
    at l (index.js:81:1)
    at u.onHover (index.js:118:1)
    at e.handleMouseEnter (select-kit-row.js:83:22)

```

error in the developer console when Selecting “Category” from the “Select a Model” button.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [December 18, 2024, 3:38pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/3 "2024-12-18T15:38:11Z")

</div>

> [@LaF0rge](#):
>
> I just added the plugin to a discourse 3.2.2 installation.

Generally, support is only provided on Meta for the latest stable or tests-passed releases - any reason why you are lagging? It’s worth upgrading to latest and trying again.

---

<div class="post-metadata">

### Author: ![LaF0rge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/laf0rge/32/474195_2.png) [@LaF0rge](https://meta.discourse.org/u/LaF0rge)
#### Post date: [December 18, 2024, 3:50pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/4 "2024-12-18T15:50:41Z")

</div>

It was a typo, sorry. I’m on 3.3.2.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [December 19, 2024, 9:53am UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/5 "2024-12-19T09:53:51Z")

</div>

Hey @LaF0rge, this plugin currently only supports the latest version of Discourse. See further:

https://www.loom.com/embed/aefdb5baaad44bdbab982d1c4a3b9430?sid=c04115b2-83e1-4f60-8ddc-931d3b0ff4a7

---

<div class="post-metadata">

### Author: ![LaF0rge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/laf0rge/32/474195_2.png) [@LaF0rge](https://meta.discourse.org/u/LaF0rge)
#### Post date: [December 19, 2024, 12:46pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/6 "2024-12-19T12:46:49Z")

</div>

Hi @angus - thanks for your response. Sadly I’m not willing to upgrade our production installation to a beta version or the current git master. I guess I’ll be waiting until a new stable version of discourse has been tagged/released.

By the way: Is there some structured information available that would indicate the minimum version requirement of a plugin? I didn’t see it here in the initial post of the thread, and also not on [GitHub - discourse/discourse-activity-pub: Adds ActivityPub support to Discourse. · GitHub](https://github.com/discourse/discourse-activity-pub)

In other software projects/products, plugins usually indicate version compatibility.

Given that the plugin has been around for more than a year, I guess another option would be to downgrade to an earlier version of the plugin, from around the time where 3.3.2 was current? However, in the commit log I couldn’t immediately see any references to discourse versions.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [December 19, 2024, 1:21pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/7 "2024-12-19T13:21:29Z")

</div>

Unless you have a specific reason not to do so, it’s recommended to use the `tests-passed` branch of Discourse. See further:

> [@What is the best branch of github.com/discourse/discourse？](https://meta.discourse.org/t/what-is-the-best-branch-of-github-com-discourse-discourse/158656/3):
>
> We recommend running tests-passed and updating when [beta releases](https://meta.discourse.org/tag/release-notes) are available. This gives you the flexibility of updating when you want/need to. Stable isn’t recommended except in select cases… like extensive customization (99% of the sites we host aren’t in this category). There are months between stable releases, and we only backport critical or security related bugs… so if there’s a minor bug in stable you may have to live with it for quite a while. There’s some more relevant discussion h…

Furthermore, you can assume that plugin or customisation with the #experimental tag (as the ActivityPub plugin doees) only works reliably on the latest version of Discourse.

More specifically to your implicit questions about version management, in Discourse plugins this handled via the `.discourse-compatibility` file which you can read about here:

> [@Introducing .discourse-compatibility: pinned plugin/theme versions for older Discourse versions](https://meta.discourse.org/t/introducing-discourse-compatibility-pinned-plugin-theme-versions-for-older-discourse-versions/156971):
>
> Hey everyone wave , I just merged a new feature that will help plugins and themes pin certain versions when installed on older Discourse instances. You can now include a .discourse-compatibility file at the root of a plugin or theme repository, that designates what to checkout when installing on older Discourse versions. Rationale It sucks to remember which plugins and themes are compatible with which Discourse versions. As an admin, it should be possible to easily scan those changes and fi…

See the ActivityPub plugin’s compatibility file here:

> <https://github.com/discourse/discourse-activity-pub/blob/main/.discourse-compatibility>

As the ActivityPub plugin is still #experimental, ensuring backwards compatibility has not been a focus, nevertheless I will investigate adding explicit `3.3.2` support to that file early next week.

But as mentioned above, unless you have a good reason not to, I’d suggest using `tests-passed`.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [December 20, 2024, 12:30pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/8 "2024-12-20T12:30:45Z")

</div>

@LaF0rge I just looked at this.

> [@angus](#):
>
> I will investigate adding explicit `3.3.2` support to that file early next week.

The plugin does not need to add explicit `3.3.2` support as it already has this in the compatibility file.

```plaintext
< 3.4.0.beta1-dev: 3a6512d0560211b93f022a27ed7276024d0020dc

```

If you’re using a [standard install](https://meta.discourse.org/t/142537?silent=true) of Discourse on `3.3.2` then you will be automatically be on commit `3a6512d0560211b93f022a27ed7276024d0020dc` of the plugin for which the category dropdown works. See further:

https://www.loom.com/embed/7e5f4a1aed894562a936fdceeb4a58d5?sid=e55c69fb-72dd-40d8-b29f-99d2aec493d1

---

<div class="post-metadata">

### Author: ![LaF0rge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/laf0rge/32/474195_2.png) [@LaF0rge](https://meta.discourse.org/u/LaF0rge)
#### Post date: [January 6, 2025, 1:37pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/9 "2025-01-06T13:37:48Z")

</div>

Thanks for your additional input. I’ve just done another attempt earlier today of using the plugin commit ` 3a6512d0560211b93f022a27ed7276024d0020dc` with my by now upgraded discourse 3.3.3, but I ended up in a state where all HTTP requesets were answered with `Completed 500 Internal Server Error in 42ms (ActiveRecord: 0.0ms | Allocations: 16860)` no matter for which URL. There was nothing in the production.log, nothing erroneous logged in the standard output/error and nothing in the passenger.3000.log either. Removing the plugin from the plugin directory + restarting has resolved the problem. It was reproducible several times.

For now I’m giving up. It was a nice idea to play with the ActivityPub integration, but I guess it’s not at the level where I can get it to do anything useful, unlike other plugins I managed to install succesfully. After all, it’s not a critical requirement, just a “nice to have”.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [January 6, 2025, 2:19pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/10 "2025-01-06T14:19:51Z")

</div>

If you’re manually trying to match up specific commits of any plugin with specific versions of Discourse it’s unlikely to go well. I’d urge you to consider using the [standard install](https://meta.discourse.org/t/142537?silent=true) of Discourse. You’ll reduce your overhead, and be able to use this and other plugins without issue.

---

<div class="post-metadata">

### Author: ![LaF0rge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/laf0rge/32/474195_2.png) [@LaF0rge](https://meta.discourse.org/u/LaF0rge)
#### Post date: [January 6, 2025, 3:51pm UTC](https://meta.discourse.org/t/setting-up-an-activitypub-actor/314578/11 "2025-01-06T15:51:04Z")

</div>

I hear you - but I will not deviate from installing and operating tagged/released versions of software. For discourse, that is AFAICT at this point in time 3.3.3.

I find it highly uncomfortable and unsettling to run production systems on anything but tagged releases. Call me old-fashioned, but I’m sucessfully operating (and developing) IT systems since the mid-1990s.

I respect that your and/or the official discourse developer community has a different attitude/approach. We agree to disagree. Thanks for your help so far nevertheless!
