githttp-fs 1.15.0

A git-backed content management database served over HTTP
githttp-fs-1.15.0 is not a library.

githttp-fs

Test and Build Build and Release dependency status

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:

docker pull crispim/githttp-fs:v1.15.0

Then, provide a configuration file and run it (replace /path/to/your/githttp-fs/config.toml with the path to your configuration file):

docker run -p 5355:5355 -v /path/to/your/githttp-fs/config.toml:/etc/githttp-fs.cfg crispim/githttp-fs:v1.15.0

In the configuration file, ensure that:

  • server.host is set to 0.0.0.0 (this lets githttp-fs be reached from outside the container)
  • server.port is set to 5355 (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):

echo "deb [signed-by=/usr/share/keyrings/crisp-im_githttp-fs.gpg] https://packagecloud.io/crisp-im/githttp-fs/debian/ bookworm main" > /etc/apt/sources.list.d/crisp-im_githttp-fs.list
curl -fsSL https://packagecloud.io/crisp-im/githttp-fs/gpgkey | gpg --dearmor -o /usr/share/keyrings/crisp-im_githttp-fs.gpg
apt-get update

Then, install the githttp-fs package:

apt-get install githttp-fs

Then, edit the pre-filled githttp-fs configuration file:

nano /etc/githttp-fs.toml

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:

cargo install githttp-fs

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:

cargo build --release

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 on
  • port (type: string, allowed: TCP ports, default: 5355) — Port the githttp-fs server should listen on
  • api_key (type: string, allowed: any string, no default) — API key for the githttp-fs HTTP API
  • repos_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 to error in production
  • checkout_files (type: boolean, allowed: true, false, default: true) — Whether each tenant's files are kept on the working tree, so a human can ls a 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 turning checkout_files on

[limits]

  • allowed_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
  • batch_read_maximum_files (type: integer, allowed: any number above zero, default: 100) — Maximum number of files one batch read request may ask for; larger requests are rejected
  • date_filter_maximum_ms (type: integer, allowed: any number, default: 10000) — Safety timer, in milliseconds, on the commit-history walk a date-filtered file listing runs; a listing that exhausts it answers with the entries it had dated by then, flagged partial, and 0 turns the timer off so the walk always runs to completion

[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.updated or order.deleted, Default: no default) — List of events to send hooks for (the order.* 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 delivery
  • retry_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 master
  • secret (type: string, allowed: any string, no default) — Guards the replication server, and is sent by a replica to its master. Called secret rather than api_key because no caller of the product's API ever holds it — it authenticates githttp-fs to githttp-fs
  • host (type: string, allowed: IPv4 / IPv6, default: server.host) — Address the replication server binds; set it to 127.0.0.1 or a private interface to narrow reach further
  • port (type: string, allowed: TCP ports, default: 5356) — Port the replication server binds; must differ from server.port
  • node_id (type: string, allowed: up to 64 characters of A-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 (secret is 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 when role is replica, and rejected when it is master
  • poll_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 hint. A replica reports it to its master, which sizes the silence that makes it call this replica degraded from it, so raising it never turns a healthy replica into an alert
  • parallelism (type: number, allowed: any number, default: 4) — How many repositories a replica pulls concurrently while catching up
  • reconnect_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 minute
  • deletion_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 a deletion_refused issue 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 to false for 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 maintained
  • destructive_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 default false maintenance retains every object and can never destroy data
  • maximum_packs (type: number, allowed: 2 or 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 after delay_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

  • API.md — the complete HTTP API and webhook payload reference
  • DESIGN.md — the annotated configuration reference and the reasoning behind every design decision
  • 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.