- Home
- Artifact repository software
- Harmonia
Harmonia
What it is
Harmonia is free, open-source software for serving a Nix store as a binary cache over HTTP. Written in Rust for Linux self-hosting, it supports range requests for NAR streaming and can stream build logs. Its `/serve//` endpoint can deliver package contents and locate an `index.html` file to serve websites from the Nix store. Harmonia can compress content with zstd and provide TLS when no frontend web server is used. Documentation covers a NixOS module and nginx as an HTTPS frontend. Narinfo signing is disabled by default without a secret key, but can be enabled by supplying private signing key paths. For monitoring, it exposes Prometheus metrics at `/metrics`, and the repository includes a Grafana dashboard. It reads store metadata directly from the Nix SQLite database without connecting to nix-daemon. The 3.3.0 release adds harmonia-gc, which can remove Nix store garbage while nix-daemon is building. Harmonia is licensed under MIT.
For and against
For
- Streams NAR files and build logs
- Can serve package contents and websites from the Nix store
- Includes Prometheus metrics and a Grafana dashboard
- Reads metadata without connecting to nix-daemon
Against
- Designed for Linux self-hosting
- Narinfo signing is off by default without a secret key
The verdict
Harmonia offers a self-hosted Nix cache with streaming, compression, monitoring, and optional signing. Operators should account for its Linux focus and configure private keys if they need narinfo signing.
Who it suits
Harmonia suits Nix users who want to run their own HTTP binary cache on Linux. Its monitoring and NixOS documentation may also suit administrators configuring cache operations.
Plans and prices
Harmonia
Open-source Nix binary cache software · self-hosted
Read 9 Oct 2026 · github.com
On the record
- Build logs
- It supports streaming build logs.github.com · read 9 Oct 2026
- Cache signing
- Narinfo signing can be enabled by providing paths to private signing keys; signing is disabled by default when no secret key is configured.github.com · read 9 Oct 2026
- Compression
- It can transparently compress content with zstd.github.com · read 9 Oct 2026
- License
- The project is licensed under the MIT License.github.com · read 4 Oct 2026
- Maintainer
- The repository identifies Mic92 as a maintainer.github.com · read 9 Oct 2026
- Metadata access
- Since version 3.1.0, harmonia-cache reads store metadata directly from db.sqlite without connecting to nix-daemon.github.com · read 4 Oct 2026
- Monitoring
- Harmonia exposes Prometheus metrics at `/metrics` and provides a Grafana dashboard in the repository.github.com · read 9 Oct 2026
- NAR streaming
- It supports HTTP range requests for streaming NAR files.github.com · read 9 Oct 2026
- Nix garbage collection
- The 3.3.0 release adds harmonia-gc, which removes garbage from the Nix store and can run while nix-daemon is building.github.com · read 4 Oct 2026
- NixOS
- The README documents configuring Harmonia as a public binary cache with a NixOS module and nginx as an HTTPS frontend.github.com · read 4 Oct 2026
- NixOS integration
- The project documents a NixOS module and example configurations using nginx as a frontend.github.com · read 9 Oct 2026
- Package serving
- Its `/serve/<narhash>/` endpoint serves package contents and can discover index.html files to serve websites from the Nix store.github.com · read 9 Oct 2026
- Purpose
- Harmonia serves a Nix store as a binary cache over HTTP and is written in Rust.github.com · read 9 Oct 2026
- Recent release
- The latest listed release is harmonia-v3.3.0.github.com · read 9 Oct 2026
- Signing
- Harmonia does not sign narinfo by default without a secret key; signing can be enabled by providing private key paths.github.com · read 4 Oct 2026
- Storage metadata
- The cache reads store metadata directly from the Nix SQLite database and does not require a nix-daemon connection.github.com · read 9 Oct 2026
- Support
- The repository points users to its contributing guide and architecture documentation for project participation and technical details.github.com · read 9 Oct 2026
- TLS
- Harmonia can provide TLS directly when no frontend web server is used.github.com · read 9 Oct 2026
The review
Harmonia is a self-hosted HTTP binary cache for Nix stores, written in Rust. It is best suited to Nix operators who want control over cache serving and monitoring; teams seeking a managed build cache should look elsewhere.
Overview
Harmonia serves the /nix/store over HTTP, letting operators provide a binary cache from infrastructure they control. Its NixOS module and example configurations with nginx make it a natural fit for deployments already built around NixOS. That focus is also its boundary: it is Linux and self-hosted software, not a hosted cache service for teams that want someone else to run the storage and server.
It is free and open source under the MIT License. The project identifies Mic92 as maintainer and points contributors to its contributing guide and architecture documentation. The latest listed release is harmonia-v3.3.0.
Key features
NAR streaming supports HTTP range requests, while build logs can also be streamed. This makes Harmonia more than a simple endpoint for completed store objects: clients can request portions of NAR files, and operators can expose build output as it is produced.
The /serve/<narhash>/ endpoint can serve package contents and discover an index.html to host a website directly from the Nix store. Transparent zstd compression can reduce the amount of content sent over the network, though operators still need to provide and manage the server infrastructure.
Harmonia can handle TLS itself when no frontend web server is in use. For a NixOS deployment, the project documents using its module with nginx as an HTTPS frontend, giving operators a documented route to terminate TLS through a separate server. Prometheus metrics at /metrics and an included Grafana dashboard give teams tools to monitor the cache.
Narinfo signing is opt-in: without a configured secret key, Harmonia does not sign narinfo. Operators whose cache clients require signed metadata must provide private key paths and account for the associated key management. Since version 3.1.0, harmonia-cache reads store metadata from db.sqlite without connecting to nix-daemon. Release 3.3.0 added harmonia-gc, which removes garbage from the Nix store and can run while the daemon is building.
Pricing
Harmonia costs nothing. The free, open-source plan is the software itself, intended for self-hosted use; it is not a hosted service plan. There is no free trial because there is no paid tier to trial. Operators take on the work of running the cache and, if they need narinfo signing, configuring private keys.
Platforms
Harmonia supports Linux and self-hosted deployments. Its documented NixOS module and nginx examples are especially relevant to NixOS operators. It is not positioned as a cross-platform or managed web service.
Who it's for
Choose Harmonia if you operate Nix infrastructure and want HTTP cache serving with streaming, compression, Prometheus metrics, and options for TLS and signing under your control. It also suits operators who value reading store metadata directly from SQLite rather than requiring a nix-daemon connection for that task.
Look elsewhere if you need a hosted cache, want to avoid Linux server administration, or do not want to manage signing keys. Harmonia's capabilities reward an operator comfortable configuring and maintaining the service; they do not remove that operational responsibility.
Pros and cons
- Pros: NAR range requests and streamed build logs support more than basic artifact downloads.
- Pros: The package-serving endpoint can expose a website from the Nix store, including automatic discovery of index.html.
- Pros: Prometheus metrics, a Grafana dashboard, and a NixOS module with nginx examples give operators concrete monitoring and deployment starting points.
- Pros: It is free, MIT-licensed software with optional TLS and narinfo signing.
- Cons: It is Linux-focused and self-hosted, so it does not suit readers who need a managed cache or another platform.
- Cons: Narinfo signing is disabled until private signing keys are configured, adding a key-management step for users who require signed metadata.
Alternatives
For a wider range of build-cache and artifact options, browse Build Cache Software or Artifact repository software.
- nix-serve is another free, open-source, self-hosted Linux Nix binary cache server; choose it if that standalone server is the better fit for your needs.
- Bitrise has a free Hobby plan for a one-person team with build credits for a small project a few times per month; choose it if you want a broader platform with a free trial rather than a self-hosted Nix cache.
- Ccache caches single-file compilations and supports Linux, macOS, and Windows; choose it for compiler-cache needs beyond Harmonia's Nix binary-cache scope.
- BuildFetch Cache offers a free open-source plan with 20GB fast cache storage, 50GB network traffic, 100,000 cache requests, and 45 days of LRU retention; choose it if those published quotas suit your cache workload.
- Buildless offers web and API plans, including an Individual / OSS plan with one project, one user, 3GB cache space, and 100GB transfer; choose it if those plan limits match your needs.
- Cachely has a free plan with 1 GiB managed storage, 500K requests per month, three workspaces, five API tokens, and a build-insights dashboard; choose it if you want managed storage and those caps are sufficient.
- cachepot is free, open-source cache software for Linux, macOS, and Windows; choose it if you need a cross-platform option.
- clcache is free, open-source software for Windows with a default cache size of 1 GiB; choose it for that platform and compiler-cache use.
Verdict
Harmonia is a strong fit for Linux-based Nix operators who want a free, self-hosted binary cache with streaming, monitoring, and configurable TLS and signing. Its main reason to choose it is the combination of Nix-specific serving and operational controls; its main reason to look elsewhere is the need to run and configure the service yourself.