Stefano Marinelli - littleFedi
Barista at BSD Cafe and illumos Cafe - @stefano@bsd.cafe / @stefano@illumos.cafe
Spreading weather forecasts all over the Fediverse via FediMeteo - @admin@fedimeteo.com
Testing littleFedi here on littleOne, its first instance open to outside users. Small ActivityPub server, single Go binary, still in active development.
The official littleFedi account is: @littlefedi_official@littleone.littlefedi.social
- littleFedi
- littleFedi Project Verified link to littlefedi.org
- Issues
- littleFedi issues
Do you want to chat about littleFedi on Matrix?
We have a space, we have a room!
Join us at https://matrix.to/#/#littlefedi-general:bsd.cafe
See you there!
littleFedi: a Fediverse Server That Doesn't Need a Data Centre
I was fifteen, and there were no BBSes in my city. So every call was long distance, once a day, sometimes twice. I'd start the dialer and wait for that sound - the handshake, the negotiation, the hiss settling into a carrier - and then I was connected to a computer sitting in somebody's bedroom, a few hundred kilometres away. I was a co-sysop of a local board and a national moderator of a FidoNet area. None of my friends understood what I was doing, and they'd stopped asking to avoid an incomprehensible monologue. But I liked it, and that was enough for me.
Here's the thing about that computer in someone's bedroom. There was no data centre. No domain, no certificate authority, no hosting provider, no cloud. Just a machine, a phone line, and a person who'd decided to run it. If you wanted to reach it, you called it.
Now look at what it takes today to put a small server on the network so other people can talk to it. A public address, which most home connections no longer have. A domain, which you rent. A certificate, which somebody has to issue you. And, increasingly, a VPS somewhere, because the software won't fit on the hardware you already own.
We've added a lot of infrastructure between two people who just want to talk. That's what littleFedi is about.
What it is
A single Go binary. No Ruby, no Sidekiq, no Redis, no separate worker processes to babysit. You run init, answer a few questions, and you've got a working instance. It speaks ActivityPub, and it speaks the Mastodon client API well enough that existing apps just work.
It also runs on hardware that would make Mastodon - or even Akkoma - struggle. Most software in this space assumes a VPS with a few gigabytes of RAM and a database server next to it. We assumed a Raspberry Pi Zero W behind a home router. There's a low_power mode that tunes memory use, image decoding and thumbnail generation for exactly that kind of box, and it's tested on that kind of box, not just on a fast dev machine.
In spirit this puts littleFedi close to snac, which I've always liked a lot. Same conviction: a personal server shouldn't need a fleet of services behind it.
Federating without a public address
littleMesh is the part I'm most attached to, and it's the part that goes back to the modem.
Your instance generates an Ed25519 key pair. That key is its identity - the node's address is derived from the public key, so reaching that address means reaching the holder of that key and nobody else. No registrar, no certificate authority, nobody to ask permission from.
A small set of public lighthouse nodes help two instances find each other. Once they're introduced, the traffic runs over a second TLS session pinned to both node IDs. The lighthouse copies encrypted bytes back and forth. It never sees plaintext, and it can't impersonate either side. And if the two nodes can reach each other directly, they drop the relay after the introduction and talk peer to peer.
Which is, more or less, calling the BBS directly. Just without the phone bill.
The gateway into ordinary HTTPS
Mastodon and other regular servers can't resolve a mesh address on their own. There's no domain and no certificate for them to find.
That's what the optional HTTPS gateway is for. A lighthouse operator can run one alongside the relay, and it bridges the mesh into ordinary HTTPS for the rest of the web. The gateway has to terminate TLS to do that, so it can technically see the traffic passing through it. Which is exactly why it's a separate, opt-in piece and not something every node exposes by default.
It has two independent settings: one controls what the gateway lets ordinary internet visitors reach at all, and a second one applies again at the destination node. Left at their defaults, both allow only federation traffic - ActivityPub delivery, discovery, public media. Web login, API and media proxy stay closed unless an operator deliberately opens them.
Mesh peers talking to each other directly never touch the gateway at all. That exposure only applies to the bridge into the wider web. And all of this can be self-hosted.
Chronological timelines
Timelines are chronological. Nothing gets reordered by an engagement model.
If you want something closer to "what did I miss", there's a separate /catchup page you visit on purpose. It ranks posts using signals your own instance already has - how many people you follow boosted something, whether it continues a conversation you took part in. No external popularity score, no telemetry, nothing leaves the machine. You press "mark as read", it moves a divider, and that's the only thing it remembers.
Self-expiring posts
You can set a post to expire, with its own timer, instead of a fixed instance-wide setting.
This isn't a client-side trick that hides the post from view. The expiry goes on the same durable job queue that runs the rest of littleFedi's background work, so the deletion survives restarts and isn't lost if the process happens to be down at the moment the timer fires. When it does fire, the post is deleted and a real Delete activity goes out to everyone who received it - so it actually disappears from remote instances too, not just locally. Editing the post before then can push the timer back or cancel it.
Static blogs, with real threaded replies
littleFedi can take a Fediverse post and publish it as a page on a plain static blog, with its own Atom feed and permalinks that don't move even if you edit the post later. No JavaScript, no database hit on page load.
The part I find more interesting is that the replies aren't left out. If the author turns the option on, littleFedi pulls the public replies that were actually federated to the post, threads them the same way the timeline does, and bakes the whole tree into the generated HTML at build time. So a blog post can show a real comment thread, in the same static file, with the same guarantee as the rest of the page - no JavaScript, no live queries. Only public and unlisted replies qualify, obviously. Anything followers-only or direct never enters the picture.
Why it looks like this
This isn't minimalism for its own sake. It's about how many people simply can't run their own server today, because the requirements are too steep. The hardware, the ops complexity, or just needing a domain and a public address before you can start. We're trying to remove those barriers one at a time, while still shipping a real, federating, reasonably complete server: polls, quotes, scheduled posts, MFA, PostgreSQL and S3 if you want to scale up later.
I've written before about taking a semi-truck to buy salad. Hardware keeps getting more expensive and the software running on it keeps asking for more of it every year. That's backwards. If the machines cost more, the operational cost of what sits on them should go down, not up. Same with complexity: the default direction is to keep adding it, and we'd rather strip it out.
And there's the other half, which is closer to why any of us are doing this at all. It's the same thing that drew me to snac and to the way grunfink works on it, and the same thing that had me dialing a stranger's computer at fifteen. People building tools so that people can talk to each other. Nothing more dressed up than that. We'd rather show the servers running, talk about the Pi sitting in the corner, share a tiramisu photo if it comes up. The joy in this was never about the money it brings in. It's about what we end up building, humanly, because of it.
It's beta software, still short of a first release, and I'd rather say that plainly than oversell it. But it runs, and it federates. That's the part I wanted to write about.
Hi everyone, I'm Stefano
Also known as the BSD Cafe and illumos Cafe barista - @stefano@bsd.cafe and @stefano@illumos.cafe
This is the first post from littleOne (littleone.littlefedi.social), the first littleFedi instance open to outside users.
littleFedi is a new ActivityPub server, still in active development, written in Go and shipped as a single binary. It speaks standard ActivityPub, so it federates normally with Mastodon, snac, GoToSocial, Akkoma and the rest of the fediverse, and it exposes a Mastodon-compatible API, so most existing apps already work with it.
A few things about it that aren't the usual fediverse defaults:
-
Catch-up instead of an algorithm. Timelines stay chronological, full stop. There's a separate
/catchuppage, visited on demand, that ranks what you missed using only signals this instance already has locally - who you follow boosted it, replies and favourites delivered here, hashtags you follow. No external popularity data comes in, nothing about what you read is tracked. It answers "what did I miss" without turning into a feed that decides for you. -
Static blogging built in. Any post can be marked as a blog post and gets published as a plain static page under
/@username/blog/, with its own permalink, Atom feed, and no JavaScript or database hit per view, while still being a normal federated post underneath. A proper home for longer writing that doesn't need to compete with a timeline. -
Self-expiring posts. Any post can be given a timer and auto-delete on its own.
-
Bubble timeline. A middle ground between local and federated: a timeline scoped to a set of instances you've chosen to group together, not just your own or everything.
-
littleMesh. A way to federate without a public domain, certificate, or open port at all - meant for something like a Raspberry Pi behind NAT. Instances get an address derived from an Ed25519 key pair and reach each other through pinned relays that never see plaintext.
-
No trends, no suggestions. These are intentionally left empty. Nothing here is trying to surface "popular" content or keep anyone scrolling longer.
-
Security defaults taken seriously. Signed federation (HTTP Signatures), optional Object Integrity Proofs, TOTP MFA, audit logs, and full account export, migration and deletion if you ever want your data to live somewhere else.
This instance is here to test all of that with real accounts, not just a small group ones'. In the next few days I'll be reaching out to everyone who already told me they were interested, to set the first accounts up - an invite is coming. If you'd rather just follow along and see how it goes, that works too.
It's a test instance, so expect the occasional rough edge. If something breaks or feels wrong, tell me - that's exactly what this phase is for.
Another little step for #littleFedi!
As more people start testing and running littleFedi, bug reports, suggestions and ideas are becoming increasingly important. And keeping track of everything through Mastodon posts and private messages isn't exactly the best solution. :)
So, we now have a proper Issue Tracker!
https://issues.littlefedi.org/
Found a bug? Have an idea for a new feature? Think something could be improved, or that the documentation is missing something? This is the place.
You can register, check existing issues and open new ones.
littleFedi is still growing, and your feedback is helping us make it better, one small step at a time.
Thanks to everyone who's been testing, reporting, suggesting and, most importantly, giving this little project a chance.
Well, it should be ready (enough) for some issues/suggestions/bugs/etc.
Friends, could you please test it?
https://issues.littlefedi.org/
Thank you!
@willi@littlefedi.wurzerfamily.net that could be a little harder, especially for now. But it could be a good idea!
@po3mah@li.rozman.info You can add one from the command line:
littlefedi admin relay add --actor https://relay.example/actor
Use the relay’s ActivityPub actor URL, not its inbox URL. Then check the status with:
littlefedi admin relay list
It'll stay pending until the relay accepts the request.
The littleOne instance is extremely useful for measuring littleFedi's performance. The devs are implementing some optimisations (which require a few migrations), and I'll be measuring the results here.
If you notice anything behaving strangely, it's probably because I'm restarting the instance to test the latest changes.
Sorry about that, but it's the price we have to pay to help the project get better! 😉
littleFedi: reverse proxy and split domains
littleFedi can use one domain for account handles and another for the server. For example:
@alice@example.comis the address people follow.https://social.example.comserves the web interface, API, media and ActivityPub objects.
You can keep your existing website on example.com. It only needs a rule that redirects WebFinger requests to the littleFedi domain.
Choose both domains before creating accounts. Changing them later changes the instance’s identity.
littleFedi configuration
In littlefedi.toml, with the reverse proxy running on the same machine:
local_domain = "example.com"
web_domain = "social.example.com"
[http]
listen = "127.0.0.1:8080"
proxy_uri = "https://social.example.com"
trusted_proxies = ["127.0.0.1/32"]
If you already have an [http] section, edit it rather than adding another.
Point the DNS records for social.example.com at the reverse proxy. The server hosting example.com must also serve HTTPS. A DNS alias alone does not replace the WebFinger redirect.
Expose ports 80 and 443 on the proxy and keep port 8080 private. If the proxy runs on another machine, use a private listener address and trust only the proxy’s address.
Caddy
Add this to your Caddyfile, replacing the example domains:
social.example.com {
reverse_proxy 127.0.0.1:8080
}
example.com {
redir /.well-known/webfinger https://social.example.com{uri} 302
}
Caddy handles certificates and the WebSocket connections used for streaming.
If example.com already has a site block, add only the redir line to that block and keep the existing website configuration.
Check the configuration before reloading Caddy:
caddy validate --config /etc/caddy/Caddyfile
nginx
This configuration belongs in nginx’s http context, usually through an included site file. Replace the domains and certificate paths with your own.
Install valid certificates and arrange automatic renewal before enabling the HTTPS servers.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name example.com social.example.com;
return 308 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name social.example.com;
ssl_certificate /etc/letsencrypt/live/social.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/social.example.com/privkey.pem;
client_max_body_size 41m;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 1h;
proxy_buffering off;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
location = /.well-known/webfinger {
return 302 https://social.example.com$request_uri;
}
location / {
return 404;
}
}
If example.com already hosts a website, add only the WebFinger location to its existing HTTPS server block. Keep the website’s other rules instead of the return 404 shown above. If you already have the same map directive, do not add it twice.
Check the configuration before reloading nginx:
nginx -t
Check discovery
Use an existing local account, replacing alice with its username:
curl --fail -i 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com'
The response should redirect to social.example.com, keeping the resource query parameter.
Then follow the redirect:
curl --fail -L 'https://example.com/.well-known/webfinger?resource=acct:alice@example.com'
The JSON should contain acct:alice@example.com as its subject, with an ActivityPub actor link at https://social.example.com/users/alice.
Finally, check a follow in both directions with another instance.
If account handles and the server use the same domain, only the reverse proxy is needed.
@shom@gts.shom.dev Thank you. A complete CVS system will maybe come in the future but, for now, the LCP want to keep the development cycle in their own control. Spinning up Forgejo (which we're already using at BSD Cafe, so I woudln't need to spin up a new one) would immeidately request a lot of "use it as the others do" and "why isn't the code and entire commit list there?"
So better a separate bugtracker, at least for now :-)
@justin@toot.io we already have forgejo at BSD cafe but the idea is to install a dedicated, bug tracker tool. At least for now.
@willi@littlefedi.wurzerfamily.net I know they do. But the littleFedi devs prefer, at least for now, to keep the dev process centralised and release only “when it’s ready”. 😉
Open source is not about doing things the approved way. It is about giving people the freedom to do things another way.
I'll probably configure a bugtracker for #littleFedi - collecting bugs, suggestions, etc. will be much easier. I was considering Roundup - what do you think?
Any suggestions?
@chainq@mastodon.social This is great news! Thank you for the feedback. And now...enjoy your instance!
@chainq@mastodon.social the split domain setup can be a bit tricky - but I'll try to give you some hints. Copying and pasting a message I sent to another friend some days ago, using apache:
Example: @alice@example.com, with LittleFedi at social.example.com. Apache and littleFedi run on the same machine.
littleFedi - merge into your existing config:
local_domain = "example.com"
web_domain = "social.example.com"
[http]
listen = "127.0.0.1:8080"
trusted_proxies = ["127.0.0.1/32", "::1/128"]
Apache - inside the existing HTTPS VirtualHost for social.example.com:
ProxyRequests Off
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
ProxyPass "/" "http://127.0.0.1:8080/" upgrade=websocket
ProxyPassReverse "/" "http://127.0.0.1:8080/"
Inside the existing HTTPS VirtualHost for example.com, before any catch-all proxy rule:
ProxyRequests Off
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
ProxyPass "/.well-known/webfinger" "http://127.0.0.1:8080/.well-known/webfinger"
ProxyPassReverse "/.well-known/webfinger" "http://127.0.0.1:8080/.well-known/webfinger"
ProxyPass "/.well-known/host-meta" "http://127.0.0.1:8080/.well-known/host-meta"
ProxyPassReverse "/.well-known/host-meta" "http://127.0.0.1:8080/.well-known/host-meta"
THis example requires Apache with proxy, proxy_http, headers and ssl enabled. Keep both domains’ existing certificate settings.
@chainq@mastodon.social @spook@pleroma.m68k.church @littlefedi_official@littleone.littlefedi.social Generally speaking, federation should be ok if the reverse proxy is configured correctly. The federation problems often appear because of reusing a domain previously used with another software (so key mismatch) or something wrong in the reverse proxy setup.
Are you using a single domain or split domain? (like social.example.com for littleFedi and example.com for the handles)
@kev@fosstodon.org Hi Kev, we haven't tested it with so many followers but I think it can deal with it - especially with the PostgreSQL backend, but I think the sqlite can do it, too, if the storage isn't too slow. I'm aware of an instance having a user following more than 30.000 accounts (and using lists, clearly), running on a cheap VPS with no issues at all.
We're also planning to create a procedure to migrate from SQLite to PostgreSQL and vice versa, so it will be possible to move to a "more appropriate" database if needed.
Thinking about trying #LittleFedi but I'm not sure how it would fare on a larger fedi account. I have ~13k followers - has anyone with an account of a similar size been using it?