View on GitHub

SteamCache.Net

SteamCache.Net

SteamCache.Net provides the ability to reduce your Internet bandwidth consumption in scenarios where you have multiple PC gamers sharing the same Internet connection. Through the use of easy to deploy docker containers we aim to make it easy for you to get a local cache of steam's content servers up and running quickly.

The primary use case is gaming events, such as LAN parties, which need to be able to cope with hundreds or thousands of computers receiving an unannounced patch - without spending a fortune on internet connectivity. Other uses include smaller networks, such as Internet Cafes and home networks, where new games are regularly installed on multiple computers; or multiple independent operating systems on the same computer.

Originally designed as a caching solution purely for steam our latest docker imagesteamcache/monolithic handles caching for a wide variety of gaming cdns (Steam, Blizzard, Origin to name a few) in one single easy to use docker container. Power users may prefer steamcache/generic which is designed as a base for multiple instance, single cdn caches.

Prerequisites

Usage

As a quick "get started and go" run the following commands to bring up both a lancache server and a dns container and then configure your router/dhcp server to provide the IP of your lancache server as the dns server for the network

export LANCACHE_IP=`hostname -I | cut -d' ' -f1`
docker run --restart unless-stopped --name lancache -v /cache/data:/data/cache -v /cache/logs:/data/logs -p 80:80 steamcache/monolithic:latest
docker run --restart unless-stopped --name lancache-dns -p 53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=$LANCACHE_IP steamcache/steamcache-dns:latest
docker run --restart unless-stopped --name lancache-sniproxy -p 443:443 steamcache/sniproxy:latest
echo Please configure your dhcp server to serve dns as $HOST_IP

For a more detailed guide, follow the below instead or check the readme's linked

  1. Run the lancache reverse proxy container

    docker run --restart unless-stopped --name lancache -v /cache/data:/data/cache -v /cache/logs:/data/logs -p 80:80 steamcache/monolithic:latest
    

    Note that this container requires the use of port 80 and so may not be run on the same machine as some other website. A dedicated caching server is recommended.

  2. Run the steamcache DNS server container

    When starting this container you need to pass in the IP address which the reverse proxy container is running on. Assuming that you're running both containers on the same machine then this will just be the IP address of that machine. This command looks up that IP and then starts the container using it.

    export LANCACHE_IP=`hostname -I | head -n 1`;
    docker run --restart unless-stopped --name lancache-dns -p 53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=$LANCACHE_IP steamcache/steamcache-dns:latest
    

    If you want to specify the IP then just place it in the run command like

    docker run --restart unless-stopped --name lancache-dns -p 53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=111.111.111.111 steamcache/steamcache-dns:latest

    Now anyone using this DNS server will have their steam traffic served by the cache.

  3. Start the sniproxy container

    An increasing number of game providers are serving https traffic on the same endpoint as http, to ensure we don't break this secure traffic we need a sniproxy instance

    docker run --restart unless-stopped --name lancache-sniproxy -p 443:443 steamcache/sniproxy:latest
    
  4. Change your DHCP server to give out the IP address of the steamcache DNS container as primary DNS

Now, as people join your network they will automatically be configured to use the lancache (unless they've chosen to override DNS on their local PC).

Running on Startup

Please follow the instructions in the Docker documentation to run the container at startup.