Skip to content

CacheiroYour own Nx and Lerna remote cache

Self-hosted, open source, no strings attached.

Cacheiro top hat logoCacheiro top hat logo

Run it in one command ​

sh
docker run -p 3000:3000 \
  -e CACHEIRO_AUTH_TOKEN=my-secret-token \
  -v $(pwd)/cache:/cache \
  ghcr.io/rerodrigues/cacheiro-instants-fs

Then point Nx or Lerna at it:

sh
export NX_SELF_HOSTED_REMOTE_CACHE_SERVER="http://localhost:3000"
export NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN="my-secret-token"

nx run-many -t build
# or
lerna run build

Images exist for fs, s3, gcs, and azure. See Getting started for the next steps.

Why Cacheiro exists ​

In May 2026, Nx deprecated all their official self-hosted cache packages due to CVE-2025-36852, a critical cache poisoning vulnerability. Their official recommendation was to migrate to Nx Cloud (paid) or build your own cache server from scratch.

So Cacheiro was built, and made open source for everyone in the same boat. Lerna uses Nx under the hood for task orchestration, so if you are on Lerna you benefit from remote caching automatically.

Read the full story in the announcement article on dev.to.

Crafted with 🤍 by a 🇧🇷 human in 🇩🇪, for the humans of the 🌐