Skip to content

Projects to learn from

homeserver writes its own core so that it stays light, is easy to extend and fits our goals. To do that well we study earlier work: software, protocols, papers, essays and projects that did not succeed. This page lists them by area, with what to learn from each and, where relevant, how we differ.

Learn, don’t copy. We read code and papers to understand ideas. Before copying any code, check that its license is compatible with AGPL-3.0-only. GPL-2.0-only code must not be copied.

To add an entry, give it a link, what to learn from it, and how we differ.

Others have tried to give every person their own server. Learn why none of them reached ordinary people.

  • FreedomBox: a personal server on Debian, started after Eben Moglen’s talk “Freedom in the Cloud”. Shows what is hard about running a server at home.
  • Solid: personal data pods with apps that ask for access. Learn from its data model, access control and slow adoption.
  • Sandstorm: grains, capability-based sharing and sandboxed apps. Learn from its design and from why it was hard to sustain.
  • Cozy Cloud: a personal cloud with apps that share one data store.
  • Urbit: a personal server with its own identity system and networking. Learn from its scope and the complexity that came with it. We differ: no scarce identities and no tokens.
  • Upspin: a global namespace for personal files, from the Go team at Google.
  • Mail-in-a-Box: a self-hosted mail server you can set up without being an expert.
  • Helm: a personal email server sold as hardware, which shut down in 2022. Shows the risks of a business built on hardware.
  • Synology DSM and Apple iCloud: closed, but they set the usability that ordinary people expect.
  • Local-first software (Ink & Switch): a clear statement of principles we share.
  • Freedom in the Cloud (Eben Moglen, 2010): the argument for personal servers.
  • Tools for Conviviality (Ivan Illich): tools that serve people rather than make them dependent.
  • Governing the Commons (Elinor Ostrom): how communities manage shared resources without a central authority or a market. Background for mutual aid.
  • Calm technology: technology that stays in the background until it is needed.
  • A Pattern Language (Christopher Alexander): design as a shared vocabulary that people can use for themselves.
  • IndieWeb: own your data, publish on your own site and syndicate elsewhere (POSSE). Also Webmention and Micropub.
  • Small Technology: technology for one person, not for scale.
  • Data Transfer Initiative: moving personal data between services, and the export formats of large platforms.
  • iroh: dial a public key, not an IP address. We decided to write our own networking instead of depending on it, but it is the closest match to what hs-net needs, so study it in depth:

    • Hole punching, and falling back to a relay when a direct path fails.
    • The relay protocol over HTTPS and WebSocket, for networks that block UDP.
    • Network probing (net_report) and path selection across many paths.
    • Address lookup with signed DNS records (pkarr).
    • Access control for a relay (the AccessControl trait).

    We differ: no default dependency on a company’s relays or DNS, and a smaller dependency tree. A test build pulled in 231 crates.

  • Tailscale: DERP relays, magicsock, and the essay How NAT traversal works, a good introduction to the topic. We differ: no central coordination server.

  • quinn: QUIC in Rust. Read it for how the protocol state machine is kept separate from I/O (quinn-proto).

  • WireGuard: a protocol you can read in an afternoon. Shows how much a small, fixed set of choices (Noise, no cipher negotiation) can do.

  • Noise Protocol Framework: handshake patterns for authenticated encryption between keys.

  • libp2p: circuit relay v2, DCUtR hole punching, and the costs of a very general modular stack. We differ: fewer options and less abstraction.

  • Syncthing: a community relay pool, global and local discovery, and device IDs derived from keys. Many years of experience with peer-to-peer software that ordinary people use.

  • Yggdrasil and cjdns: mesh networks where an address is derived from a public key.

  • Reticulum and Meshtastic: networking over radio and other slow links, with no internet at all.

Read the specifications themselves, not only the libraries that implement them.

  • pkarr: DNS records signed by an Ed25519 key and published on the Mainline DHT. Lets a key be found without owning a domain.
  • Keybase: per-device keys, sigchains and social proofs. Shows how a person’s identity can outlive any one device.
  • Matrix cross-signing: verifying devices and people, and how hard it is to make that usable.
  • Secure Scuttlebutt: identity is a key, and social links decide what you store and relay for others. The closest earlier version of “neighbors help each other”. Also learn from its limits: append-only logs that cannot be pruned, and new users struggling to join.
  • Dark Crystal: recovering a lost key with the help of trusted friends (Shamir’s secret sharing).
  • Passkeys: signing in without passwords, which ordinary people now use.
  • Kanidm: an identity management server in Rust, with OpenID Connect and passkeys.
  • Authelia and Authentik: authentication gateways that self-hosters currently run and maintain separately. homeserver’s built-in identity provider is meant to replace them.
  • IndieAuth: signing in to other sites with your own URL as your identity.
  • Signal Protocol: the double ratchet, X3DH and sealed sender. The reference for private messaging.
  • OpenMLS: MLS in Rust, for encrypted groups such as families.
  • age: simple file encryption with small, explicit keys.
  • Magic Wormhole: pairing with a short code using a PAKE. A model for adding a friend or a new device.
  • CryptPad: collaborative documents the server cannot read.

Existing federated protocols share one lesson: federation alone does not give everyone a server of their own. Most people still gather on a few large servers. See “Why federation alone is not enough” in the README for the reasons and our answers.

  • Matrix: room state resolution across servers. Despite federation, most users sit on a few large servers. Study why: identity is tied to the server’s domain; every server in a room must replicate and resolve that room’s whole state, so a small server joining a large room pays a lot; and running a server takes ongoing effort. Its peer-to-peer experiments (Pinecone) are worth reading too. Note that “homeserver” is also a Matrix term.
  • ActivityPub and Mastodon: the most widely used federation, built around servers rather than people. Identity is tied to an instance and moving loses your old posts. Small instances are quiet, and moderation and spam fall on the admin, so people gather on large ones.
  • AT Protocol: the Personal Data Server, signed repositories (a Merkle search tree) and moving between hosts. A PDS can be self-hosted, but most people’s data sits on the official ones, and the relay and AppView are mostly run by one company. We differ: no global relay or indexer is required.
  • Nostr: keys plus simple relays, and how far a minimal protocol can go. Identity belongs to no server, as in homeserver.
  • Briar and its Mailbox: holding messages for offline contacts, which is our “mailbox” role.
  • Spritely Goblins and OCapN: object capabilities across a network.
  • ForgeFed: federation for code hosting, being built into Forgejo.
  • Automerge, Yjs and Loro: CRDTs for collaborative documents. Compare their data formats, performance and compile cost.
  • Willow: a sync protocol with capabilities and real deletion built in, from the Earthstar team.
  • cr-sqlite: CRDTs inside SQLite.
  • Git: content-addressed history that millions of people sync every day.
  • SQLite: a small, fast and reliable embedded database, with FTS5 and R*Tree, and a file format meant to stay readable until 2050. Our derived index uses it. Read how it is tested.
  • redb and fjall: embedded key-value stores in pure Rust.
  • Tantivy and SQLite FTS5: full-text search for every kind of data.
  • Perkeep: content-addressed personal storage meant to last a lifetime. Very close to our goals.
  • Tahoe-LAFS: storage among friends where the storage providers cannot read the data. The model for encrypted mutual backup.
  • Garage: lightweight S3 storage in Rust, made to be self-hosted across a few sites run by friends.
  • restic and BorgBackup: deduplication, encryption and repository formats for backups.
  • BLAKE3 and Bao: fast hashing and verified streaming of content-addressed data.
  • Litestream: streaming SQLite replication.
  • DuckDB and DuckLake: an embedded analytical database, and tables kept as Parquet files in object storage with snapshots and time travel. We measured them and chose SQLite; see the architecture page.
  • duckdb-tantivy: BM25 search with Chinese segmentation as SQL functions in DuckDB, written in Rust.
  • Turso: SQLite rewritten in Rust. We measured it; see the architecture page.
  • Solid: personal data stores on Web standards, from the Web’s inventor. Close to our goals; we differ in using an ordered log per space and keys instead of WebIDs on domains.
  • HTTP Message Signatures (RFC 9421) and Web Push (RFC 8030): standards we use between servers and for notifications.
  • WebTransport: QUIC for browsers, which lets a browser reach a node by certificate hash.
  • WinterTC and wasi:http: one request and response API on servers and in browsers, the model for our plugin interface.
  • BitTorrent: tit-for-tat, where peers reward those who give back. A simple local rule with network-wide effects.
  • IPFS: content addressing at scale, and the lesson that nobody keeps data unless someone chooses to pin it. We differ: no token economy (Filecoin).
  • Hyphanet (formerly Freenet) and its friend-to-friend mode: connecting only to people you trust.
  • Umbrel, YunoHost and Cloudron: app stores for self-hosting, and what goes wrong when updates break.
  • Home Assistant: a large ecosystem of integrations, and upgrades that ordinary people can live with. Home automation itself is a specialist need, connected through a plugin.
  • Caddy: automatic TLS certificates.
  • NixOS and OSTree: atomic upgrades and rollback.
  • Android A/B updates, RAUC and Mender: updating unattended devices without leaving them unable to boot.
  • PocketBase: a whole backend in one file plus SQLite.
  • FoundationDB simulation testing: run the whole distributed system deterministically in one process and replay any failure.
  • TigerBeetle and TigerStyle: deterministic simulation, assertions everywhere, and few dependencies.
  • Jepsen: how real distributed systems lose data, and how to find out.
  • Erlang/OTP: supervision trees, “let it crash”, and systems that keep running for years.
  • Fast Rust Builds (matklad): practical ways to keep compile times low.
  • rust-analyzer: a large Rust workspace organized for fast builds and clear boundaries.
  • tokio and smol: two approaches to async runtimes, large and small.
  • hyper, axum and rustls: HTTP and TLS in Rust.
  • UnifiedPush and ntfy: push notifications to phones without depending on Google or Apple.
  • Fluent and ICU4X: translation and localization, both available in Rust.
  • WCAG: accessibility for everyone in the family, including the elderly and the disabled.
  • llama.cpp and whisper.cpp: language and speech models that run on ordinary hardware, with no cloud.
  • Immich machine learning: face recognition and search by meaning (CLIP), done on your own server.

Projects that already serve one part of what homeserver covers. Study their features and data models, not their architecture.

Only everyday needs that 80% of people share belong here. Specialist needs such as media libraries, home automation and code hosting stay out of the core; see the next section.

Specialist software connected through plugins

Section titled “Specialist software connected through plugins”

Specialist needs stay out of the core and connect through plugins. Study the APIs and integration points of these projects to learn what the plugin interface must offer: identity, permissions, events and data access.