It's been a long while since my last post on here, I've been busy helping to build https://blog.neighbo.au, which we will be launching this year, and with a young family time for doing much else is fleeting.
As promised, in August last year, Ghost did deliver Activity Pub support, but as expected it wasn't a straight forward exercise for the self-hosting folk like myself. At the time I decided to wait longer and let other people figure out the magic that I needed. Tonight I decided to see where things were at, and as expected some other lovely people had sorted out and written up what needed to be done.
The big question is, with Activity Pub integration, am I comfortable with Ghost's server handling this for me, vs running my own style of Activity Pub server. For me, given that this is just a federated network integration, I'm perfectly happy letting Ghost do the work. My actual content is still hosted by me, on my server. Activity Pub support is a simply a bonus.
The two posts I found and read through were these two, I'm sure there are others but for my purposes these two agreed and sufficed:


The tldr for my dokku hosted setup was needing to ensure that the following routes:
https://yourdomain.com/.well-known/webfingerhttps://yourdomain.com/.ghost/activitypub/health
were appropriately forwarded to ap.ghost.org
To do this I just had to setup a custom nginx config for my ghost dokku app:
mkdir -p /home/dokku/ghost/nginx.conf.d
cat > /home/dokku/ghost/nginx.conf.d/activitypub.conf << 'EOF'
resolver 1.1.1.1 9.9.9.9 valid=300s;
location ^~ /.ghost/activitypub/ {
proxy_pass https://ap.ghost.org;
proxy_http_version 1.1;
proxy_ssl_server_name on;
proxy_set_header Host ap.ghost.org;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization $http_authorization;
add_header Cache-Control "no-store" always;
}
location ~ ^/.well-known/(webfinger|nodeinfo) {
proxy_pass https://ap.ghost.org;
proxy_http_version 1.1;
proxy_ssl_server_name on;
proxy_set_header Host ap.ghost.org;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization $http_authorization;
add_header Cache-Control "no-store" always;
}
EOF
chown dokku:dokku /home/dokku/ghost/nginx.conf.d/activitypub.conf
nginx -t && service nginx reloadAnd also ensure that CloudFlare wasn't intercepting these. At the moment it means I do lose my free CDN, but honestly who cares, it's not like this is a highly trafficked blog ;).
So now you should expect to find this blog at @index@bednarz.au in your favourite ActivityPub client (mine is Ivory, for Mastodon).
Top Photo by Bee Felten-Leidel / Unsplash
