Community Apps

ngit (GRASP)

By NostrDev

Nostr-native git hosting with an optional CI coordinator

3.1.1-0.2.2 1024MB Updated 1 Dec 2026
git nostr development
Install this app
In your Cloudron dashboard, open the App Store, choose "Community apps" and paste this URL:
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 push over 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_SERVERS at 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_WHITELIST to 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
Screenshot

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/data exists only when the manifest requests the localstorage addon

  • (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 rewriting APP_DATA), so none of them could

  • reproduce it. The addon is now requested, and start.sh fails with a message

  • naming the addon if the mount is missing again, instead of a bare install error.

  • The manifest description still told operators to run the integrity check and

  • diagnostics with sudo -u cloudron; both now match the three-account layout

  • and the root-by-default cloudron exec.

  • Added

  • The static gate fails a manifest that writes to /app/data without the

  • localstorage addon, and fails if the published CloudronVersions.json entry

  • lacks it (the dashboard installs from the entry, not from the repository's

  • manifest).