Steid
Steid is a version control server that is entirely yours. One tenant, one binary, one database, one owner. It is built to be stable, secure, fast and simple, and to do nothing else.
Who it is for. Anyone who wants their code on a server they control: a solo developer, a small team, a company that will not put its source on a shared platform. Steid Cloud runs it for you on hardware nobody else touches.
What it is not. Not a GitHub clone, not a social network, not a portfolio, not a platform. No marketplace, no discover feed, no plugins, no growth loops. Fewer things, all of them finished.
The four pillars are promises, not adjectives:
- Stable. Upgrades roll back. Backups restore, and are proven to restore. Migrations never lock you out. A new version number should be dull news.
- Secure. Single tenant is the security model: your data shares a process and a disk with nobody. Private by default — a new repository is visible to nobody until you say otherwise. Signed webhooks, expiring tokens, no third-party scripts on any page. Scoped tokens are committed, not yet shipped — see where it is going.
- Performant. One binary, SQLite, git on local disk, server-rendered pages. No page waits on a network call to something else.
- Simple. One binary, one config, one command to back up, one to restore. Everything you can do has one obvious way to do it.
It runs as a single binary with a SQLite database, shells out to git for everything
git-shaped, and is small enough to host on the cheapest VPS you can find.
What works today
Honestly and only:
- Identity and sessions. One user. The instance is claimed on first run with a setup token, then you sign in with a password. There is no registration — see limitations.
- Organisations. Every handle at
/{handle}is one — a person's is the personal organisation created with their account, and/orgs/newmakes the other kind. An instance may hold several; you own the ones you create. - A home page. One organisation is what the instance is for, and
/lands there for everyone, signed in or not. It is chosen in the setup wizard, moved from/{handle}/settings, or set at boot withSTEID_OWNER_ORG. An instance that never chose falls back to its only user. Members and roles are not built yet, so an organisation today means "this instance is Acme's", not "these five people are". - Setup in three screens — claim the instance, say who it is for, and a last screen
naming the home page and where to make the first repository.
/auth/setup?token=…prefills the token, so a claim link can carry it. - The owner's home page at
/{handle}, listing the repositories on the instance. - Repositories. Created through the browser, or imported by cloning a URL. Stored as bare repos on disk and records in SQLite. Private by default, public if you say so, renameable, pinnable, archivable, deletable, with a default branch you choose.
- Clone and push over HTTPS, through
git http-backend, authenticated with personal access tokens over HTTP Basic. Private repositories require a token to clone; public ones are anonymous. - Personal access tokens — issue with an expiry (30 days, 90, a year, or never), see
when each was last used, revoke, at
/{handle}/settings/tokens. - Browsing — file tree with a per-file last-commit column, file contents with
syntax highlighting, commit log, a commit and its highlighted diff, a three-dot
comparison of two revisions, blame, branches and tags, and the README rendered on the
repository page with
#12and bare shas linked to the issue and commit they name. - A file's own history at
/{handle}/repos/{name}/log/{rev}/-/{path}, which follows renames, so a file's past does not stop where its name changed. - Markdown files render as documents, with
?view=sourcefor the text; headings get ids, so a link tonotes.md#usagelands on the section it names. Submodule rows link to their upstream at the sha they are pinned to, and symlink rows say where they point. - Code search over a revision, at
/{handle}/repos/{name}/search. - Archive download —
zipandtar.gzof any revision, and of every tag. - Issues — open, comment, edit, close and reopen, with labels from a palette of eight colours, and filtering by label and state.
- Pull requests — branch to branch inside one repository, with a Conversation, the
commits and the changed files under their own tabs, the same labels the issues wear,
and a merge box that says whether the branches actually merge before it offers a
button. Merge as a merge commit, a fast-forward or a squash, optionally deleting the
source branch afterwards; a merge fires the same webhooks a push does, and
Closes #4in the title or body closes issue 4 and says so on it. - Webhooks — a signed JSON POST per push, with a delivery log you can page through, redeliver an attempt from, and switch a hook off in.
- Atom feeds — a repository's commits and its issues, and the owner's push activity across repositories, linked from the pages they belong to and autodiscovered.
- Every long list pages, with
?page=N, clamped to the nearest page that exists rather than refused. - A JSON API —
/api/me,/api/users/{handle},/api/users/{handle}/repos. Not a separate product; every use case gets a second surface where that makes sense, which is what keeps the use-case layer honest.
Writing (markdown posts), multi-user (members, invitations, registration) and SSH
transport are not built yet. The plan for them is in plans/ROADMAP.md.
Where it is going
An instance today has exactly one user. The owner half of owner and members has landed — the owner is a person or an organisation, chosen at setup — and members are next: the people it works with, with graded permissions. Outsiders will be able to register to file issues and comment, under strict rate limits and narrow scopes, so an instance can take bug reports without becoming a place anyone can do anything. An invisible mode will put a whole instance behind sign-in, so a business can run its Steid unreachable to anonymous visitors.
Requirements
- Linux, x86_64 or aarch64, with systemd. The releases are built against glibc 2.31, so Debian 11 and Ubuntu 20.04 or newer.
gitonPATH. Not optional: Steid runsgit init --bareto create a repository andgit http-backendto serve every clone and push. Oneapt-get install git. git 2.38 or newer to merge a pull request from the web — that is whengit merge-tree --write-treearrived, which is how a merge is computed without a working tree; everything else works on any git, and where it is older the merge box says so instead of offering a button. Debian 12 and Ubuntu 22.04 and newer are fine.- A TLS-terminating reverse proxy, and a domain name for it. Also not optional. Steid speaks plain HTTP — the web framework it is built on (Topcoat 0.5) has no TLS support at all: no rustls, no ACME, no HTTPS listener. And because git authenticates with HTTP Basic, an instance served over plain HTTP leaks your access token to every hop on the network, on every push. The installer sets Caddy up for you.
- About 100 MB of disk before any repositories, plus whatever you push.
Install
One command
|
Point the domain's DNS at the machine first, and make sure ports 80 and 443 are open — Caddy needs both to obtain a certificate.
Releases live at https://releases.steid.dev — the tarball for your architecture and
its SHA-256 under /v<version>/, and this script at the root. jpgill.dev mirrors the
same files at the path it has served since 0.4.0, so older links still work. Installing
from your own mirror is one variable: STEID_RELEASE_BASE_URL=https://… with the same
/v<version>/steid-<version>-<target>.tar.gz layout under it.
That does the following, and nothing else:
- installs
git,curlandca-certificates - downloads the release tarball for your architecture and verifies its SHA-256
- unpacks it to
/opt/steid— the binary with itsassets/directory beside it - creates a
steidsystem user and/var/lib/steidfor state, owned by it - writes
/etc/steid/steid.env, and a systemd unit that listens on127.0.0.1:3000 - installs Caddy and writes a Caddyfile that terminates TLS for your domain and proxies to that loopback port
- starts both
Re-run it with a newer --version to upgrade. It is idempotent: it replaces the binary
and assets, leaves /var/lib/steid alone, and will not overwrite /etc/steid/steid.env
once it exists — with one exception, --operator-token, which is the only setting a
later run rewrites and only when you pass it.
Options: --version, --port, --flavour musl|gnu (gnu is what is built),
--owner-email/--owner-handle/--owner-org/--owner-org-name (below),
--operator-token (see
Operator surface), and --no-caddy if you are bringing your own
proxy. sh install.sh --help lists them.
Scripted install: come up already owned
A fresh instance has no owner, and until someone claims it the setup page is open to whoever reaches it first. That is fine when you are watching the install; it is not fine when a machine builds itself at three in the morning. Give the installer an owner and there is no window at all:
It writes STEID_OWNER_EMAIL and STEID_OWNER_HANDLE into /etc/steid/steid.env, and
the first boot that finds the instance unclaimed creates that owner before serving a
single request. No setup token is printed, and /auth/setup is closed because there is
nothing left to claim.
Add --owner-org acme --owner-org-name "Acme Inc" and the same boot creates the
organisation, makes that owner its owner, and lands the root of the instance on
/acme — so a provisioned machine arrives as the company's Steid with no wizard at
all. Without them the root lands on the owner's own page, which is what a one-person
instance wants.
That owner has no password, because there was nobody to choose one: Steid hashes 32 random bytes it generates at boot and throws away, so every sign-in attempt is refused like any other wrong password. The way in is a one-time link minted on the machine:
Both flags or neither — half of an owner is a refusal from the installer, and from Steid
itself at startup, rather than an instance that quietly comes up unclaimed. A handle that
is reserved or malformed, or a bad email address, also stops the boot with one line
saying which. They are written only when /etc/steid/steid.env is first created, and
Steid ignores them once an owner exists, so they can stay in the file for the life of the
instance.
On piping a URL into a shell. It is a real trust decision, and "it's convenient" is not an answer to it. Download and read it first if you would rather:
Or do it by hand — the manual path below is the same steps, written out.
Manually
Every command as root, on Debian or Ubuntu. Adjust paths and package manager to taste;
nothing here is specific to a distribution except apt-get.
# 1. Prerequisites. git is mandatory — Steid shells out to it for everything.
# 2. Fetch and verify the release for your architecture.
VERSION=0.8.1
TARGET=x86_64-unknown-linux-gnu # or aarch64-unknown-linux-gnu
BASE=https://releases.steid.dev
# 3. Install. `assets/` MUST end up beside the binary: at startup Steid walks up
# from its own executable looking for `assets/manifest.toml`, and exits if it
# is not there. Moving the binary on its own gives you a program that will not
# boot.
# 4. A user to run as, and one directory for all state.
# 5. Configuration.
# 6. The service. deploy/steid.service in this repo is the file to copy.
# 7. The proxy. deploy/Caddyfile is a working starting point — change the
# hostname on its first line to yours.
There is no migration step. Steid runs its migrations itself on every boot.
First run: claiming the instance
A fresh instance has no owner. On startup it prints a setup token to its log:
This steid has no owner yet. Claim it at /auth/setup with:
<token>
Two things about that token that will bite you otherwise:
- It is printed only while the instance is unclaimed. Once you have claimed it, it is never shown again — because it no longer exists.
- It lives in memory only. Every restart mints a new one, and the one in an older log line is dead.
So read it from the current run's journal:
|
Then open https://git.example.com/auth/setup, paste it in, and choose your handle and
password. After that, /auth/login.
Passwords must be at least 12 characters. That is the only rule — no required digit or symbol, because length is the part that measurably helps and composition rules mostly make people write theirs down. The same rule applies to a password reset and to changing one in settings; accounts created before it keep working until their owner changes them.
Or have no claim at all
An unattended install can skip this section entirely: install.sh --owner-email … --owner-handle … creates the owner at first boot, so there is no token, no setup page
and no window. See Scripted install.
Or set the token yourself
If reading a log line during the first minute of a scripted install is awkward, set the token instead and skip the race:
STEID_SETUP_TOKEN=
It is only consulted while the instance is unclaimed, it is never printed, and Steid
refuses to start if it is weak — at least 32 characters, no whitespace, and at least
eight distinct characters, so abababab… is rejected rather than accepted.
Using it
- Create a repository at
/{handle}/repos/new. Public or private. - Issue a personal access token at
/{handle}/settings/tokens. It is shown once. - Push:
Git will ask for a username and password. The token goes in the password field; the username is ignored (a token pasted as the username with an empty password also works, because people do that).
You only type it once. Git's credential helper stores it and answers every later push — which is the whole reason pushing to GitHub feels like it needs no credentials. Use the one that keeps secrets in your operating system's keystore:
Not credential.helper store. It writes the token in clear text to
~/.git-credentials, and a token is a password that never expires. Steid keeps only a
hash of it precisely so that a stolen database contains nothing anyone can present;
storing the plaintext on your laptop hands back what that was protecting.
Do not put the token in the remote URL (https://user:token@host/...) either. It
goes into .git/config in clear text and shows up in git remote -v, in shell history,
and in any log that records the URL.
Cloning a public repository needs no credentials at all.
Configuration
Environment variables, read from /etc/steid/steid.env by the systemd unit.
| Variable | Default | What it is |
|---|---|---|
STEID_DATABASE_URL | sqlite:steid.db?mode=rwc | SQLite connection string. The directory must be writable, not just the file — SQLite writes -wal and -shm siblings. |
STEID_DATA_DIR | ./data | Where bare repositories live, as {data_dir}/{handle}/{name}.git. |
STEID_INSECURE_COOKIES | unset (false) | Never set this in production. It strips Secure from the session cookie so it survives plain-HTTP localhost, and exists only for local development. |
HOST | 127.0.0.1 in the shipped unit | Bind address. Read by the framework, so deliberately not STEID_-prefixed. Keep it on loopback; the proxy is the way in. |
PORT | 3000 | Likewise not STEID_-prefixed. |
STEID_TRUSTED_PROXY | unset (false) | Whether to believe X-Forwarded-For / X-Real-IP when telling one rate-limited caller from another. install.sh sets it true, because that install puts Caddy in front. Leave it off for anything serving Steid straight to the internet — see Operator surface. |
STEID_OPERATOR_TOKEN | unset | A bearer token for the operator surface. Unset means that surface does not exist. |
STEID_OWNER_EMAIL | unset | With STEID_OWNER_HANDLE, the owner to create at first boot — see Scripted install. Set one without the other and Steid refuses to start. |
STEID_OWNER_HANDLE | unset | The handle for that owner. Reserved or malformed, and Steid refuses to start rather than serving unclaimed. |
Restart after editing: systemctl restart steid.
Operator surface
Two JSON routes for driving an instance without a browser — a control plane provisioning
a machine, a monitoring poll, a scripted install. No session, no cookie, no HTML.
Authenticated by STEID_OPERATOR_TOKEN as a bearer token, compared in constant time.
With no token configured the surface does not exist: those calls answer as if
unauthenticated, and nothing advertises that a token could be set.
Set it at install time so the instance never serves with the surface off:
The installer writes it into /etc/steid/steid.env before Steid is started, and never
prints it. This is the one line a later run will rewrite — pass the flag again to rotate
the token; omit it and the existing line is left alone like every other setting in that
file. Editing the line by hand works just as well; restart afterwards.
GET /api/instance
Unauthenticated, it answers the one fact that is safe to tell anybody — and the one a provisioner needs, so it can wait for a machine to finish booting before handing its owner a claim link:
}
With the operator token it adds what the machine is and how big it has become:
}}
A wrong or missing token is not an error — it is the public answer. git_version is
absent where git could not be run at all, which is the same case that leaves
merge_supported false.
disk is the data directory walked — everything under it, whatever it is — plus the
total and the free space of the filesystem it sits on, so "12 GB of 20 used" is
arithmetic rather than a second call. Free is what is free to the steid user, not
counting the reserve a filesystem keeps for root. The walk is cached for a minute, so
polling this every few seconds costs one walk a minute; the whole group is absent where
the directory could not be read, rather than reported as zero. It is never on the
unauthenticated answer, which stays {"claimed": …} and nothing else.
The unauthenticated form is rate limited to 60 calls a minute per caller (600 across everyone), which is about one poll a second. The authenticated form is not: a caller holding the token has already proved it is the control plane.
POST /api/setup
The claim form, headless. Same rules as the page at /auth/setup: the setup token is
checked before anything is written, a claimed instance cannot be claimed again, and the
password must be at least 12 characters.
}
201 on success, and no session — a control plane is not signing in, so sign in through
the browser afterwards like anyone else. A password short of the minimum is refused like
everything else here — the same opaque 404, with the reason in the server log — because
a response that named the password would tell a stranger guessing tokens that they had
guessed one. Every failure is the same 404 with the same
body, whether the token was wrong or the instance was already claimed: telling those two
apart would say whether there is still something worth guessing. It shares the sign-in
rate limit — 10 attempts a minute per caller, 60 across everyone — because it is the same
secret being attacked.
Pair it with STEID_SETUP_TOKEN (see Or set the token yourself)
so the whole install is scriptable: the token goes into the environment, the machine boots,
GET /api/instance says {"claimed":false}, and one POST claims it.
STEID_TRUSTED_PROXY
The rate limiters have to tell one caller from another, and the web framework Steid is
built on (Topcoat 0.5) discards the peer address when it accepts a connection — a handler
sees request headers and nothing else. So the only thing available is
X-Forwarded-For.
Behind a proxy that is sound: the proxy appends the address it accepted the connection from, so the rightmost entry is the one the client cannot forge. Exposed directly, nothing appends anything, and a caller can invent a fresh header per request to buy itself a fresh budget every time.
STEID_TRUSTED_PROXY says which situation you are in, and defaults to the safe answer.
Left off, no header is read at all and every caller shares one window — a forged header
buys nothing, at the cost of one flood exhausting the shared budget for a minute. Turn it
on only when something in front of Steid is appending the header; install.sh does,
because it installs Caddy.
Backup and restore
The entire backup surface is two paths:
/var/lib/steid/steid.db— the SQLite database (users, repositories, tokens, sessions)/var/lib/steid/repos— the bare git repositories
Which is to say: back up /var/lib/steid. rsync is enough.
Stopping first is the honest version: SQLite in WAL mode leaves -wal and -shm files,
and copying them while a write is in flight can capture a torn state. If you would rather
not stop the service, snapshot the database properly and copy the repositories live —
they are only written during a push:
To restore: install Steid as above, stop it, drop both paths back into /var/lib/steid,
chown -R steid:steid /var/lib/steid, start it. Migrations run on boot, so a database
from an older version is brought forward automatically.
steid backup and steid restore
Steid can also do both itself, into one file:
The archive holds a manifest, a consistent copy of the database (SQLite's own
VACUUM INTO, so the service may keep running) and the whole data directory. install.sh --backups daily runs the first of these on a timer.
steid restore refuses an instance that already holds a user or a repository, so
pointing it at the wrong machine cannot replace somebody's site with somebody else's.
That refusal is the default and is not going away.
--replace is the explicit consent to do it anyway: it replaces everything this instance
holds — database and data directory — with the archive's, whoever is in it. Stop Steid
first; nothing checks, because the data directory is being moved out from under a
process that serves out of it.
Nothing is deleted. The archive is extracted beside the live tree and swapped in only
once the whole extraction has succeeded, and what was there is moved to
/var/lib/steid/repos/.replaced-<timestamp>/ — repositories and a copy of the old
database together. It is as large as the instance was and nothing will ever remove
it; the restore prints the path, and deleting it once you have checked the restore is
yours to do.
Building from source
cargo build --release on its own is not enough. It produces a binary that will not
boot: AssetBundle::load() walks up from the executable looking for
assets/manifest.toml, and build.rs does not write one. topcoat asset bundle runs
cargo build itself and then writes the bundle to target/assets. The binary at
target/release/steid needs that directory beside it.
Requires rustc ≥ 1.95 — Topcoat 0.5 demands it, and on an older toolchain cargo add topcoat silently resolves to an empty v0.0.0 placeholder instead of failing.
For development, topcoat dev does the bundling for you, and a local .env with
STEID_INSECURE_COOKIES=true is needed for the session cookie to survive plain-HTTP
localhost.
Cutting a release
Produces dist/steid-<version>-<target>.tar.gz and a .sha256 beside it. The tarball
extracts to a self-contained directory: the binary, assets/, and this README. Building
a Linux artefact on macOS needs a container (the script uses Docker) or a cross
toolchain; --native builds for the host instead, which is useful for checking the
artefact layout and not for releasing.
A container image also exists — see Dockerfile — but the supported
artefact is the plain binary.
Current limitations
Deliberately blunt. Steid is early.
- Single user. One account, claimed on first run. No members, roles, invitations or registration yet. Issues exist, but only the owner may open or comment on one, which is the same assumption showing.
- No TLS of its own. A reverse proxy is mandatory, not recommended — see requirements.
- No encryption at rest. The database and repositories are plain files. Anyone with the disk has everything. Token values are hashed, and passwords are Argon2, but repository contents are not encrypted.
- Rate limiting covers
/auth/login,/auth/setup, token authentication on the git routes, archive downloads and code search — 10 attempts a minute per client for the first two, 60 for git authentication, 10 archives and 20 searches, each with a global backstop. An anonymous clone of a public repository is not limited at all. - Rate limiting keys on forwarded headers, because Topcoat 0.5 does not expose the peer address at all. Behind a reverse proxy — the supported deployment — that works. Exposed directly to the internet with no proxy, a caller can vary the header and get a fresh budget each time, leaving only the global cap. Run it behind the proxy.
- Nothing sweeps expired tokens and nothing warns before one expires. A token that has expired authenticates exactly like one that never existed, and the tokens page is where you find out.
- No CI/CD, no code review, no SSH transport, no federation. Pull requests exist but are bare: no assignees, reviewers or milestones, and only the owner may open or merge one — the single-user assumption again.
- No writing yet — posts and markdown are the next milestone.
- Light mode is half-checked. The repository landing page, a tree and a blob were looked at and were fine; the owner's home page, the settings pages and the log were not. Either way there is no way for a visitor to choose — the layout is hardcoded dark.
- Not battle-tested. It has not run under load, has not been audited, and has been deployed by approximately one person. Do not put anything irreplaceable in it that is not also somewhere else.
More, in unflattering detail, in plans/current.md.
Project layout
plans/ is the source of truth for intent, not the code:
| File | Holds |
|---|---|
plans/ROADMAP.md | vision, stack, the milestone ladder |
plans/current.md | the active milestone, and every known gap |
plans/progress.md | what shipped, and the decisions worth not rediscovering |
plans/architecture.md | layer rules and conventions |
plans/decisions/ | ADRs |
The code is a single crate in three layers — domain, application, infrastructure —
with dependencies pointing inward. Every use case takes an Actor and authorizes before
any side effect.
Licence
Copyright (C) 2026 James Gill.
Steid is free software under the GNU Affero General Public License v3.0 — see LICENSE. You may use, modify and redistribute it, including commercially.
The reason for AGPL rather than a permissive licence is section 13: if you modify Steid and offer it to others over a network, you must make your modified source available to those users. Running an unmodified copy — which is what self-hosting is — carries no such obligation. In other words: host it for yourself freely, fork it privately for yourself freely, but a modified public service has to share what it changed.
Worth being straightforward about what this does not do: it does not stop anyone running Steid as a commercial hosted service. AGPL is a copyleft licence, not a non-compete.