Add Activitypub Support #16

Open
opened 2026-08-13 08:35:44 +00:00 by untrusem · 6 comments

Ghost added activitypub support by default to their docker install in v6.0, it would be a good to incorporate to this recipe also.

Ghost added activitypub support by default to their docker install in v6.0, it would be a good to incorporate to this recipe also.
Owner

love the idea.
until now, the only other person I was in contact using ghost with coopcloud, didn't use the feature – and my ghost deployment has veeeery low activity. So the only reason that's not integrated is low capacity, but would be great to have it.

Do you have the ability to give it a shot? Should we explore together how to do this? Or is it more a wish for a feature but you have no clue how to add it?

love the idea. until now, the only other person I was in contact using ghost with coopcloud, didn't use the feature – and my ghost deployment has veeeery low activity. So the only reason that's not integrated is low capacity, but would be great to have it. Do you have the ability to give it a shot? Should we explore together how to do this? Or is it more a wish for a feature but you have no clue how to add it?
Author

@val I had replied to you via email and forgot forgejo don't support it

Subject: Re: [coop-cloud/ghost] Add Activitypub Support (#16)
Sent: August 28, 2026 8:01:55 AM UTC

>love the idea.
>until now, the only other person I was in contact using ghost with coopcloud, didn't use the feature – and my ghost deployment has veeeery low activity. So the only reason that's not integrated is low capacity, but would be great to have it.

Actually I don't use it myself and I honestly don't like it because of their llm adoption but there are people who asked me to host a ghost server for them, I wanted to use abra but it didn't have activity, which the user wanted.

That's my sole reason

>Do you have the ability to give it a shot? Should we explore together how to do this? Or is it more a wish for a feature but you have no clue how to add it?

I *can* have ability to do this if I am to be thought along the way, and I would prefer that as I wanted to add several recipes in abra. So teach me to fish :p
@val I had replied to you via email and forgot forgejo don't support it ``` text Subject: Re: [coop-cloud/ghost] Add Activitypub Support (#16) Sent: August 28, 2026 8:01:55 AM UTC >love the idea. >until now, the only other person I was in contact using ghost with coopcloud, didn't use the feature – and my ghost deployment has veeeery low activity. So the only reason that's not integrated is low capacity, but would be great to have it. Actually I don't use it myself and I honestly don't like it because of their llm adoption but there are people who asked me to host a ghost server for them, I wanted to use abra but it didn't have activity, which the user wanted. That's my sole reason >Do you have the ability to give it a shot? Should we explore together how to do this? Or is it more a wish for a feature but you have no clue how to add it? I *can* have ability to do this if I am to be thought along the way, and I would prefer that as I wanted to add several recipes in abra. So teach me to fish :p ```
Owner

Hey cool, so let's do this together @untrusem

On how to change the recipe's in general you find info here: https://docs.coopcloud.tech/maintainers/handbook/

There is a docker compose published by ghost which we can use as source of inspiration.

I would try to modify our compose-files as close to this compose-file published by Ghost as possible. Here they point out how to make use of activitypub using their docker-compose. https://docs.ghost.org/install/docker#enabling-social-web-activitypub

So basically what you need to do is to modify the compose.yml of the recipe – or better add an additional one, like compose.activitypub.yml (so we can make usage optional for operator's and everything you change won't interfer with existing deployments).

So now the work would it be, to identifiy in Ghost's compose.yml everything that is necessary, to have activitypub supported https://github.com/TryGhost/ghost-docker/blob/main/compose.yml and to add it accordingly to the newly created compose.activitypub.yml.

Probably basically the activitypub and the activitypub-migrate service, I'll add some comments:


  activitypub:
    image: ghcr.io/tryghost/activitypub:1.2.9@sha256:f950017169c778f90bc1d4097c0c83735dd88ee26a7dfacda56fb6325d4053a0
    restart: always
    expose:
      - "8080" # I would try to check if it's possible to realize this without exposing
    volumes:
      - ${UPLOAD_LOCATION:-./data/ghost}:/opt/activitypub/content # either we need to add a volume or we can use the existing `ghost_content`, not sure about this
    environment:
      # See https://github.com/TryGhost/ActivityPub/blob/main/docs/env-vars.md
      NODE_ENV: production
      MYSQL_HOST: db # MYSQL-env vars can be used directly
      MYSQL_USER: ${DATABASE_USER:-ghost}
      MYSQL_PASSWORD: ${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required}
      MYSQL_DATABASE: activitypub
      LOCAL_STORAGE_PATH: /opt/activitypub/content/images/activitypub # I would guess that stays the same
      LOCAL_STORAGE_HOSTING_URL: https://${DOMAIN}/content/images/activitypub # .. same here
    depends_on: # depends on does not exist in docker swarm, best would be 
      db:
        condition: service_healthy
      activitypub-migrate:
        condition: service_completed_successfully
    profiles: [activitypub]
    networks:
      - ghost_network # needs to be changed to our internal network "backend"

  activitypub-migrate:
    image: ghcr.io/tryghost/activitypub-migrations:1.2.9@sha256:f8a376e83187cc927fd6286a9e825b71056b2ac7dd8afcd1af1c8c7dc4657a8e
    environment:
      MYSQL_DB: mysql://${DATABASE_USER:-ghost}:${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required}@tcp(db:3306)/activitypub
    networks:
      - ghost_network
    depends_on:
      db:
        condition: service_healthy
    profiles: [activitypub] # I am not sure what "profile" is..
    restart: no

additionally i see an env-var : ACTIVITYPUB_TARGET: ${ACTIVITYPUB_TARGET:-https://ap.ghost.org} we would need to investigate what that means. I would guess this needs to point to our activitypub service. I am not sure if this needs to be reachable from the outside (could be, because in there setting it's configured in their reverse proxy caddy, so it could be that we need to add some traefik-labels to our app service).

let me know if you get stuck or something is very unclear and I will happily try to find out with you how to continue / resolve

:-)

Hey cool, so let's do this together @untrusem On how to change the recipe's in general you find info here: https://docs.coopcloud.tech/maintainers/handbook/ There is a `docker compose` published by ghost which we can use as source of inspiration. I would try to modify our `compose`-files as close to this compose-file published by Ghost as possible. Here they point out how to make use of activitypub using their docker-compose. https://docs.ghost.org/install/docker#enabling-social-web-activitypub – So basically what you need to do is to modify the `compose.yml` of the recipe – or better add an additional one, like `compose.activitypub.yml` (so we can make usage optional for operator's and everything you change won't interfer with existing deployments). So now the work would it be, to identifiy in Ghost's `compose.yml` everything that is necessary, to have activitypub supported https://github.com/TryGhost/ghost-docker/blob/main/compose.yml and to add it accordingly to the newly created `compose.activitypub.yml`. Probably basically the `activitypub` and the `activitypub-migrate` service, I'll add some comments: ``` activitypub: image: ghcr.io/tryghost/activitypub:1.2.9@sha256:f950017169c778f90bc1d4097c0c83735dd88ee26a7dfacda56fb6325d4053a0 restart: always expose: - "8080" # I would try to check if it's possible to realize this without exposing volumes: - ${UPLOAD_LOCATION:-./data/ghost}:/opt/activitypub/content # either we need to add a volume or we can use the existing `ghost_content`, not sure about this environment: # See https://github.com/TryGhost/ActivityPub/blob/main/docs/env-vars.md NODE_ENV: production MYSQL_HOST: db # MYSQL-env vars can be used directly MYSQL_USER: ${DATABASE_USER:-ghost} MYSQL_PASSWORD: ${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required} MYSQL_DATABASE: activitypub LOCAL_STORAGE_PATH: /opt/activitypub/content/images/activitypub # I would guess that stays the same LOCAL_STORAGE_HOSTING_URL: https://${DOMAIN}/content/images/activitypub # .. same here depends_on: # depends on does not exist in docker swarm, best would be db: condition: service_healthy activitypub-migrate: condition: service_completed_successfully profiles: [activitypub] networks: - ghost_network # needs to be changed to our internal network "backend" ``` ``` activitypub-migrate: image: ghcr.io/tryghost/activitypub-migrations:1.2.9@sha256:f8a376e83187cc927fd6286a9e825b71056b2ac7dd8afcd1af1c8c7dc4657a8e environment: MYSQL_DB: mysql://${DATABASE_USER:-ghost}:${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required}@tcp(db:3306)/activitypub networks: - ghost_network depends_on: db: condition: service_healthy profiles: [activitypub] # I am not sure what "profile" is.. restart: no ``` additionally i see an `env`-var : `ACTIVITYPUB_TARGET: ${ACTIVITYPUB_TARGET:-https://ap.ghost.org}` we would need to investigate what that means. I would guess this needs to point to our activitypub service. I am not sure if this needs to be reachable from the outside (could be, because in there setting it's configured in their reverse proxy caddy, so it could be that we need to add some traefik-labels to our `app` service). let me know if you get stuck or something is very unclear and I will happily try to find out with you how to continue / resolve :-)
Owner

addition: just looked up what profiles mean: https://docs.docker.com/compose/how-tos/profiles/
it seems to be the "compose standard way" to make some services optional.

this is probably the thing we would realize with our additional compose.activitypub.yml which is "activated" by an additional env-var in our .env.sample, something like:

## Adding activitypub-support
# COMPOSE_FILE="$COMPOSE_FILE:compose.activitypub.yml"

only when a maintainer uncomments this line, our addtional compose-file is "merged" into the existing one.
Here it would be as well the perfect place for additonal env vars if we need them

addition: just looked up what `profiles` mean: https://docs.docker.com/compose/how-tos/profiles/ it seems to be the "compose standard way" to make some services optional. this is probably the thing we would realize with our additional `compose.activitypub.yml` which is "activated" by an additional env-var in our `.env.sample`, something like: ``` ## Adding activitypub-support # COMPOSE_FILE="$COMPOSE_FILE:compose.activitypub.yml" ``` only when a maintainer uncomments this line, our addtional compose-file is "merged" into the existing one. Here it would be as well the perfect place for additonal env vars if we need them
Owner

ah @untrusem and if you didn't find your way already in matrix channel #coopcloud-tech, this is the perfect place to ask for help /discuss details: https://matrix.to/#/#coopcloud-tech:autonomic.zone?via=autonomic.zone

ah @untrusem and if you didn't find your way already in matrix channel #coopcloud-tech, this is the perfect place to ask for help /discuss details: https://matrix.to/#/#coopcloud-tech:autonomic.zone?via=autonomic.zone
Author

I will get to it soon, also @val it was through the matrix space I got an invite to the forge :P, I had made a thread about this

I will get to it soon, also @val it was through the matrix space I got an invite to the forge :P, I had made a thread about this
Sign in to join this conversation.