Pinhole

Pinhole is a tiny single-user Bluesky→ActivityPub one-way bridge. It can be self-hosted to provide a mirror bot for exactly one Bluesky profile followable by exactly one ActivityPub (e.g. Mastodon) account.

Project Description

Screenshot showing the @atproto.com Bluesky account in Mastodon

This is an example of a Bluesky account being mirrored into Mastodon via Pinhole.

ActivityPub is a W3C standardized protocol for interoperable social networks used by Mastodon and others. Bluesky is a social network that has announced plans to enable federation using its own AT protocol in lieu of ActivityPub, but is still entirely non-interoperable at time of writing. However, all post data on Bluesky’s network can currently be easily accessed through APIs offered by its central server. Pinhole makes use of these interfaces to fetch the posts of a specific Bluesky profile and make them available as an ActivityPub actor that can be followed from compatible networks – although Pinhole’s federation capabilities are very rudimentary and only tested with Mastodon.

Pinhole currently supports bridging top-level posts, including attached images, as well as self-replies (threads), though not replies to other people. It also mirrors the profile description, display name, and avatar. Due to it being a one-way bridge, the posts it mirrors can be read, but interactions such as likes and replies will not be visible to the original author.

It should be noted that, while the ActivityPub half of this bridge is at least nominally a genuine implementation of the protocol, the Bluesky half is not an implementation of the AT protocol at all. Instead, it relies on known patterns in current Bluesky API URLs and lightweight response parsing. As Bluesky makes changes to its architecture, Pinhole setups might break. I will probably update it to keep it working for as long as I personally need it, but in the long term (especially if Bluesky sticks to its plan to provide federation through the AT protocol), the community will want to move to proper bi-directional bridges built by other people. If this is an area of interest to you, you probably want to follow the work of Ryan Barrett.

Built for Personal Use

This software is deliberately constructed to be anti-scalable. You can set it up for personal use to follow exactly one Bluesky profile from exactly one ActivityPub profile. There are no options to configure Pinhole to provide several mirror profiles or to make them followable by more than one person. Of course you are free to run multiple copies of this software if you want.

It would certainly be possible to build a large-scale Bluesky→ActivityPub bridge in the vein of bird.makeup and I’m mildly surprised that no one seems to have tried. Maybe people have felt it not worth putting the time in, with AT federation being promised for Bluesky in the medium term. I have weighed the pros and cons of trying to put together a larger-scale one-way bridge where accounts can be followed publicly, and have come to the conclusion that it is not something I personally want to unleash upon the world right now, for a variety of reasons. Pinhole makes the deliberate decision to make its mirror accounts only followable by one person, making it well-suited for personal-use deployments. In addition, all posts are mirrored with visibility limited to the follower, meaning they cannot be boosted on Mastodon.

It being open source, anyone who’s willing and able can try their hand at turning it into something larger. If that’s you, I’ll note that you may be better off starting from scratch than trying to rearchitect Pinhole into something scalable. But if you do use it as a basis, make sure to change the name.

Please be aware that this was a weekend-long hobby project that I’m making public because I like sharing. I did my best to make the process for the intended use case pretty straightforward, but if you run it for yourself, be ready for a certain level of friction. The Git repository has installation instructions.