- Lua 67.8%
- Go 20.8%
- JavaScript 3.1%
- Shell 3%
- Rust 2.9%
- Other 2.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
crypt.unlock_groups says what must answer for a node to unlock, and both bindings are now rendered from it (crypt.sss_from_groups, for crypt.sss_config and root.policy) instead of each building its own JSON. The rendered policy is byte-identical for every descriptor shape that exists; a reviewer ran the old body beside the new over seven shapes. root.convert has a test, with the server and its neighbours stubbed: the server is rebooted only once the hook is seen in the initramfs, a boot that comes back on a plain root is said with the hook's own log, and a root already encrypted or a refused server is not touched. Watched red. building.md's "Running the tests" says that every push runs the recipe on the garden, and how to read what it ran: `./tend.lua ci <garden>` and `./tend.lua ci log TASK <garden>`. The command existed; nothing said so where a change is shipped, and a session spent a day believing CI could not be read. Its one-line description now says what it shows in plain words. Proposed, not done: "has this change passed?" has two commands, `ci` (the garden's runs) and `proof` (the signed evidence on a tree), and `ci` is a word for developers. The runs and their logs would sit better under `proof`, as one place to ask. |
||
| .forgejo/workflows | ||
| ci | ||
| groundwork | ||
| keepers/keys | ||
| lua | ||
| plant | ||
| press | ||
| seeds | ||
| soils | ||
| weeds | ||
| .dev-keys.example | ||
| .gitignore | ||
| .pressignore | ||
| _CONVERGENCE.md | ||
| _EDGE-CONTRACT.md | ||
| _GARDEN.md | ||
| _GOTCHAS.md | ||
| _MIRRORING.md | ||
| _Municipal.md | ||
| _PLAN-asset-compaction.md | ||
| _PLAN-batch-nodes.md | ||
| _PLAN-bus-operator-mode.md | ||
| _PLAN-domains.md | ||
| _PLAN-identity-and-secrets.md | ||
| _PLAN-management-plane.md | ||
| _PLAN-taproot-carries.md | ||
| _QUICKSTART.md | ||
| _RECOVERY.md | ||
| _SMELLS.md | ||
| _STATE-MODEL.md | ||
| _TODO.md | ||
| _TRUST-SURFACE.md | ||
| _WELL-KNOWN.md | ||
| about.md | ||
| building.md | ||
| config.lua.example | ||
| LANDSCAPE_ARCHITECTURE.md | ||
| LICENSE.txt | ||
| plant.lua | ||
| prepare.sh | ||
| privacy.md | ||
| README.md | ||
| social-contract.md | ||
| tend.lua | ||
| test.lua | ||
| description | nav_order | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Your own web hosting, file sharing, email, and video calls — on a server you share with friends. |
|
Sweetgrass 🌱
Information wants to be free. The internet should be a commons where we all have our place, not an endless series of toll roads controlled by a tiny minority of wealthy and powerful companies.
The trap
Building a website — even a small social network for the people you know — was never the hard part. You could host that yourself, today, for pennies.
The trap is what happens when it grows. The resources a thing needs grows with the number of people using it, so if you're giving it away, the costs grow without bounds if you're successful and you have to find a way to pay for that which pushes you towards advertising, selling data, manipulating attention - even if you never meant to, and it leaves you — not the people using what you built — holding the keys.
Selling it as a service is the same trap mirrored: now extraction is the business. That's how you get thirty dollars a month for a site that costs pennies to serve — the difference isn't covering anyone's costs, it's enriching whoever owns the ground.
Nobody needs to be a villain here it's just following the natural gradient imposed by economics.
The way out
A garden, not a service. Nobody owns it. Someone tends it. The community grows in it.
A garden is infrastructure you plant and tend — yourself, or with a few friends. You cover the resources at their real cost, which is small, because nobody is there to make money; you're there to share. Nobody holds keys over anyone, because everyone can leave with everything, any time. And the tools are built so that a person with some computer literacy can set them up, understand what they do, and fix what breaks — like an old car you can pop the hood on. If you can't look under the hood, you can't trust it; if you can't leave, it isn't yours.
And the fear that keeps everyone on the platforms — what if the thing I make gets popular? — is exactly what the rest of this is built toward, not finished yet and honestly marked: gardens syndicating and pooling their infrastructure, so that when something catches on it spreads across the gardens of everyone who values it, each covering their own small, tractable share. Popular things grow to internet scale with no center — no advertising forced on anyone, no giant to pay, no ground for anyone to own.
Sweetgrass is that garden's toolset — web hosting, publishing, file sharing, email, video calls — run by you and answerable only to the people using it.
Two doors in
- Make your home in the community garden — a website, email, files, video calls. Free, tended by a worker co-op, admission by lottery as space allows. For everyone who'd rather not run servers.
- Plant a garden of your own — a few friends, a domain, about an hour. This is the point: many small gardens, no center to capture.
Either way the social contract is the same, and everything you make is yours to take with you.
The community garden
If you don't want to manage infrastructure, there's space in the community garden at sweetgrass.online, tended by the Sweetgrass-Garden Cooperative — a worker-owned co-op that builds these tools and hosts residents. It's free, and everything we use to run it is the same stuff you'd use to run your own — nothing hidden, nothing special.
The garden only takes on what it can actually carry, so admission is by rolling lottery — when there's room for more people, more names are drawn; no need to know somebody. Residents can leave, and come back, whenever they like. Those who want to go deeper can put their name in to become paid, mentored apprentices on the road to co-op membership — how that works.
Everyone who can chips in — with time, money, or however they can. If you're using more than your share, we'll have an honest conversation. The books are open.
This isn't the "real" Sweetgrass. It's one garden among many. If it disappeared tomorrow, the pattern wouldn't.
Anything you plant in our garden you can easily transplant into your own.
Planting your own
This is the point. Get a few friends together, pick a domain, and grow a garden. One person tends the infrastructure — the tools walk them through it. You can host all of this for about the price of a cup of coffee a month, shared between you.
The code is open. Improve it, share it back — and when the garden doesn't have a tool you need, you can grow your own from the same parts. Gardens share with each other, so you're part of a network without depending on a center. By running your own, you make the whole thing more resilient. Enough gardens, sharing like this, can carry anything the big platforms carry — at internet scale, with no center to capture, nothing to control. Anyone can walk away at any time, and the pattern keeps going.
The principles
However you use Sweetgrass, we all agree to the social contract
Yours to keep. Everything you create is portable. Move it to another garden, to your own, or somewhere else entirely. If you can't leave, it's not interdependence — it's dependence.
No extraction. Sweetgrass is engineered to be anti-agglomerative. Everything is open source and easily portable so even if we wanted to, we couldn't hold anything you host on it hostage.
Simplicity. The technology is understandable by the people who depend on it. If you can't look under the hood, you can't trust it.
Resilience through interdependence. Gardens share each other's data. The more gardens, the more resilient every garden becomes. We're strong because we depend on each other, not because we're isolated.
Under the hood
This page is also this repository's README: the website and the source are the same files, and everything here — this page included — is a markdown file you can read, edit, and carry away.
Three scripts named for what they do:
plant.lua Create infrastructure from scratch
tend.lua Deploy, update, backup, maintain
lua/compost.lua Tear everything down (safely, backups first)
The cycle is: plant, tend, compost, plant. Data survives destruction by default.
When you plant, you get a self-organizing cluster with:
your site ── static, always on
identity ── passkeys and single sign-on
git ──── your repos (Forgejo)
press ── push markdown, get a website
meet ── video conferencing (Jitsi)
mail ──── email + webmail (docker-mailserver)
Automatic SSL. Encrypted daily backups. Rolling updates, and Docker Swarm restarts failed containers on its own. The core services fit on a single small server (where an update or reboot means brief downtime); a 3-node cluster adds failover and room for meet.
The tools call standard unix utilities — ssh, rsync, curl — plus your cloud provider's CLI (hcloud, doctl, or none for bring-your-own hardware — see soils). Docker Swarm handles orchestration. We picked Swarm over Kubernetes because you can understand Swarm in an afternoon.
lua/deploy/ Stack deployment, template rendering
lua/backup/ Encrypted backup to S3-compatible storage (restic)
lua/maintain/ Rolling updates, health, scaling
lua/intake.lua SSH/rsync gateway for static content
lua/roots/ Swarm, DNS, and network primitives
lua/soil/ Provider layer (Hetzner, DigitalOcean, BYOH)
groundwork/<name>/conf.lua Groundwork definitions (self-describing)
.gardens/<g>/domains/<d>.lua Domain configurations (per garden)
Every piece of a running garden lives in groundwork/, each one a directory whose README is its documentation. No magic: every operation is a readable Lua script — no hidden state, no frameworks, just scripts that do things you could do by hand, reliably.
For how sweetgrass is put together and where everything lives, see the architecture; for how a change actually reaches a running garden, see building. For the publishing system at the heart of it, see press. To plant your first garden, start with plant.
The name
Sweetgrass is a plant sacred to many Indigenous peoples of North America. It spreads through underground rhizomes, connecting in ways you can't see, binding the soil together. You can't eradicate it once it's established.
We chose the name because that's what we want this to be. Infrastructure that spreads through communities, that's impossible to shut down, that binds people together. Many small gardens, connected underground.
Contributing
This is community infrastructure. If you see something that could be better, make it better. The whole thing is readable. Start with building.
License and agreements
The code is AGPL-3.0 — if you improve it, share it back.
The social contract is the garden agreement — how people in a garden agree to be with each other. It lives here because every garden has one.
Governance records of the Sweetgrass-Garden Cooperative — bylaws, meetings, proposals — live in the open at sweetgrass.garden/records (source: rhizome/records). They aren't part of this repository because not every garden is this organization.
Infrastructure doesn't have to be complicated or corporate. It can be ours.