Slo Genesis · the sg CLI · work in progress

Personalized PaaS in minutes.

slo-gen turns servers you already rent into hardened LXD machines, forms them into a cluster and deploys your applications on top. Write a YAML file, read the plan, say yes. Nothing changes before you do.

$curl -fsSL https://gen.slostack.io/install.sh | bash
See it work ↓

Runs from Linux or macOS · manages Ubuntu 22.04 and 24.04 LTS hosts over SSH · one static binary

Why slo-gen

Your servers. Your rules. A receipt for everything.

You have a few boxes at a provider. You want them locked down, on a private network and able to run containers and VMs. You've done it by hand before. It took a weekend, and nobody wrote down which weekend.

slo-gen does that weekend the same way every time. It hardens SSH, adds a deploy user, joins your tailnet, puts a firewall in front of LXD and sets up ZFS storage. Then it checks every step actually happened.

Everything it changes goes into a local ledger. That ledger is the only thing it trusts when it's time to undo, so it never deletes what it didn't create.

How it works

Spec, plan, apply.

Every resource works the same way. A machine, a cluster, a whole application. You write the spec, sg shows you exactly what it will do, and you answer the question.

$ sg machine init --config machine.yaml
machine.yaml: valid (genesis/v1). registered node-a in the project ledger.
next: sg machine plan --config machine.yaml

$ sg machine create --config machine.yaml
Machine node-a (203.0.113.10) — plan: 8 changes, 8 executable now, 0 deferred.

  1  install.packages   package fail2ban not installed      [low]    (executable)
  2  harden.ssh         effective sshd password auth…       [medium] (executable)
  3  create.deploy-user deploy user absent                  [medium] (executable)
  4  install.tailscale  tailscale not installed             [medium] (executable)
  5  firewall.guard     sg_guard table absent               [high]   (executable)
  6  storage.zfs        sg-zfs.conf absent                  [low]    (executable)
  7  install.lxd        lxd snap not installed; …           [high]   (executable)
  8  verify.isolation   depends on guard verification       [none]   (executable)
Apply 8 changes to node-a? [y/N]: y
run 01JF… finished: ok. 8 changes applied and verified.
The shape of a first create on a fresh host. Reasons are shortened here; yours will name what your host is missing.
  1. Write

    One YAML spec per thing. sg machine init writes the first one with safe defaults filled in.

  2. Plan

    Read-only. It connects, looks and prints ordered changes with a risk grade each. It touches nothing.

  3. Apply

    Builds a fresh plan, shows it, asks [y/N]. Stops and records at the first failure.

  4. Prove

    Each change is verified after it runs. Ownership goes in the ledger, so rollback and destroy know what's theirs.

Machines

One server becomes one hardened LXD host.

Point sg at a fresh Ubuntu box you can SSH into as root. sg machine create runs eight changes in a fixed order and verifies each one before moving on.

  1. install.packagesfail2ban and unattended-upgrades
  2. harden.sshno root or password logins
  3. create.deploy-usera non-root user with your public key
  4. install.tailscalejoins your tailnet
  5. firewall.guardan nftables guard in front of LXD
  6. storage.zfsa ZFS pool with a capped ARC
  7. install.lxdLXD 5.21, API on tailnet:8444
  8. verify.isolationproves the guard actually holds

Three or more of those and sg cluster create forms them into one LXD cluster. Launch your first machine →

Applications

Then deploy what you actually came here to run.

An application is groups of containers or VMs, pinned to cluster members, with volumes, a PostgreSQL or ClickHouse service and an HAProxy load balancer if you want them.

application: shop
├── web          # 2 containers, port 8080, health checked
├── db           # 1 VM, PostgreSQL, data on a block volume
└── web-edge     # HAProxy in front of web, listening on 8088

A deploy only counts when every instance passes its health check and the exposed ports answer from your workstation. Then it becomes a generation. Scale, upgrade, restart, or roll back to the one before. Launch your first application →

For your coding agent

Hand your agent the manual.

These markdown files teach Claude Code, Codex or Slo how sg works: the specs, the commands, the safety rules and what it must never do on your behalf. Drop one in and ask for a machine.yaml.

Where each file goes, and how to use it →

Guardrails

Things it won't do.

Infrastructure tools are mostly defined by what they refuse.

  • Touch your known_hosts. You add the host key yourself, and it checks every connection against it.
  • Delete anything the ledger can't prove it created. Unowned things are printed as retained and left alone.
  • Keep secrets in a spec. Specs name environment variables; values are read at run time and never written down.
  • Put the LXD API on a public or wildcard address. It binds to your tailnet on port 8444 behind a firewall guard.
  • Reboot your host, or let --yes skip a safety check. --yes answers the question and nothing else.

Honest status

Early. Read this before you point it at anything you love.

slo-gen is 0.1.0-dev. Machine plan and create have been run by hand on one real Ubuntu 24.04 host. Clusters and applications pass their journey tests against real SQLite and a scripted SSH and LXD runner, but have no recorded run on real hardware yet.

Use spare servers. Read every plan. What's proven and what isn't →

Walkthroughs

Three walkthroughs, one afternoon.

Do them in order and you'll go from a bare server to a load-balanced app with a database.

  1. Launch your first machineFrom a fresh Ubuntu server to a verified LXD host, with every prompt explained.
  2. Form a clusterThree machines, one LXD cluster, and the trust that comes with it.
  3. Launch your first applicationTwo web containers behind HAProxy, deployed, checked and rolled back.

Install

Every estate starts with one machine.

One static binary, no daemon, no account. Your state lives in a SQLite file next to your specs.

$curl -fsSL https://gen.slostack.io/install.sh | bash

Then run sg version. Install guide and direct downloads →