A LAN cache for Steam games.
✅ Allows caching of specific games
✅ Saves cached files as-is without slicing for visibility and easier maintenance
✅ Provides useful cache metrics in Prometheus format
✅ Lightweight image size (~10MB)
- Run the app (via docker compose, for example):
services:
lancache:
image: ghcr.io/t-richards/lancache:latest
env:
# - APP_ENV=production # (optional) set to "development" for colorful console output
# - BYPASS_CACHE=true # (optional) bypass cache for troubleshooting
ports:
- "80:80"
- "9090:9090" # (optional) prometheus metrics
volumes:
- /path/to/cache:/opt/cache
- /path/to/lancache.toml:/opt/lancache.tomlNote
The cache directory must be writable by the container.
The container runs as the app user with UID/GID 1234.
- Set a DNS record for
lancache.steamcontent.compointing to the host running the app.
Note
Steam will reject your LAN cache if the response TTL is too high. Additionally, some DNS resolvers will still return public AAAA records even if you override the A record for a given hostname. We suggest using the following CNAME -> A configuration for best results.
$ dig lancache.steamcontent.com
<snip>
;; ANSWER SECTION:
lancache.steamcontent.com. 5 IN CNAME lancache.lan.
lancache.lan. 600 IN A 192.168.1.121
# File: /opt/lancache.toml
[steam]
# array(uint32): Which depots to cache.
# You can find the relevant IDs for depots on https://steamdb.info/
depots = [
123, # Leave yourself a note about which game this is
456, # ...or not, up to you.
]
# boolean: Default false.
# When true, the `depots` setting is ignored and all depots are cached.
cache_all = falseSee also: a complete example lancache.toml.
Requirements:
- Go
=1.25
# Build
make
# Run
bin/lancacheCopyright (c) 2025 Tom Richards. All rights reserved.