Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Introduction
rgit describes itself as a "modern gitweb/cgit-style interface", and the project description reads "blazingly fast web frontend for git repositories". It is written in Rust and built on Axum (web framework), gitoxide (a pure-Rust Git implementation), Askama (template engine) and RocksDB (metadata storage), and it comes with a dark mode. An official live demo is available: git.inept.dev.
Key Features
- Efficient metadata storage: All repository metadata (commits, branches, tags) is stored in RocksDB and re-indexed at a configurable interval, every 5 minutes by default. The project claims load times for large repositories can be reduced by up to 97%.
- On-demand loading: Files, trees and diffs are read directly through gitoxide only when requested. A small in-memory cache holds rendered READMEs and diffs.
- Dark mode: Suitable for night-time use.
- Recursive indexing: Automatically scans all bare repositories under a specified directory recursively.
- HTTPS cloning: Repositories can be cloned over HTTPS when a
git-daemon-export-okfile is present in the repository. - gitweb-compatible configuration: The repository description is stored in the bare repository's
descriptionfile; the repository owner is set via theownerentry in the[gitweb]section of theconfigfile.
Target Users and Use Cases
It suits individual developers, small teams and operations staff who want to self-host a lightweight Git browsing interface, especially those who want to replace traditional solutions such as cgit or gitweb but don't need a full code collaboration platform like Gitea or GitLab (issues, PRs, permission management, etc.).
Installation and Deployment
Prerequisites: You need the Rust toolchain and Cargo. rgit only supports bare Git repositories, so prepare bare repositories beforehand.
Install with Cargo:
cargo install --git https://github.com/w4/rgit
Build from source:
git clone https://github.com/w4/rgit.git
cd rgit
cargo build --release
Run:
rgit [::]:3333 /path/to/my-bare-repos -d /tmp/rgit-cache.db
Generating the database is fast, so you can put it on temporary storage.
Docker:
docker run --mount type=bind,source=/path/to/my-bare-repos,target=/git \
--user $UID:$GID \
-it ghcr.io/w4/rgit:main
The project also provides an example docker-compose.yml and an override file. In Compose, you can set the automatic refresh interval with the environment variable REFRESH_INTERVAL (for example 5m).
NixOS: Import rgit.nixosModules.default in your flake.nix, then configure bindAddress, dbStorePath and repositoryStorePath via services.rgit.
Notes
- The user running rgit (or the UID/GID of the Docker container) must match the owner of the repository directory, otherwise you will get an "is not owned by the current user" error.
- Empty repositories that have just been initialized and have no commits won't appear in the list. Run
git pack-refs --allinside the repository, or push a commit that contains files, and it will show up. - If you see "Repository not exported" when cloning over HTTPS, create a
git-daemon-export-okfile in the bare repository.
License
Licensed under the WTFPL, which imposes very few restrictions. Patches are welcome via GitHub or git-send-email.
Discover more
Hook0
Webhooks-as-a-service (WaaS) that makes it easy for online products to provide webhooks. Dispatch up to 3,000 events/month with 7 days of history retention for free.
Svix
Open-source webhooks as a service that makes it super easy for API providers to send webhooks.
Aastro
Extensible API Gateway written in Go. Load custom plugins to extend functionality.
Accent
Developer-oriented translation tool.
Atheos
Web-based IDE framework with a small footprint and minimal requirements, continued from Codiad.
Bencher
Suite of continuous benchmarking tools designed to catch performance regressions in CI.