Self-Hosting · Game Downloads
Lancache: Cache Game Downloads on Your Network
Every game your household downloads arrives over the same internet connection, usually more than once: the second PC, the console, the reinstall after a wipe. Lancache stores the first download on a box in your house and serves every copy after it at network speed. This guide builds the standard three-container setup, gets the DNS chain right so your existing Pi-hole or AdGuard blocking survives it, and does the sizing and benefit math plainly — starting with who should skip it: a single-PC household gains little, because the cache can only ever serve the second copy, and that household rarely asks for one.
Published Nov 24, 2026
The trick: your DNS answers helpfully
When a PC or console downloads a game, it asks for files from the game stores’ content delivery networks — Steam’s, Battle.net’s, Epic’s and the rest. Lancache inserts itself into that conversation in two parts. The first is a DNS override: when a device on your network asks where a download server lives, the Lancache DNS answers with the address of a box in your house instead of the real one on the internet. The second is a caching proxy on that box. The first time any machine downloads a game, the proxy fetches it over your internet connection and keeps a copy. Every later download of the same content — the second PC, the console, the reinstall after an operating system wipe — is served from that copy at LAN speed, and your internet connection is not involved.
The project was born for LAN parties, where fifty machines install the same games over one venue connection; a household is the same shape at smaller scale.
Who this actually pays off for
The arithmetic only works in one direction, so the audience comes before the setup. Lancache pays off in households with two or more gaming machines — two PCs, a PC and a console — or one machine whose library gets reinstalled often, on a connection that is slow, metered, or shared. A single-PC household with a fast connection gains very little: your first download is the only download, and the cache can only ever serve you the second copy you never ask for. If that is your house, the hardware sizing guide is the better next read.
The three containers
The standard deployment is three containers from the lancachenet project, run as one Compose stack on a NAS or home server that is already on all day:
- monolithic — the cache itself. One container caches every supported service: Steam, Battle.net, Epic, the EA app, Riot, Ubisoft, Windows Update and more, per the project’s cache-domains list. (An older per-service image, lancachenet/generic, is what the monolithic replaced; the stack below turns on its compatibility switch.)
- lancache-dns — the DNS server that hands out the cache’s address for download domains and passes everything else upstream.
- sniproxy — a passthrough for port 443. The HTTPS traffic a cache cannot intercept is forwarded untouched, so nothing breaks.
services:
dns:
image: lancachenet/lancache-dns:latest
environment:
- LANCACHE_IP=192.168.1.50
- UPSTREAM_DNS=192.168.1.53
ports:
- "53:53/udp"
- "53:53/tcp"
cache:
image: lancachenet/monolithic:latest
environment:
- USE_GENERIC_CACHE=true
- CACHE_DISK_SIZE=1000g
- CACHE_INDEX_SIZE=500m
- CACHE_MAX_AGE=365d
volumes:
- /srv/lancache:/data/cache
ports:
- "80:80"
sniproxy:
image: lancachenet/sniproxy:latest
ports:
- "443:443"
Replace the two addresses with your own: LANCACHE_IP is the cache box’s address, and UPSTREAM_DNS is the subject of the next section. DNS_BIND_IP exists for hosts whose DNS service must bind to one specific address; on a typical NAS or mini PC the default is what you want. CACHE_DISK_SIZE and CACHE_INDEX_SIZE get their own section below.
The DNS chain is the whole setup
Nothing caches unless your devices ask the Lancache DNS where downloads live. There are two ways to arrange that: per device, which works and does not scale, or once in your router’s DHCP settings, so every device is handed the Lancache DNS automatically. Take the router route.
The ordering inside the chain is where existing readers of this site have an advantage, and where most failed Lancache setups go wrong. The chain should read: device → Lancache DNS → your existing ad-blocker → the upstream resolver. That is what UPSTREAM_DNS is for: point it at the Pi-hole or AdGuard Home you already run, and every ordinary lookup still passes through your blocking on its way out, exactly as it does today. The AdGuard Home and Pi-hole comparison covers the blocker layer itself; this guide only insists on its place in the order.
Get the order wrong and the failure is silent in one of two directions. If your devices still point at the Pi-hole directly, download domains resolve to the real content networks and the cache sits empty while everything appears to work. If the Lancache DNS points past your blocker to a public resolver, downloads cache beautifully and the ads come back. Neither failure announces itself, which is why the check after setup is specific: install a game on one machine and watch the cache’s disk usage climb, then install it on a second machine and watch the internet traffic stay flat while it completes at network speed.
One consequence deserves stating: the cache box joins your DNS path, so it needs the same always-on reliability as the blocker it sits in front of. Run it where your other infrastructure lives — the NAS hosting your game servers is the natural home — not on a machine that sleeps.
Sizing the cache disk
Modern game installs are the unit here. A single large release commonly runs 75 to 150 GB, so the community’s working floor is about 1 TB of cache for more than two or three current games — the project’s own examples pair a 500 MB index (CACHE_INDEX_SIZE=500m) with a 1,000 GB cache, and the stack above follows that pairing. The cache wants capacity, not speed records: it streams files it already holds, so a NAS hard drive is the right disk, and a retired SSD is a perfectly good one. If a dedicated drive is going in for the job:
Prices are editorial estimates, checked against retailer listings on the date stated on the page, and change often — the links open current listings where you can verify price and availability. Some links may earn a commission at no cost to you — see the disclosure page.
The benefit math
Take a 100 GB game — the middle of the current size range — and a 100 Mbps internet connection, a common real-world speed. The first download moves 100 GB at that rate: about two and a quarter hours. The same game served from the cache crosses your gigabit network at roughly 110 MB/s: about fifteen minutes. The cache does not make the first download faster. It makes every download after the first one — the second PC, the console in the other room, the reinstall after a drive swap or an operating system wipe — a fifteen-minute job instead of an evening. In a two-PC household reinstalling a shared library a few times a year, the hours add up quickly; in the single-PC household, they never arrive — the same math read from the other side.
Steam Prefill: warm the cache before launch night
The remaining wart is the first download itself, and the project ecosystem has an answer for it. Steam Prefill (the tpill90/steam-lancache-prefill tool) logs into Steam on a schedule you set and downloads your chosen games into the cache ahead of time — overnight, or in the days before a release unlocks. Run it on a timer and the “first” install of a game the whole house is waiting for is already local when launch night arrives, pulled from the cache while the public download servers take the launch-day beating. It suits this site’s automation-minded readers precisely because it is a scheduled job on a box that is already awake.
Two warnings worth printing
Old caches do not carry over. Download files stored by the older steamcache and generic layouts are not compatible with the monolithic cache. If you are migrating from an older setup, the new cache starts empty and re-primes as games are downloaded again; there is no conversion step. And not everything is cacheable: the cache stores plain-HTTP downloads from the services on the project’s supported list, and traffic that arrives over HTTPS cannot be intercepted — the sniproxy container’s entire job — so a service that moves its delivery behind encryption leaves the cache’s reach.
Official documentation and references
- Lancache — the project site: what the cache supports and how the pieces fit together
- lancachenet on GitHub — the monolithic, dns and sniproxy images and their documented environment variables
- Steam Prefill on GitHub — the scheduling tool that warms the cache ahead of a first download
Frequently asked questions
Do all my devices have to use the Lancache DNS?
Only the ones you want downloads cached for. Setting the Lancache DNS in your router’s DHCP options covers every device on the network in one step, which is the arrangement this guide recommends; a per-device setting works too, for testing on one machine first.
Will Lancache break my Pi-hole or AdGuard blocking?
No, provided the chain is ordered correctly: devices ask the Lancache DNS, and its UPSTREAM_DNS points at your Pi-hole or AdGuard Home, so ordinary lookups still pass through your blocking. Point the cache’s upstream past the blocker and the ads return; leave devices pointing at the blocker directly and nothing caches.
How big should the cache disk be?
About 1 TB is the working floor if you want to hold more than two or three current games, which commonly install at 75 to 150 GB each. The project’s examples pair a 500 MB cache index with a 1,000 GB cache disk, and the Compose stack in this guide follows that pairing.
Does Lancache work for consoles?
Yes. A console that downloads from a supported service and takes its DNS from your router is served by the cache like any other machine — which is much of the point in a household where the same game lands on a PC and a console in the same week.
What happens if the cache box goes down?
Because devices take their DNS from it, a stopped cache box interrupts name resolution for the machines using it, not just game downloads. That is why the stack belongs on the same always-on NAS or server as your other infrastructure.

