LanCache
Make the most of your network. Get more play for your gamers. Download your games once and serve them out to many people at your LAN.
Docker Compose
version: '3.3'
services:
lancache-dns:
restart: unless-stopped
container_name: lancache-dns
ports:
- 53:53/udp
environment:
- USE_GENERIC_CACHE=true
- LANCACHE_IP=192.168.1.183
image: lancachenet/lancache-dns:latest
monolithic:
restart: unless-stopped
container_name: lancache
volumes:
- /cache/data:/data/cache
- /cache/logs:/data/logs
ports:
- 8810:80
- 8443:443
image: lancachenet/monolithic:latest
DNS (Port 53) Error Fix
Edit /etc/systemd/resolved.conf and change the Cache and DNSStubListener lines to no.
Should look like this when you're done:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=allow-downgrade
#DNSOverTLS=no
Cache=no
DNSStubListener=no
#ReadEtcHosts=yes
Test Operation
Testing your cache
Now you’ve configured your dns, started that stack and are ready to test things are operating. Here’s some very basic diagnostics and tests we would suggest to run to see if things are working.
- Check your dns is being intercepted
- Run a few queries using command prompt to check that your dns is pointing at your cache, the following should all result in your cache ip if everything is working
ipconfig /flushdns
nslookup steam.cache.lancache.net
nslookup lancache.steamcontent.com
- Download a game through steam
-
If everything is working you should find the first time you download a game speeds which are equivalent to your internet speed. You may find that initial downloads through the cache are slightly slower, but thats ok.
Why do we cache
We cache traffic in order to provide benefit to many users in a large environment. LanCache is optimised for hundreds to thousands of gamers downloading at once not one or two users on a small scale. The emphasis is always on superior cached performance over uncached.
- Uninstall the first game and download again
- This time you should find your game downloads much faster (depending on your limiting factor: Server Disk, Client Disk, Network, see hardware.
-
Try a few other cdns
-
Precache some of the more popular games you might expect to happen at your event
- Although precaching isn’t necessary, it certainly helps the initial demand on a cache when everyone turns up at the same time.
- Get your friends round and enjoy the entire lan being able to download a game for only 1x external traffic.