1. Smart HTTP Git service
- Repos live at
/<npub>/<identifier>.git
- No user auth – pushes are validated against state announced on Nostr.
- CORS origin
*
allows web app access.
A complete, self-hostable data solution for Nostr Git repositories.
Protocols > Platforms
Git began with email for collaboration. Over time, centralised platforms dominated. Nostr lets us bring software collaboration back to open protocols. Git Via Nostr connects Git and Nostr as simply as possible via NIP-34.
A single endpoint that bundles three services:
/<npub>/<identifier>.git
*
allows web app access.This trio stores everything required for Git Via Nostr while remaining narrow in scope. It's stuck together with docker and nginx.
Users have high expectations of Git servers. GitHub is performant, reliable, and has near 100% uptime. A self-hosted Git server can't achieve that level of performance.
We can add resilience, reliability, and uptime by treating Git servers like Nostr relays if we pull and push from multiple instances simultaneously. This way, users can achieve comparable reliability and uptime, even if some of the instances they use are occasionally down or misbehaving.
This approach prevents us from centralizing around a few performant Git servers and also allows maintainers to change Git servers without requiring their users to make any configuration changes.
To make this vision a reality, we need to encourage contributors and users to clone using the `nostr://` URL with the ngit plugin installed, rather than the `https://` URL of a single ngit-relay instance.
DEPLOYMENT.md
in git repo).git init
echo project > README.md
git add .
git commit -m "initial commit"
curl -Ls https://ngit.dev/install.sh | bash
ngit init
and follow prompts – it will:
nostr://
remote and push for you.Subsequent git push
operations broadcast to every server listed in the announcement.
Repos are cloned via nostr://
for resilience and decentralisation.
Add auth-to-read using NIP-42 plus a whitelist and run behind a firewall. For truly sensitive work, combine with protected-event support (NIP-70).
High availability comes from pushing & pulling across many relays simultaneously, giving GitHub-level uptime without centralisation.
So tools can be built on top of it for a silky smooth Git via Nostr experience.
More details in README.md
in git
repo
long-form nostr article Vision for #GitViaNostr by DanConwayDev