githttp-fs
githttp-fs is a single Rust binary that wraps git repositories and exposes them as a file-system-over-HTTP API. Each tenant gets its own git repository on disk.
Clients can create, read, update, delete, and move eg. .md/.mdx files via REST — which is the initial usecase githttp-fs was written for — and optionally pin the presentation order of any directory's entries. Every write produces a Git commit. A configurable webhook fires after each commit so downstream systems (e.g. a read-only SQL database) can update themselves.
Tested at Rust version: rustc 1.94.0 (4a4ef493e 2026-03-02)
🇵🇹 Crafted in Lisbon, Portugal.
How to use it?
Installation
Install from Docker Hub:
You might find it convenient to run githttp-fs via Docker. You can find the pre-built githttp-fs image on Docker Hub as crispim/githttp-fs.
First, pull the crispim/githttp-fs image:
Then, provide a configuration file and run it (replace /path/to/your/githttp-fs/config.toml with the path to your configuration file):
In the configuration file, ensure that:
server.hostis set to0.0.0.0(this lets githttp-fs be reached from outside the container)server.portis set to5355(this lets githttp-fs be reached from outside the container)
githttp-fs will be reachable from http://localhost:5355.
Install from packages:
githttp-fs provides pre-built packages for Debian-based systems (Debian, Ubuntu, etc.).
Important: githttp-fs only provides 64 bits packages targeting Debian 11 & 12 for now (codenames: bullseye & bookworm). You will still be able to use them on other Debian versions, as well as Ubuntu.
First, add the githttp-fs APT repository (eg. for Debian bookworm):
|
Then, install the githttp-fs package:
Then, edit the pre-filled githttp-fs configuration file:
Finally, restart githttp-fs:
service githttp-fs restart
Install from binary:
A pre-built binary of githttp-fs is shared in the releases on GitHub. You can simply download the latest binary version from the releases page, and run it on your server.
You will still need to provide the binary with the configuration file, so make sure you have a githttp-fs config.toml file ready somewhere.
The binary provided is statically-linked, which means that it will be able to run on any Linux-based system. Still, it will not work on MacOS or Windows machines.
Install from Cargo:
If you prefer managing githttp-fs via Rust's Cargo, install it directly via cargo install:
Ensure that your $PATH is properly configured to source the Crates binaries, and then run githttp-fs using the githttp-fs command.
Install from source:
The last option is to pull the source code from Git and compile githttp-fs via cargo:
You can find the built binaries in the ./target/release directory.
Configuration
Use the sample config.toml configuration file and adjust it to your own environment. It describes a standalone node; config.master.toml and config.replica.toml show the two sides of a replicated set.
Available configuration options are commented below, with allowed values:
[server]
host(type: string, allowed: IPv4 / IPv6, default:0.0.0.0) — Host the githttp-fs server should listen onport(type: string, allowed: TCP ports, default:5355) — Port the githttp-fs server should listen onapi_key(type: string, allowed: any string, no default) — API key for the githttp-fs HTTP APIrepos_path(type: string, allowed: UNIX path, no default) — Path to all Git repositories (all tenants are stored in this path)log_level(type: string, allowed:debug,info,warn,error, default:info) — Verbosity of logging, set it toerrorin productioncheckout_files(type: boolean, allowed:true,false, default:true) — Whether each tenant's files are kept on the working tree, so a human canlsa repository; nothing githttp-fs serves reads them, so turning this off saves the uncompressed size of all content (see Considerations)checkout_files_autoheal(type: boolean, allowed:true,false, default:false) — Whether startup checks every tenant out to its HEAD, healing files that are missing or stale on disk; opt-in because it walks the whole store and removes files HEAD no longer names, so enable it for one restart after turningcheckout_filesonallowed_extensions(type: array[string], allowed: file extensions eg.["md", "mdx"], default: none) — Optional whitelist of file extensions accepted for file writes and move destinations; when unset, all extensions are accepted
[hooks]
url(type: string, allowed: URL, default: no default) — URL of the hook receiver, eg. HTTP URL (if any)events(type: array[string], allowed:file.created,file.updated,file.deleted,file.moved,order.updatedororder.deleted, Default: no default) — List of events to send hooks for (theorder.*events cover changes to a directory's file order index)retry_attempts(type: number, allowed: any number, Default: no default) — Number of re-delivery attempts to run for a Web Hook that failed deliveryretry_backoff_ms(type: number, allowed: time in milliseconds, Default: no default) — How long to back-off between re-delivery attempts
[hooks.auth]
header(type: string, allowed: any HTTP header name, default: no default) — Authorization header name, as sent to the hook receiver (if any)value(type: string, allowed: any HTTP header value, default: no default) — Authorization header value, as sent to the hook receiver (if any)
[replication]
role(type: string, allowed:master,replica, no default) — Whether this node serves replicas or follows a mastersecret(type: string, allowed: any string, no default) — Guards the replication server, and is sent by a replica to its master. Calledsecretrather thanapi_keybecause no caller of the product's API ever holds it — it authenticates githttp-fs to githttp-fshost(type: string, allowed: IPv4 / IPv6, default:server.host) — Address the replication server binds; set it to127.0.0.1or a private interface to narrow reach furtherport(type: string, allowed: TCP ports, default:5356) — Port the replication server binds; must differ fromserver.portnode_id(type: string, allowed: up to 64 characters ofA-Z,a-z,0-9,.,_,-,:and IPv6 brackets, no default) — How this node names itself to its peers: its row in the master's roster and its name in every log line. Required, and unique per deployment — a master refuses a second notification stream claiming a node id that is already connected from another process (409), since two replicas sharing a row would hide each other from an operator. It is telemetry, not authentication (secretis what guards the surface)master_url(type: string, allowed: URL, no default) — Base URL of the master's replication server (its[replication] host/port), not its content API — Base URL of the master to follow; required whenroleisreplica, and rejected when it ismasterpoll_interval_secs(type: number, allowed: seconds, default:60) — How often a replica compares its whole repository set against the master's; this is what bounds how stale a replica can get, since change notifications are only a latency hintparallelism(type: number, allowed: any number, default:4) — How many repositories a replica pulls concurrently while catching upreconnect_backoff_ms(type: number, allowed: time in milliseconds, default:1000) — Base delay before a replica re-dials a dropped notification stream; doubles up to a minutedeletion_guard(type: boolean, allowed:true,false, default:true) — The mass-deletion guard: while on, a replica refuses a master listing that would delete more than half of the repositories it holds, keeps every local copy, and reports adeletion_refusedissue instead. Nothing clears a refused deletion on its own, since a restarted replica still holds what it held; to accept one on purpose, set this tofalsefor a single restart, then turn it back on
[maintenance]
enabled(type: boolean, allowed:true,false, default:true) — Whether to run background repository maintenance (repacks Git objects into a single packfile and expires reflogs, so long-lived repositories stay fast and compact)delay_secs(type: number, allowed: seconds, default:86400) — How long after the first write to a repository its maintenance pass should run; the timer re-arms on the next write after each pass, and repositories that receive no writes are never maintaineddestructive_prune(type: boolean, allowed:true,false, default:false) — Whether the maintenance repack may permanently drop unreachable Git objects (garbage left behind by interrupted writes); commit history and past file versions are never affected either way, but with the defaultfalsemaintenance retains every object and can never destroy datamaximum_packs(type: number, allowed:2or more, no default) — Opt-in pack-count trigger: when a repository holds at least this many packfiles, its maintenance pass runs immediately on the next write (or replicated pack apply) instead of afterdelay_secs. Meant for replicas, where every replicated delta arrives as one more pack and object lookups slow down with each; a master's writes land as loose objects, so on a master it rarely fires. Unset means the timer alone decides
Read more
- CONSIDERATIONS.md — how read-only replicas behave, why two health routes are public, and the one file githttp-fs reserves inside a tenant repository
- REPLICATION.md — the replication peer protocol: wire formats, reconciliation, safety guarantees, failure handling, and the promotion runbook
:fire: Report A Vulnerability
If you find a vulnerability in githttp-fs, you are more than welcome to report it directly to @crisp-oss by sending an encrypted email to security@crisp.chat. Do not report vulnerabilities in public GitHub issues, as they may be exploited by malicious people to target production servers running an unpatched githttp-fs server.
:warning: You must encrypt your email using @crisp-oss GPG public key available at: Vulnerability Disclosures.