Getting ActivityPub running

... well, not yet.

Getting ActivityPub running

I'm enjoying following along with the ActivityPub newsletter, despite a shocking lack of AI-generated pugs for two weeks in a row. (You can't tell me that dog in this week's newsletter is a pug. The ears are all wrong. And then there's the Star Trek reference along with what's very clearly a Star Wars image. And oh, sorry, I got nerd sniped for just a second there. Or maybe this whole post is me getting nerd sniped. Oh well.)

Although this week's newsletter clearly says we'll get install directions for self-hosters this summer, and it's barely March, I looked at the repo and there were sort of directions there. So maybe I'll try it, why not?


I do development work on WSL2/Ubuntu 22, so that's where I'm playing today. I'm generally following these directions, but...

I didn't have tailscale (or ngrok) installed, so I needed to do that.

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscaled

(that runs forever, so started a new terminal window...)

sudo tailscale up

(click the link and go authenticate)

sudo tailscale funnel 80 

Oh, ok, go follow THAT link.

sudo tailscale funnel 80

Note the url provided ("Available on the internet:")

Install Ghost (I'm running 5.110.0, installed by ghost install local)

ghost config url https://YOURINFO.tailYOURINFOHERE.ts.net/

In the activity pub directory: yarn dev

Oh, ok, no docker installed.

Install docker, following these directions.

then... sudo service docker start (more WSL2 quirks)

In the activity pub directory: sudo yarn dev

Lots of stuff happens (mostly docker containers getting downloaded and started) and then:

But... I don't see anything listening on port 80, and when I try to visit mytailscaleurl/ghost, it times out, and tailscaled says:

http: proxy error: dial tcp 127.0.0.1:80: connect: connection refused

And netstat showed nothing listening to port 80.

I took a look at the activity pub directory, where these docker files live. nginx/nginx.conf showed it including /etc/nginx/conf.d/#.conf. But um... I don't have nginx installed, because this is just my WSL dev setup, remember? Right, ok, that's a problem.

sudo apt-get nginx

ghost setup nginx

(Ghost complains that it can't restart nginx... )

sudo service nginx start (actually, I think I might have stopped it first?)

Then over in the activitypub directory: yarn stop and then yarn dev

Hey, something is listening on port 80!

Nope. Redirect loop.

More fussing. SSL isn't actually set up by Ghost, since this is a local install. Try to set up ssl. Lots of struggling. I took all the activity pub stuff down so that I could work just on getting Ghost on ssl, using non-containerized nginx. But I'm having problems getting my certificate to validate, which looks to be nginx not letting the requests through? Argh.

More later. There will be a later.


Reflection: Maybe, just maybe, I made this harder than it needed to be by running in WSL and with a local install of Ghost. I may need to take another run at it with a 'real' Linux server, because it feels like I got almost there....

Update! Jannis got it running! (Which is not surprising - he's got a lot more expertise with Docker than I do.) Now the question is, where are the posts...?