EDGE Signal 382
Git server demo runs on Cloudflare Durable Objects with per-repo SQLite storage
dgit implements a Git forge as Durable Objects, storing each repository in a private SQLite database with no origin server or filesystem dependency
Engineers can now deploy a lightweight Git server on Cloudflare Workers or self-hosted celld, eliminating the need for a central filesystem or GitHub in the critical path. The design ensures isolation between repositories, preventing one hot repo from impacting others, while maintaining compatibility with standard Git clients.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
Each repository is a Durable Object with its own SQLite database, speaking the Git smart HTTP protocol
Pushes stream directly into the repository’s cell, preserving client compression without re-deriving it
Self-hosting on celld removes Cloudflare’s request bounds, allowing larger histories and disposable nodes
THE READ
What the cluster adds up to.
dgit reimagines Git hosting by treating each repository as a Durable Object, a small, isolated server with its own SQLite database. This architecture removes the need for a central filesystem or origin server, which are typical bottlenecks in traditional Git forges. The design ensures that repositories are sharded by construction, meaning a high-traffic repository cannot degrade performance for others. This isolation is particularly useful for edge deployments where resource contention is a concern.
The implementation preserves the efficiency of Git’s wire protocol. Pushes stream directly into the repository’s cell, storing the packfile as sent by the client and maintaining the original compression. Clones and fetches work incrementally, downloading only missing objects, which aligns with how standard Git servers operate. However, Cloudflare Workers impose a 128MB memory limit and a five-minute CPU bound, so very large histories must be pushed in smaller chunks. Self-hosting on celld removes these limits, making it viable for repositories with millions of objects.
Compatibility with standard Git clients is a key feature. dgit supports shallow clones, thin packs, side-band progress, forced updates, and ref deletion, ensuring that existing workflows remain unchanged. The web interface mimics cgit, providing familiar features like syntax highlighting, blame, and format-patch output. Authentication is minimal but effective: reads are public, while pushes require a token. Private repositories gate all reads behind the same token, simplifying access control.
Deployment is straightforward for both Cloudflare Workers and self-hosted celld. For Workers, a single `wrangler deploy` command sets up the server, with a secret token for push authentication. Self-hosting requires configuring a bucket for SQLite replication, allowing nodes to be disposable while ensuring bit-identical recovery. The system includes built-in garbage collection, triggered automatically after forced updates or ref deletions, or manually via an API call. This reduces operational overhead for maintaining repository health.
The project’s design choices reflect a focus on simplicity and edge compatibility. By avoiding dependencies beyond zlib compression, dgit minimizes its footprint while maintaining full Git protocol support. The lack of an origin server or filesystem dependency makes it uniquely suited for edge environments, where traditional Git forges would struggle. However, the reliance on Durable Objects and SQLite means it may not scale horizontally in the same way as distributed systems like GitHub, limiting its use cases to smaller or isolated deployments.
Written by elseif from the cluster below · checked for specifics the sources never containedTHE CLUSTER