Caching Server

Taget fra:

I know it looks like a lot, but it’s actually not that hard to setup.

This tutorial is designed around Ubuntu 18.04 Desktop, but should be adaptable to most Linux distros. We aren’t going to go into detail about setting up your storage medium, so you will have to do your own research on that. Here’s a link to a good article on how to setup a software RAID in Ubuntu if that’s what you intend on using.

  1. Setup a non-root user to issue docker commands.
    • If you are using 18.04 Desktop, you should already be using a non-root account w/ sudo access
    • Otherwise add a user, replacing “USERNAME” with your desired username while logged in as root.
      adduser USERNAME
    • If you wish to run docker commands via sudo, add the user to the sudo group:
      usermod -aG sudo USERNAME
    • OPTIONALLY: if you just want to allow the user to use docker commands:
      usermod -aG docker USERNAME
  2. Ensure you have curl installed
    sudo apt install curl -y
  3. Install Docker
    sudo curl -sSL | sh
    • Docker can be installed solely by your distro’s package manage, but running the following command takes care of all dependencies and will ensure you end up with the newest version of docker
  4. Verify Docker is functioning correctly.
    • Run the following command to check if docker installed and is functioning properly. It should output with a bunch of text hopefully including: “active (running)” in green. That means docker is working properly :D
      sudo systemctl status docker


  5. OPTIONAL: If you intend to cache services other than just steam, like origin, or, add the corresponding amount of IPs necessary.
    • If you just want to cache steam games, you don’t need to add any additional IPs – steamcache will run just fine on the main system IP ASSUMING nothing else is already using ports 53 (dns forwarding), and 80 (caching service).
      • Otherwise, you need to determine the amount of additional IPs you will require. Add 1 additional IP per extra service you’d like to cache. For example, if you wish to cache steam and origin, you would need 1 additional IP on top of the existing IP of the system, for a total of 2 IP addresses.
      • For our long term setup we need 6 IPs total, as we will be caching everything EXCEPT for Uplay as that seems to break it for whatever reason.
        • – steamcache-dns and steam-cache docker containers
        • – origin-cache (Origin)
        • – blizzard-cache (
        • – riot-cache (Riot Games)
        • – frontier-cache (Frontier Launchpad)
        • – windows-cache (Windows Updates)
      • Make sure you CHANGE the example IPs to follow your subnet, some people’s routers use “192.168.1.o”, some are “192.168.0.x”, it really depends. You also don’t have to use .50-55, you can use any unused local addresses. I’d recommend checking the systems current IP address and going off of that (should be the first IP listed).
        hostname -I
      • MAKE SURE no other devices on your network are already using those IP addresses. Mobile apps like “Fing” can be useful to scan your network to find unused IPs (this can also be used to find out what your subnet is)
    • With your IPs now decided upon, it’s time to set them in NetworkManager utility, run:
      sudo nmtui
    • Navigate into “IPv4 Connection”>”Wired connection 1″ (this might be named something else, so select the entry under “ethernet”)
    • Set “IPv4 Configuration” to “Manual”
    • Enter each desired IP, with an “/32” appended to the end to indicate to the system that it is a single IP address range, like shown below
    • Set “Gateway” to the IP address of your router. This is “” for us.
    • Set “DNS servers” to your desired DNS servers, if you don’t know what this is use “” and “”
    • Exit out via <OK>, then <Back>, then Quit.
    • Restart networking by running:
      sudo systemctl restart networking
    • Check that the IP addition worked by running “ping ADDITIONALIP” on another computer on the same network. This would be “ping” or .52, .53, .54, or .55. If it doesn’t respond to pings, try restarting the system. If it still does not work, make sure there are no IP conflicts and that you entered the settings properly.
  6. Start the docker containers for each caching service
    • Depending on how many caching services you intend to run, you might have to run up to 8 full length commands to get all of the services running, thankfully you can just copypasta them from here and edit to suit your setup. Only run the caching container commands for services you want to use and then remove the IPs from the dns container command for the services you don’t intend to cache.
    • Change the IPs of each module to your decided up IP address(es)
    • Change the 2 instances of “/home/USERNAME/cache/” after “-v” on each module to the location you intend to store the cached data. If the caching server is just a single drive system, the supplied location will work after changing “USERNAME” to the username of the user you are using (lol, get used).
        Reveal hidden contents
  1. Start the steamcache-dns docker container
    • This container takes incoming DNS requests and forwards any content that should be cached to the caching server, and any other requests to their intended location.
    • Remove the lines for services you aren’t using, and make sure to change the IPs to the correct IP for each caching container.
    • Change the after “-p” to the main IP of the server
      sudo docker run \
        --restart unless-stopped -d \
        --name steamcache-dns \
        -p \
        -e UPSTREAM_DNS= \
        -e STEAMCACHE_IP= \
        -e ORIGINCACHE_IP= \
        -e BLIZZARDCACHE_IP= \
        -e RIOTCACHE_IP= \
        -e FRONTIERCACHE_IP= \
        -e WINDOWSCACHE_IP= \
  2. Start the sniproxy docker container
    • This container forwards HTTPS requests that the cache cannot read due to encryption straight along to the original destination, without it Origin has a lot of issues.
      docker run \
       --restart unless-stopped -d \
        --name sniproxy \
        -p 443:443 \
  3. Check the status of the containers
    • All of the containers should show up as “Running for X”
      sudo docker container ls
  4. If everything is working, head over to a client computer and set the DNS
    • Navigation to Settings>Networking & Internet>Change adapter options>Right click your internet adapter>Properties>uncheck IPv6>Click IPv4 and then Properties
    • Check “Use the following DNS server addresses”
    • Set the “Preferred DNS server” to the IP of your steamcache-dns docker container, for us that is “”
    • Set the “Alternate DNS server” to your DNS provider of choice, if you don’t know what this is, use “”AfpLiTb.png
  5. On the client computer open command prompt and run
    ipconfig /flushdns
  6. Attempt to download a game! :D
    • You can monitor usage on the server via an app like “nload”. On first download you should see a lot of traffic both incoming and outgoing, but it should pretty much be strictly outgoing when downloading already cached content




Any Linux guru’s out there feel free to comment any additional info you think would be helpful. I’m by no means an expert, but these are the steps we took to get it working. :D


Sources (useful if you’re more interested):


Also, if you want to learn how to set this up raw dawg with a full manual install, Arstechnica has a great article on how to do that, along with a bunch more information related to the docker setup. Check it out here:

Skriv et svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *