- Go 32.8%
- Jinja 27.2%
- Vue 10.2%
- JavaScript 10.2%
- TypeScript 8.6%
- Other 11%
| .superpowers/sdd | ||
| docs | ||
| inventory | ||
| playbooks | ||
| roles | ||
| scripts | ||
| .gitignore | ||
| ansible.cfg | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| CONTEXT.md | ||
| Makefile | ||
| README.md | ||
| requirements.yml | ||
| secrets.yml.example | ||
| SETUP-COMMUNITY-SERVER.md | ||
| SETUP-HOST.md | ||
Matou Distributed Servers
Self-hosted websites and file storage for your community — running on computers your community already owns.
What is this?
Matou Distributed Servers is a way for a community to run its own websites and file storage — without renting space from Google, Dropbox, or Squarespace.
You set up:
- One small public server in the cloud (the "host"). It's the front door — the part of the internet that the public can actually reach.
- One or more local servers in your community (any old laptop, a Raspberry Pi, an unused desktop). These hold the actual files and websites.
The host and the local servers connect to each other over a private network that only your community can see. When someone on the public internet visits one of your community's websites, the host quietly forwards the request over the private network to whichever local server has the content.
The result, from the visitor's perspective, looks identical to any website hosted on Google Cloud or AWS. From your community's perspective, everything is running on hardware you own and control, in your own homes.
Why we built it
Most of what we use the internet for — websites, photos, documents, shared calendars — sits on machines owned by a handful of very large American companies. That's convenient until it isn't. Costs creep up. Terms of service change. Accounts get suspended. Rural and remote communities pay the most for the worst service.
This project is one community's attempt at a different answer. The hardware lives in our community. The data lives in our community. If the underlying internet is slow or expensive, that affects how fast the public sees our pages — but it doesn't affect whether our community can use the service. And if the cloud provider for the public host disappears tomorrow, the data is still safe at home; we just need to re-route the front door.
Concretely, what's running today:
- Public community websites at addresses like
01.matou.nz,02.matou.nz. Operators upload sites through a simple drag-and-drop page; the site appears in seconds, replicated across every community server. - Self-hosted file storage (Nextcloud — think Google Drive or Dropbox, but the files are on your friend's spare laptop instead of Google's servers). Sign in once, get a web folder you can sync to your phone or laptop.
- Single sign-on (ZITADEL) so people only have one account across every service the community runs.
How it works
Two kinds of machines, joined by a private mesh network:
The hostA small rented cloud server (we use a $6/month DigitalOcean machine). It does just two jobs: terminate HTTPS for your community's domain, and forward traffic over the private mesh to the local server that holds the requested content. The host stores no community data itself — it's fully replaceable. If you lose it, you can rebuild a new one and re-route DNS in under an hour. |
The community serverComputers physically in your community — anywhere with a power outlet and a home internet connection. They run the actual services (file storage, website content) and replicate files to each other so no single computer's hard drive is a single point of failure. When one server is offline (power cut, someone tripped on the plug), the others keep serving. |
The private mesh networkWhat ties the host and the community servers together. We use Netbird (an open-source layer over WireGuard) so all the machines can find and talk to each other directly, even when the community servers are behind a home router with no public IP and no port forwarding. From the host's perspective, every community server looks like a directly-reachable peer; from the community server's perspective, it never has to be exposed to the public internet at all. |
|
Step-by-step setup
The setup happens in two phases: first the public host, then each community server. This is the bird's-eye view — for the full procedure (every command, every edit, troubleshooting), follow the linked setup docs.
Phase 1 — set up the hostYou need:
What you'll do:
Result: a working public host with a wildcard HTTPS cert, the private-mesh control plane, an admin dashboard, and monitoring. About 15 minutes. 📘 Full procedure: |
Phase 2 — set up each community serverYou need:
What you'll do, per community server:
Result: the server appears at
📘 Full procedure: |
After both phases — what you've got
|
|
A note on "EliteBooks" in the inventory
The project's documentation and commands use "community server" as the
generic term, but inside the inventory you'll still see hostnames like
elitebook-distributed-server-01. That's a historical artifact: the
machines we happened to have on hand for this deployment were old HP
EliteBook laptops salvaged from an office upgrade, and renaming the
hostnames after deployment would break the existing Restic backup repos,
Garage cluster identities, and Netbird peer registrations that are keyed
on those names. The Ansible roles themselves are hardware-agnostic — any
computer that runs Ubuntu Linux works:
- An old laptop with a dead screen (just close the lid; the project configures the laptop to keep running).
- A Raspberry Pi 4 or 5.
- A second-hand mini-PC.
- A purpose-built NAS box.
For a fresh fork of this project on different hardware, change the
hostnames in inventory/hosts.yml and the matching host_vars/ files
to whatever name fits. The role library doesn't care.
Current limitations
This project is real and running, but be honest with yourself about what it is and isn't:
- Single point of failure for application UIs. Files in storage are replicated three times, but the Nextcloud web app itself runs on one community server. If that one server goes down (power cut, network blip), Nextcloud's web interface is unavailable until it's restored — even though all the files are still safely on the other two servers. Recovery is a documented operator procedure, not automatic.
- No off-site backup of file content yet. All three copies of your files live in the same community. If a disaster destroys the whole community simultaneously (fire, flood, theft of all three machines), the files are gone. The metadata (databases, configurations) is backed up small enough to copy off-site cheaply, but the file bytes themselves currently aren't. We're tracking the fix; until then, treat it as: "as durable as the cluster, no more."
- Operator-led, not user-led. Setting this up requires comfort with the command line, SSH, and DNS records. We're working on making it easier, but today it's not "click here to install" simple.
- The host depends on a cloud provider. The community servers are yours, but the public host (the front door) lives on a rented VPS. You can switch providers easily and rebuild quickly, but you do need some provider with a stable public IP.
- Internet-bandwidth dependent. A community on a slow connection will serve slow public websites. The local file-sync experience is fast (it's local!), but public visitors are bottlenecked by your community's upload bandwidth.
What's next
Things we plan to add as the project matures:
- Automatic failover for application UIs (high availability). When a community server hosting Nextcloud goes down, another server takes over automatically — no operator action needed, no downtime.
- Off-site / off-grid backups. Adding a fourth machine in another location (a friend's house in a different town, on a different internet connection) — or using cheap cloud storage like Backblaze B2 — to protect against whole-community disasters.
- More community apps. Beyond websites and file storage: chat (Matrix), git/code (Forgejo), shared calendars (Radicale), photo galleries (Immich), federated social (Mastodon, Bonfire). The authentication and storage layers are already in place; each new app is one playbook away.
- Multi-community federation. Two communities, each running their own Matou stack, sharing federated services with each other (e.g. inter-community Matrix chat, shared events, mirrored backups across community boundaries).
- Easier installation. A guided installer that handles DNS, inventory, and secrets through a friendly UI, not a config file.
Get involved / questions
This project is being developed openly by Matou Collective — with a small community in the Cook Islands. If you're interested in setting this up for your own community, or just want to ask questions about how it works, get in touch (ben@matou.nz or ian@sunriselabs.io).
For operators
If you're setting this up (or maintaining an existing deployment), start here:
SETUP-HOST.md— set up the public host (cloud VPS): customise inventory, DNS, secrets, runmake host, post-install steps.SETUP-COMMUNITY-SERVER.md— add a community server (Pi / Zimaboard / mini-PC / old laptop) to your stack.docs/DNS_RECORDS.md— exact DNS records to add at your registrar before the wildcard certificate can issue.docs/README-runbooks.md— index of per-service operational runbooks (Garage, Nextcloud, Restic, ZITADEL, host rebuild).docs/follow-ups.md— open work items.CHANGELOG.md— every substantive change to the deploy repo, newest on top.../distributed_stack_plan.md— master stage-by-stage rollout plan (Stages 0–11+).
For the development history of this README and what state the deploy is in at any given moment, the CHANGELOG is the source of truth.






