Where Does Sourcehut Store Config and Data?
Each Sourcehut service reads config.ini from /etc/sr.ht with code in Postgres. One file per service, one database each.
Last updated
Sourcehut splits per service: meta, git, hub, todo, lists, man, builds, and more each read their own config.ini from /etc/sr.ht/ (example files ship per repo, heavily commented). Each service owns a Postgres database plus Redis and mail plumbing. Repos live on disk under the git service; mailing content in lists; build artifacts wherever configured.
Self-hosting is famously hands-on: packages exist (Alpine first-class), but wiring OAuth between services, admin creation, and per-service databases stays manual. Config examples must be read end to end, not skimmed. Back every ini plus every database; the forge degrades service by service when halves go missing, which makes partial restores uniquely confusing.
Where Sourcehut stores this, by platform
/etc/sr.ht/config.ini (per service)
One INI per service (meta, git, todo, lists, builds...). Read examples fully; fields differ per service. OAuth wiring between services is manual; admin bootstrap first.
Frequently asked questions
how do i back up sourcehut
Copy every service config.ini plus each Postgres database dump with services stopped. Repos, tickets, lists, and builds span per-service databases; keys and domains in the inis. Restore all of them; partial restores split the forge.
which sourcehut service do i set up first
Start with meta.sr.ht (accounts), then wire git/todo/lists against it with OAuth tokens. The NixOS module and Alpine packages script parts of this, but admin user plus token bootstrapping stays manual. Services fail to build without it, which is the classic first-install wall.
Notice an outdated path? Let us know.