https://git.nostrdev.com/stuff/cloudron-ngit/raw/branch/main/CloudronVersions.json
Description
ngit (GRASP)
Runs ngit-grasp, a GRASP server: a Nostr relay and an authorised Git smart-HTTP server in one process, sharing one port. Repositories are announced by signed Nostr events (NIP-34), so the repository identity lives in keys rather than in this server's database.
This package also runs the ngit-ci coordinator and its credential-free discovery worker in the same container. The coordinator is disabled by default; it stays off until you set NGIT_CI_REPOS in the app's Environment Variables and restart the app.
What works out of the box:
git clone/git pushover HTTPS at this app's domain, authorised by signed repository state.- A Nostr relay at the same domain, WebSocket (
wss) on the app's origin. - NIP-11 relay information, landing pages, and Prometheus metrics on the same port.
What this package deliberately does not include:
- A CI compute provider. Cloudron apps get no Docker socket and no
/dev/kvm, so the provider that actually runs jobs must live on another machine (NixOS with KVM, a Linux VM with Docker, or an Apple Silicon Mac). The coordinator here is the control plane only: it watches repositories, matches jobs to providers, and publishes results. - A Blossom server. Providers need a Blossom destination for logs and artifacts. Point
NGIT_CI_BLOSSOM_SERVERSat one you trust, or run one separately.
Security posture
- The app's domain is reachable from the public internet. That is required: git clients and Nostr clients cannot pass a Cloudron login. Do not enable Cloudron Access Control or VPN protection for this app.
- An open GRASP service accepts repositories from anyone who announces them. Set
NGIT_REPOSITORY_WHITELISTto the npubs you serve, or the box will host strangers' repositories and fill its disk. - Two identity keys are generated on first start, both under
/app/data:.relay-owner.nsec(the relay) and.coordinator.nsec(CI). They are in every backup. If your backup site is not encrypted, anyone who reads a backup can impersonate both. - No secret is ever passed through the environment or a command line: both keys are generated as files with owner-only permissions.
Backups and the stop budget
/app/data holds the git object stores, the relay's LMDB, and the CI coordinator's state. Cloudron snapshots it while the app is running, and kills the container 10 seconds after SIGTERM. ngit-grasp's own operator contract asks for up to 300 seconds of shutdown time on other platforms; on Cloudron the shutdown is therefore bounded by the platform, not by the app. The failure mode is documented and bounded rather than silent corruption: upstream states that a checkpoint interrupted by a kill leaves the previous complete checkpoint valid, and that up to one checkpoint interval (60 seconds) of bookkeeping can be lost.
After any restore, or after an unclean stop, run the stored-event integrity check before serving:
cloudron exec --app <location> -- /usr/local/bin/gosu cloudron /app/code/ngit-grasp event-integrity-check --relay-data-path /app/data/grasp/relay --git-data-path /app/data/grasp/git
Use the rsync backup format for this app so unchanged pack files are not re-uploaded on every backup.
Operator diagnostics
The app ships one read-only report that answers "why is this not working":
cloudron exec --app <location> -- /app/pkg/diagnostics.sh
Recent Changes
Fixed
Install on a real box: the app pulled, created its container and then crash-looped
with
install: cannot create directory '/app/data': Read-only file system./app/dataexists only when the manifest requests thelocalstorageaddon(
docs/packaging/cheat-sheet.md), and 1.0.0 requested none - `setupAddons:Setting up []` in the box log. Every local test supplied the mount itself
(
docker run -v, or the sandbox rewritingAPP_DATA), so none of them couldreproduce it. The addon is now requested, and
start.shfails with a messagenaming the addon if the mount is missing again, instead of a bare
installerror.The manifest description still told operators to run the integrity check and
diagnostics with
sudo -u cloudron; both now match the three-account layoutand the root-by-default
cloudron exec.Added
The static gate fails a manifest that writes to
/app/datawithout thelocalstorageaddon, and fails if the publishedCloudronVersions.jsonentrylacks it (the dashboard installs from the entry, not from the repository's
manifest).
