Sign inSign up

enxtur/nx-caching-server

By enxtur

•Updated 3 days ago

Lightweight, self-hosted remote cache server for Nx monorepos. Pure Go, filesystem storage.

Image
Integration & delivery
Developer tools
Monitoring & observability
0

7.2K

enxtur/nx-caching-server repository overview

⁠Nx Caching Server⁠

Lightweight self-hosted remote cache server for Nx⁠ monorepos, written in Go.

Implements the official Nx Remote Cache OpenAPI specification (available since Nx 20.8+), allowing you to run your own private, fast, and secure task cache without depending on Nx Cloud.

Perfect for teams wanting full control over caching infrastructure, air-gapped environments, or cost-free remote caching.

⁠Features

  • File-based storage with automatic cleanup of old entries
  • Optional Bearer token authentication
  • Simple, single-binary deployment (or Docker)
  • Minimal resource usage
  • Compatible with Nx ≥ 20.8

⁠Quick Start (Docker)

docker pull enxtur/nx-caching-server:latest

docker run -d \
  --name nx-cache \
  -p 8090:8090 \
  -v $(pwd)/nx-cache-data:/data \
  -e STORAGE_DIR=/data \
  -e AUTH_TOKEN=your-secure-token-123 \
  -e CLEANUP_THRESHOLD=24h \
  enxtur/nx-caching-server:latest

⁠Configure Nx to Use This Cache

# No auth
export NX_SELF_HOSTED_REMOTE_CACHE_SERVER=http://your-server:8090

# With auth
export NX_SELF_HOSTED_REMOTE_CACHE_SERVER=http://your-server:8090
export NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN=your-secure-token-123

Run your builds — Nx will hit/read/write to your server automatically:

npx nx run-many --target=build --all

⁠Environment Variables

VariableDescriptionDefaultExample
STORAGE_DIRPath where cache files are stored/tmp/data
CLEANUP_THRESHOLDRemove entries older than this duration (hours only)1h24h, 168h (1 week)
PORTListening port80908080
AUTH_TOKENIf set, requires Authorization: Bearer <token>(disabled)super-secret-xyz

⁠Docker Compose Example

services:
  nx-cache:
    image: enxtur/nx-caching-server:latest
    restart: unless-stopped
    ports:
      - "8090:8090"
    volumes:
      - ./nx-cache-data:/data
    environment:
      - STORAGE_DIR=/data
      - AUTH_TOKEN=your-secure-token-123
      - CLEANUP_THRESHOLD=48h

⁠Source Code

GitHub repo (source + Dockerfile): https://github.com/enxtur/nx-caching-server⁠
(Feel free to star, fork, or contribute!)

⁠Why Self-Host?

  • Zero cost compared to Nx Cloud paid tiers
  • Data stays in your infrastructure (privacy & compliance)
  • Customize storage backend later if needed
  • No vendor lock-in

Pulls: Growing steadily — thank you for using it!
Feedback, issues, and PRs are very welcome.

Happy caching! 🚀

Tag summary

Content type

Image

Digest

sha256:0e2bbdcf6…

Size

8.6 MB

Last updated

3 days ago

docker pull enxtur/nx-caching-server