How I Cut Build Time and Mobile Data by Running a Local Package Cache at Home

Run a local package cache to speed builds, save mobile/home data, and survive flaky networks—practical setup, tradeoffs, and India‑specific tips.

Written by: Rohan Deshpande

A small home server and laptop on a wooden desk, cables and drives visible
Image credit: Adeolu Eletu / Unsplash

If you’ve ever watched a CI job stall downloading the same 600 MB of Docker layers or your laptop burn through mobile hotspot data while npm installs chug along, you know the pain. In India, where data caps, metered connections, and inconsistent home broadband are still common, that pain shows up regularly.

A local package cache—running a small proxy/cache server on your home network or cheap VPS—fixed that for me. It cut iterative build time, slashed repeated downloads, and made weekend work sessions less dependent on my ISP being “in the mood.” It’s not magic, but it’s practical. Here’s what I run, why it helped, and the tradeoffs you should expect.

Why run a local package cache

What I run (practical, low-cost stack)

How I set it up (high-level)

  1. One machine, Docker Compose: Verdaccio, apt-cacher-ng, and a small nginx reverse proxy. Docker makes upgrades painless.
  2. Storage: Use an SSD and mount it for the package storage folder. Caches grow—give them room.
  3. CI integration: Point CI runners (or GitHub Actions self-hosted) to the cache via registry or npmrc changes. For Docker, configure the daemon to use the mirror.
  4. Local DNS: For convenience, create local hostnames (e.g., verdaccio.local) via your router’s DNS or a small dnsmasq entry.
  5. TTL and eviction: Configure storage-limits and a policy to remove artifacts older than X months. I keep 30–90 day windows depending on project churn.

Concrete wins I saw

Tradeoffs and things that go wrong

Practical tips from long use

When not to bother

Bottom line A local package cache is one of those small infra moves that pays back quickly for developers and tiny teams in India—especially if you care about iteration speed and data costs. It’s not a silver bullet: expect maintenance, disk management, and occasional surprises. But if your builds are noisy, network-dependent, or your team collides on the same heavy images and packages every day, a local package cache will feel like reclaiming a few minutes of your life every time you hit “install.”

If you want, I can drop a starter docker-compose for Verdaccio + nginx and the exact client config snippets I use (npmrc, Docker daemon config). Want that?