- Lua 66.7%
- Go 10.9%
- Shell 9.5%
- Rust 7.1%
- CSS 1.9%
- Other 3.9%
When the VXLAN tunnel breaks (a known Docker Swarm failure mode),
every container's overlay interface goes DOWN. Services report as
running but can't communicate. Walk says ✅, setup hooks hang.
Doctor now checks overlay health first — reads eth0 operstate from
any container on the sweetgrass network. If it's down:
1. Diagnoses: "overlay network down — services can't communicate"
2. Treats: rolling Docker restart on each node
3. Verifies: overlay recovered before proceeding to setup hooks
This is the pattern for doctor going forward: check the foundation
before checking what's built on it. The overlay is the foundation.
|
||
|---|---|---|
| .claude/memory | ||
| .forgejo/workflows | ||
| ci | ||
| domains | ||
| garden | ||
| keepers | ||
| lua | ||
| plant | ||
| seeds | ||
| weeds | ||
| .dev-keys.example | ||
| .gitignore | ||
| .pressignore | ||
| _BUILDING.md | ||
| _BYOH.md | ||
| _CONVERGENCE.md | ||
| _DIGITALOCEAN.md | ||
| _GARDEN.md | ||
| _GOTCHAS.md | ||
| _LEGAL.md | ||
| _PLAN-assets.md | ||
| _PLAN-garden-scope.md | ||
| _PLAN-invite-flow.md | ||
| _PLAN-next.md | ||
| _PRESS.md | ||
| _QUICKSTART.md | ||
| _RECOVERY.md | ||
| _TODO.md | ||
| _WELL-KNOWN.md | ||
| about.md | ||
| config.lua.example | ||
| index.md | ||
| LICENSE.txt | ||
| plant.lua | ||
| prepare.sh | ||
| privacy.md | ||
| README.md | ||
| social-contract.md | ||
| tend.lua | ||
| test.lua | ||
Sweetgrass
Community infrastructure you can understand, modify, and share.
What this is
Sweetgrass is a set of tools for planting and tending your own corner of the internet — websites, publishing, email, git hosting, video calls — on small, affordable servers that you and your friends control.
Think of it like a community garden. You bring the seeds (your domain, your writing, your projects). The tools help you plant and tend. The infrastructure takes care of itself most of the time, and when it doesn't, you can read the code and fix it. All of it.
Where we are
We're building this right now. The tools work — we've planted multiple gardens and each planting gets smoother. Every one teaches us something new.
This is a barn raising, not a finished house. If that appeals to you — if you want to build something with people instead of buying something from a company — you're welcome here.
What you get
Three scripts named for what they do:
plant.lua Create infrastructure from scratch
tend.lua Deploy, update, backup, maintain
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 with zero downtime. Self-healing via Docker Swarm. The core stack (static through press) fits on a single small server. A 3-node cluster gives you failover and room for meet.
Two ways in
However you join, the social contract is the same: resilience through interdependence, no extraction, invite-based trust, portability.
Plant your own. Get together with friends. Pick your domains. Set up a few small servers. This is the way sweetgrass is meant to grow — many small gardens tended by the people who use them, sharing improvements through the same tools. See QUICKSTART.md.
Grow in the community garden. If you don't want to manage your own infrastructure, you're welcome in ours. It's free, it's invite-only, and your stuff is yours — you can transplant to your own garden or a friend's whenever you want. See GARDEN.md.
The philosophy
No magic. Every operation is a readable Lua script. No hidden state, no declarative DSLs, no frameworks. Just scripts that do things you could do by hand, reliably.
No lock-in. Your domains transplant between gardens. Your content is markdown files in git repos. Your infrastructure is standard Docker on standard servers. Nothing traps you here.
No extraction. We want you not to pay us. We want you to plant your own garden with friends and share what you grow. The code is AGPL — improve it, share it back. The more gardens, the more resilient every garden becomes.
Boring on purpose. The infrastructure is meant to be dull. Pages are simple and lightweight. Servers quietly do what they're supposed to. The most exciting thing about sweetgrass is that it works and you can understand why.
By planting sweetgrass, you're doing something quietly subversive. You're building infrastructure that's democratic by design and resistant to the patterns that turn tools into platforms and communities into products. It doesn't look like much. That's the point.
How it works
The tools call standard unix utilities — ssh, rsync, curl — plus your cloud provider's CLI (hcloud, doctl, or none for BYOH). Docker Swarm handles orchestration. We picked Swarm over Kubernetes because you can understand Swarm in an afternoon.
plant.lua Create and configure infrastructure
tend.lua Deploy, update, backup, maintain
lua/compost.lua Full teardown (backups first)
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)
garden/<name>/conf.lua Stack definitions (self-describing)
domains/<name>.lua Domain configurations
For the full technical story — why Lua, why Swarm, how the pieces fit, what we've learned — see BUILDING.md.
For the publishing system at the heart of it, see PRESS.md.
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.md.
License
AGPL-3.0 — If you improve it, share it back.
Infrastructure doesn't have to be complicated. It doesn't have to be corporate. It can be ours.