My linkblog on fediverse
2024-12-23 tags: hyperlinks linkblogs fediverse mastodon activitypubHyperlinks are the essence of the web. They enable content discovery, allowing users to navigate between diverse sources of information with different interfaces, graphics, and technologies. Using links is straightforward - you just need to click or tap on them. It's also easy to create new links on the web, you just need to follow some basic rules and conventions.
Lately, there has been a renaissance of linkblogs, blogs focused on sharing curated links. Some notable examples of linkblogs I follow: Simon Willison's Links, Nelson's Linkblog, Kellan's Linkblog. Things Magazine is also a linkblog, as is the wonderful Italian newsletter Link Molto Belli == Very Beautiful Links. My RSS reader follows also many accounts from Pinboard, they are technically personal bookmarks, but I consider them equivalent to linkblogs too.
I've been thinking about creating my own linkblog for a while now. I browse the web and save many bookmarks, some are private, but most can be public. They reflect a curated filter of web content about topics related to my interests (digital libraries and archives, web archiving, books, mountains, and obscure music).
I discarded the idea of using any blogging service, I prefer to self-host my content (like this blog). I could have used a static site generator - there are dozens of them - but I always struggle to find one as simple as I want. Furthermore, since a linkblog is related to content I browse, I want something with less friction than creating a markdown file, pushing to a repo, and waiting for the build. I want an admin interface where I can post quickly, without leaving the browser, maybe with the help of a bookmarklet, a browser extension, or a Tampermonkey script.
I have also evaluated Pocketbase, which is a very nice application platform. You can easily create a data model (with migrations), the UI is minimalistic and beautiful, and you can easily plug in code (this was my first attempt that just publishes an RSS feed, linkbase). It's very easy and powerful, but some things are missing: an HTML interface (which could be quickly done with templ), but more importantly, Fediverse integration. Because yes, for a linkblog an RSS/Atom feed is mandatory, but these days ActivityPub is also a good way to publish content and reach readers.
A full Mastodon instance is overkill, considering the resources and maintenance required. I want something simpler. Here comes Snac, a simple, minimalistic ActivityPub instance written in portable C. A database is not needed, the data is stored in json files in the filesystem, dependencies are minimal, and there is no Javascript.
I first heard of Snac from Stefano Marinelli, who is a lovely source of news from the BSD world, selfhosting, networking and everything related to Unix philosophy. Then from Giacomo Tesio and this good post How to run your own social network (with Snac).
So, this is my linkblog on fediverse, made with Snac: https://href.literarymachin.es/raffaele.
This is how I have installed it. I prefer a containerized deploy, but a static binary build and a systemd service are enough and maybe even more simpler to deploy it.
I build the image on my laptop:
git clone https://codeberg.org/grunfink/snac2.git
cd snac2
docker build -t snac .
Then I transfer the image on the remote server (it's a 12MB image, I don't need a registry!):
docker image save snac | ssh {REMOTE_SERVER} docker load
I run it with this Docker compose:
services:
href:
image: snac
restart: always
security_opt:
- no-new-privileges:true
volumes:
- ./data:/data
ports:
- "8001:8001"
mkdir data
docker compose up -d
The basic configuration needed is changing the hostname:
cat data/data/server.json | jq .host
"href.literarymachin.es"
Then I create my user
docker compose exec href snac adduser /data/data raffaele
And finally, I have configured a nginx proxy like this example.
Follow my linkblog, and suggest more linkblogs to follow!