Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

ActivityPub Server in a Single PHP File

· 9 comments · 1,950 words · Viewed ~3,737 times


Logo for ActivityPub.

Any computer program can be designed to run from a single file if you architect it wrong enough! I wanted to create the simplest possible Fediverse server which can be used as an educational tool to show how ActivityPub / Mastodon works. The design goals were: Upload a single PHP file to the server. No databases or separate config files. Single Actor (i.e. not multi-user). Allow the Actor to…

Internationalise The Fediverse

· 35 comments · 750 words · Viewed ~315 times


Translation icon. By Linh Nguyen.

We live in the future now. It is OK to use Unicode everywhere. It seems bizarre to me that modern Internet services sometimes "forget" that there's a world outside the Anglosphere. Some people have the temerity to speak foreign languages! And some of those languages have accents on their letters!! Even worse, some don't use English letters at all!!! A decade ago, I was miffed that GitHub only…

A (tiny, incomplete, single user, write-only) ActivityPub server in PHP

· 10 comments · 900 words · Viewed ~1,121 times


Screenshot of a map. There is a pop-up containing an image of me drinking a pint.

I've written an ActivityPub server which only allows you to post messages to your followers. That's all it does. It won't record favourites or reposts. There's no support for following other accounts or receiving replies. It cannot delete or update posts nor can it verify signatures. It doesn't have a database or any storage beyond flat files. But it will happily send messages and allow…

Seven Years On Mastodon

· 3 comments · 550 words · Viewed ~464 times


Cartoon of a tusked mastodon holding a phone.

I remember seeing the original "A new decentralized microblogging platform" on HackerNews back in October 2016. A few weeks later, I joined - becoming the 7,112th user. As the years went on, my use of it waxed and waned. I started cross-posting to both Mastodon and Twitter. Gradually, I started spending more time on the Fediverse. Once Elon shat the bed on Twitter, I moved over completely. And, …

An open(ish) redirect on Mastodon

· 1 comment · 950 words · Viewed ~217 times


Cartoon of a tusked mastodon holding a phone.

I've responsibly disclosed a small security issue with Mastodon (GHSA-8982-p7pm-7mqw). It allows a sufficiently determined attacker to use any Mastodon instance to redirect unwary users to a malicious site. What do you think happens if you visit: https://mastodon.social/@PasswordReset/111285045683598517/admin? If you aren't logged in to that instance, it will redirect you to a 3rd party site.…

How far did my post go on the Fediverse?

· 3 comments · 1,150 words · Viewed ~2,882 times


Cartoon of a tusked mastodon holding a phone.

I wrote a moderately popular post on Mastodon. Lots of people shared it. Is it possible to find out how many different ActivityPub servers it went to? Yes! As we all know, the Fediverse is one big chain mail. I don't mean that in a derogatory way. When I write a post, it appears on my server (called an "instance" in Mastodon-speak). Everyone on my instance can see my post. My instance looks …

This blog is now on the Fediverse!

· 6 comments · 700 words · Viewed ~560 times


Setting screen showing the blog being enabled.

You can now have this blog federated to your social media site by following @blog@shkspr.mobi If you're on Mastodon, it should look something like this: You should be able to follow it on Lemmy, kBin, PixelFed, and some cool social network I've never heard of. How This blog runs on WordPress. Thanks to the tireless work of Matthias Pfefferle, there's now an official WordPress ActivityPub…

Some thoughts on Mastodon search

· 8 comments · 850 words · Viewed ~587 times


Cartoon of a tusked mastodon holding a phone.

The latest version of Mastodon includes search functionality. It's early days, but seems to work pretty well. Here are some of the interesting things I found when using it. Search is complex - expectations I don't mean the act of searching a database - that's routine - but I mean it is socially complex. Lots of people left Twitter because it was too easy to search for them. For example, if…

Fediverse Account Portability And Blocking

· 1 comment · 600 words


Cartoon of a tusked mastodon holding a phone.

One of the many great things about the Fediverse (Mastodon, PixelFed, Lemmy, etc) is that your account is portable. Let's say you're bob@social.boring and, one day, you decide to move your account to foxyfun@furryextreme.yif. Well, with a few clicks of a button, all of your old followers are now following your brand new account. You're still following all your old friends. The accounts you…

Federation is pretty cool, but kinda confusing, and maybe a little scary

· 5 comments · 400 words · Viewed ~677 times


Otome-chan says: "See here. you can see this mastodon user's post (which to them looks like a regular tweet on twitter does) ends up in our random microblogs section. We can also view their profile directly as well as follow them to have their posts appear in our microblogs (as well as threads if they go out of their way to make one). It seems kbin microblogs appear as threads/comments to you on lemmy. so I have to imagine mastodon posts might be similar?"

Last week, this strange mention appeared on my Mastodon feed. After a bit of clicking around, I figured out what had happened. A user on the Kbin social network had linked to my Mastodon profile. Thanks to the magic of the ActivityPub protocol, it filtered into my mentions - even though I've never even heard of Kbin. That's pretty cool! A user on one social network can mention a user on a…

How do you decentralise emergency alerts?

· 5 comments · 750 words · Viewed ~578 times


Cartoon of a tusked mastodon holding a phone.

Twitter's decision to hobble its API has meant that a number of useful alerting bots might no longer function. Your local subway might not be able to Tweet each morning about delays on the line, nor will a tornado warning be displayed as you scroll through photos of brunch, and forget about flood alerts between your memes. In one sense, this is sad. A set of useful public services are being cut…

Posting Untappd Checkins to Mastodon (and other services)

· 2 comments · 700 words · Viewed ~210 times


HTML source code of the page.

I'm a big fan of Untappd. It's a social drinking app which lets you check in to a beer and rate it. Look, we all need hobbies, mine is drinking cider. You can see a list of everything I've drunk over the 13 last years. Nearly 900 different pints! After checking in, the app automatically posts to Twitter. But who wants to prop up Alan's failing empire? Not me! So here's some quick code to…