Nix binary cache proxy service -- with local caching and signing.
  • Go 75.8%
  • Python 14.9%
  • Nix 5.2%
  • Shell 2.8%
  • Smarty 1.1%
  • Other 0.2%
Find a file
renovate[bot] 46fbc757eb
chore(deps): update actions/upload-artifact action to v7 (#991)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/upload-artifact](https://redirect.github.com/actions/upload-artifact)
| action | major | `v6` → `v7` |

---

### Release Notes

<details>
<summary>actions/upload-artifact (actions/upload-artifact)</summary>

###
[`v7`](https://redirect.github.com/actions/upload-artifact/compare/v6...v7)

[Compare
Source](https://redirect.github.com/actions/upload-artifact/compare/v6...v7)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3
* * * ) (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/kalbasit/ncps).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zNi4yIiwidXBkYXRlZEluVmVyIjoiNDMuMzYuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-26 20:52:22 -08:00
.agent refactor: migrate individual workflows to skills (#981) 2026-02-24 00:24:13 +00:00
.claude refactor: migrate individual workflows to skills (#981) 2026-02-24 00:24:13 +00:00
.github chore(deps): update actions/upload-artifact action to v7 (#991) 2026-02-26 20:52:22 -08:00
.vscode chore: Add VSCode settings and update gitignore (#505) 2026-01-08 20:06:38 -08:00
.zed feat: add a Zed task for process compose (#985) 2026-02-23 21:11:39 -08:00
assets/images docs: restructure documentation for Trilium Notes integration (#533) 2026-01-12 00:42:40 -08:00
charts/ncps chore: restore default values for CDC parameters (#988) 2026-02-24 08:14:32 +00:00
db feat: add fsck command to detect and repair DB/storage inconsistencies (#975) 2026-02-23 14:55:10 -08:00
dev-scripts feat: remove CDC flag defaults and add recommended values (#973) 2026-02-23 20:13:34 +00:00
docs chore: restore default values for CDC parameters (#988) 2026-02-24 08:14:32 +00:00
nix fix(deps): update module github.com/go-redsync/redsync/v4 to v4.16.0 (#989) 2026-02-26 01:04:08 +00:00
pkg chore: restore default values for CDC parameters (#988) 2026-02-24 08:14:32 +00:00
public docs: restructure documentation for Trilium Notes integration (#533) 2026-01-12 00:42:40 -08:00
testdata fix: avoid references that break nixpkgs impurity check on macos (#904) 2026-02-16 00:53:40 +00:00
testhelper feat: add Base16 nar hash test helpers (#881) 2026-02-13 01:22:06 -08:00
.cursorrules feat: Add agent workflows and update migration commands (#506) 2026-01-08 20:47:21 -08:00
.env sqlc: define the schema/queries and make use of generated models (#71) 2024-12-11 00:49:37 +00:00
.envrc Direnv: watch the entire nix/ directory. (#93) 2024-12-12 16:48:08 +00:00
.gitignore docs: rename claude settings to allow for local configuration (#912) 2026-02-16 07:21:16 +00:00
.golangci.yml feat: replace gen-db-wrappers with sqlc-multi-db external tool (#969) 2026-02-23 04:15:07 +00:00
.sqlfluff chore: Enable SQL formatting and linting for query files (#381) 2025-12-30 18:00:47 -08:00
.sqlfluffignore refactor: Reorganize database setup for testing (#490) 2026-01-06 17:27:58 -08:00
.yamlfmt.yml feat: Add pre-commit chart-testing hook and exclude charts from yamlfmt (#401) 2025-12-31 16:50:07 -08:00
CLAUDE.md refactor: migrate individual workflows to skills (#981) 2026-02-24 00:24:13 +00:00
config.example.yaml chore: restore default values for CDC parameters (#988) 2026-02-24 08:14:32 +00:00
CONTRIBUTING.md docs: restructure documentation for Trilium Notes integration (#533) 2026-01-12 00:42:40 -08:00
edit-docs-config.yaml docs: restructure documentation for Trilium Notes integration (#533) 2026-01-12 00:42:40 -08:00
flake.lock chore: update flake.lock and run go mod tidy (#958) 2026-02-22 00:39:11 +00:00
flake.nix feat: replace gen-db-wrappers with sqlc-multi-db external tool (#969) 2026-02-23 04:15:07 +00:00
go.mod fix(deps): update module github.com/go-redsync/redsync/v4 to v4.16.0 (#989) 2026-02-26 01:04:08 +00:00
go.sum fix(deps): update module github.com/go-redsync/redsync/v4 to v4.16.0 (#989) 2026-02-26 01:04:08 +00:00
LICENSE Initial commit 2024-11-27 22:11:23 -08:00
main.go refactor: Move cmd package to pkg/ncps and reorganize code structure (#507) 2026-01-08 21:02:03 -08:00
README.md docs: add notice about pre-releases and data safety/consistency (#814) 2026-02-09 21:24:30 +00:00
renovate.json chore: Configure Renovate (#95) 2024-12-12 23:48:25 +00:00
sqlc.yml fix: recover from partial CDC chunking using chunking_started_at (#924) 2026-02-17 13:14:00 -08:00

ncps logo

ncps: Nix Cache Proxy Server

A high-performance proxy server that accelerates Nix dependency retrieval across your local network

Go Report Card License: MIT Sponsor

What is ncps?

ncps acts as a local binary cache for Nix, fetching store paths from upstream caches (like cache.nixos.org) and storing them locally. This reduces download times and bandwidth usage, especially beneficial when multiple machines share the same dependencies.

Key Features

  • Multi-upstream cache with automatic failover
  • Flexible storage: local filesystem or S3-compatible (AWS S3, MinIO, etc.)
  • Database support: SQLite, PostgreSQL, or MySQL/MariaDB
  • High availability with Redis distributed locking for zero-downtime deployments
  • Smart caching: LRU management with configurable size limits
  • Secure signing: Signs cached paths with private keys for integrity
  • Observability: OpenTelemetry and Prometheus metrics support
  • Easy setup: Simple configuration and deployment

⚠️ Development Status & Data Safety

Important

Production Warning: The main branch and pre-release versions are under active development and should never be used in production. Your data may be lost or corrupted! Always use the latest release for production environments.

Early Stage Notice: ncps is in early development and data consistency/recovery is not guaranteed. Please maintain regular backups of your data, especially when updating ncps versions.

Quick Start

Get ncps running in minutes with Docker:

# Pull images and create storage
docker pull alpine && docker pull ghcr.io/kalbasit/ncps
docker volume create ncps-storage
docker run --rm -v ncps-storage:/storage alpine /bin/sh -c \
  "mkdir -m 0755 -p /storage/var && mkdir -m 0700 -p /storage/var/ncps && mkdir -m 0700 -p /storage/var/ncps/db"

# Initialize database
docker run --rm -v ncps-storage:/storage ghcr.io/kalbasit/ncps \
  /bin/dbmate --url=sqlite:/storage/var/ncps/db/db.sqlite up

# Start the server
docker run -d --name ncps -p 8501:8501 -v ncps-storage:/storage ghcr.io/kalbasit/ncps \
  /bin/ncps serve \
  --cache-hostname=your-ncps-hostname \
  --cache-storage-local=/storage \
  --cache-database-url=sqlite:/storage/var/ncps/db/db.sqlite \
  --cache-upstream-url=https://cache.nixos.org \
  --cache-upstream-public-key=cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

Your cache will be available at http://localhost:8501. See the Quick Start Guide for more options including S3 storage.

Documentation

  • Getting Started - Quick start guide, core concepts, and architecture
  • Installation - Docker, Docker Compose, Kubernetes, Helm, NixOS
  • Configuration - Complete configuration reference, storage and database options
  • Deployment - Single-instance and high-availability deployment guides
  • Usage - Client setup and cache management
  • Operations - Monitoring, troubleshooting, backup and upgrades
  • Architecture - System architecture and design details
  • Development - Contributing, development setup, and testing

Installation Methods

Method Best For Documentation
Docker Quick setup, single-instance Docker Guide
Docker Compose Automated setup with dependencies Docker Compose Guide
Kubernetes Production, manual K8s deployment Kubernetes Guide
Helm Chart Production, simplified K8s management Helm Guide
NixOS NixOS systems with native integration NixOS Guide

Deployment Modes

  • Single-instance: Simple deployment with local or S3 storage, SQLite or shared database
  • High Availability: Multiple instances with S3 storage, PostgreSQL/MySQL, and Redis for zero-downtime operation. Note: Must enable CDC.

See the Deployment Guide for detailed setup instructions.

Support the Project

If you find ncps useful, please consider supporting its development! Sponsoring helps maintain the project, fund new features, and ensure long-term sustainability.

Sponsor this project

Contributing

Contributions are welcome! We appreciate bug reports, feature requests, documentation improvements, and code contributions.

See the Developer Guide for:

  • Development setup and workflow
  • Code quality standards and testing procedures
  • How to submit pull requests

License

This project is licensed under the MIT License - see the LICENSE file for details.


Report BugRequest FeatureDiscussionsSponsor