- Home
- Build Cache Software
- nix-serve
nix-serve
What it is
nix-serve is a standalone server that makes a Nix store available as a binary cache for other Nix installations. Those installations can use the cache as a substituter by passing its URL with `--substituters`. The documented startup command is `nix run github:edolstra/nix-serve`, with an example serving on localhost port 5000; `nix store ping --store http://localhost:5000` checks the server. The usage instructions assume a flake-enabled version of Nix. For cache signing, the project documents generating a key pair and using the `NIX_SECRET_KEY_FILE` environment variable; served store paths can then be verified with `nix verify` and a trusted public key. nix-serve uses the Starman web server, and the README points to its documentation for additional flags, including an access-log example. The project is intended for Linux and self-hosted use, is free and open source under the LGPL-2.1 license, and supports Nix as its build system. The repository is under the GitHub account edolstra.
For and against
For
- Free and open source under LGPL-2.1
- Serves a Nix store as a binary cache
- Documents cache signing and verification
- Includes a server check command
Against
- Usage assumes a flake-enabled version of Nix
- Intended for Linux and self-hosted use
The verdict
nix-serve focuses on serving a Nix store as a binary cache, with documented setup, signing, and verification steps. It is a fit for users comfortable with self-hosted Linux services and the stated Nix requirement.
Who it suits
nix-serve suits Nix users who want to run a self-hosted binary cache and configure other Nix installations to use it. Its instructions assume a flake-enabled Nix version.
Plans and prices
nix-serve
Standalone Nix binary cache server · LGPL-2.1 license
Read 9 Oct 2026 · github.com
On the record
- Access logging
- The README gives `--access-log /dev/stderr` as an example Starman flag.github.com · read 9 Oct 2026
- Cache check
- The README shows checking the server with `nix store ping --store http://localhost:5000`.github.com · read 8 Oct 2026
- Cache integration
- Other Nix installations can use the cache by passing its URL to `--substituters`.github.com · read 9 Oct 2026
- Cache signing
- The README documents signing the binary cache using a generated key pair and the `NIX_SECRET_KEY_FILE` environment variable.github.com · read 9 Oct 2026
- Check server
- The README shows checking the server with `nix store ping --store http://localhost:5000`.github.com · read 9 Oct 2026
- Deployment
- The README describes running nix-serve locally as a standalone binary cache server.github.com · read 9 Oct 2026
- License
- The repository lists the project under the LGPL-2.1 license.github.com · read 9 Oct 2026
- Maintainer
- The repository owner is Eelco Dolstra, whose GitHub profile lists Utrecht, Netherlands.github.com · read 8 Oct 2026
- Nix integration
- The README says to pass the server URL to Nix with `--substituters` to use the cache.github.com · read 8 Oct 2026
- Nix requirement
- The usage instructions assume a flake-enabled version of Nix.github.com · read 8 Oct 2026
- Publisher
- The repository is under the GitHub account edolstra.github.com · read 9 Oct 2026
- Purpose
- nix-serve serves a Nix store as a binary cache that other Nix installations can use as a substituter.github.com · read 9 Oct 2026
- Requirements
- The usage instructions assume a flake-enabled version of Nix.github.com · read 9 Oct 2026
- Run
- The README shows starting it with `nix run github:edolstra/nix-serve`, serving on localhost port 5000.github.com · read 9 Oct 2026
- Signature verification
- The README shows verifying served store paths with `nix verify` and the cache's trusted public key.github.com · read 9 Oct 2026
- Signing
- The README explains how to sign the binary cache using a generated key pair and `NIX_SECRET_KEY_FILE`.github.com · read 8 Oct 2026
- Standalone server
- The project describes nix-serve as a standalone Nix binary cache server.github.com · read 8 Oct 2026
- Start command
- The README shows starting the server with `nix run github:edolstra/nix-serve`, serving on localhost port 5000.github.com · read 8 Oct 2026
The review
Overview
nix-serve is a standalone server that exposes a Nix store as a binary cache for other Nix installations. It suits people who want to run that cache themselves and are comfortable using Nix on Linux. Its focused scope and documented setup make it a practical fit for that job, but it is not a general-purpose build cache.
Key features
The README walks through launching the server with nix run github:edolstra/nix-serve on localhost port 5000, checking it with nix store ping, and configuring other Nix installations to use its URL through --substituters. That provides a direct path from setup to cache use, though the instructions assume a flake-enabled Nix version.
Signing is an important part of the workflow: nix-serve documents creating a key pair and setting NIX_SECRET_KEY_FILE, then verifying served store paths with nix verify and a trusted public key. These steps give operators a documented way to sign and check cached paths rather than treating the cache as an unsigned file server.
The server uses Starman, and its documentation points to Starman flags, including an example for sending access logs to stderr. This offers a route to configure server behavior, but the project’s stated role remains narrow: serving a Nix store as a binary cache.
Pricing
nix-serve — free. The free, open-source software is offered under the LGPL-2.1 license, with no paid tier or trial. There are no published plan quotas or seat limits to weigh; operators run it as a self-hosted service, so it is best suited to those who want to manage the server themselves rather than buy a hosted cache.
Platforms
nix-serve is for Linux and self-hosted deployment, with Nix as its supported build system. The usage instructions require a flake-enabled version of Nix. Choose another option if you need a cache service for a different build system or do not want to operate the server yourself.
Who it's for
This is a good match for Nix users who want to serve their own store as a remote binary cache and value an explicit signing and verification workflow. It is less suitable for teams seeking a managed service, a broad compilation cache, or a turnkey option that does not assume familiarity with Nix and Linux.
Pros and cons
- Pros: The README covers startup, a connectivity check, Nix substituter configuration, signing, and signature verification, making the core cache workflow clear.
- Pros: The software is free and open source under LGPL-2.1, with self-hosting available.
- Cons: The flake-enabled Nix requirement excludes setups that cannot meet that prerequisite.
- Cons: Its scope is specifically serving a Nix store; it is not positioned as a general build-cache solution or hosted service.
Alternatives
For a different approach to build caching, compare Build Cache Software. Choose Bitrise if you want a freemium build platform spanning mobile, Linux, macOS, self-hosted, and web environments, with a free Hobby tier and trial. Ccache is a better fit for single-file compilation caching across Linux, macOS, and Windows; some compiler flags fall back to the compiler.
Harmonia is another free, open-source, self-hosted Nix binary cache option for Linux. Consider BuildFetch Cache if managed cache quotas matter: its free tier includes 20GB fast cache storage, 50GB network traffic, 100,000 requests, and 45 days of LRU retention. Buildless offers a web- and API-oriented freemium alternative with a stated individual tier of one project, one user, 3GB cache space, and 100GB transfer.
Cachely may suit teams seeking managed storage and request allowances, with a free tier of 1 GiB storage and 500K requests per month. For another open-source, self-hosted option across Linux, macOS, and Windows, consider cachepot. clcache is a Windows-only alternative with a default cache size of 1 GiB.
Verdict
Choose nix-serve if you want a free, self-hosted binary cache for Nix and are prepared to run a Linux service and follow its signing workflow. Its clear setup path is the central advantage; look elsewhere for managed hosting, broader build-system support, or caching beyond Nix stores.