unRaid + SteamCache FTW

So what to do with all of this storage if you can’t possibly rip enough of your DVDs to take up the space? Well one thing that I was thinking about is future proofing myself for when I may need to do an entire rig rebuild, or help others rebuild theirs. My unRaid server has plenty of space to store a copy of all of my games, seeings that I barely take up a 512GB SSD on my rig for my gaming drive. So I started looking towards SteamCache!

Now I’m not going to go into detail about what SteamCache is precisely, but here’s a little TL:DR synopsis: SteamCache downloads the games you download, as you’re downloading them, and stores them. Then when you need to redownload a game (say for a rebuild, new build, etc) then instead of calling out to Steam for the game and using your internet connection, it can just grab it from your storage! Simple.

So I decided to tackle this with a simple “App” or Docker Container readily available on unRaid called “SteamCacheBundle”. The container seems great, it packs both the SteamCache software itself along with being a DNS provider. However, I for one couldn’t get the DNS portion to work, and two, my DNS setup is already a nightmare. I have ActiveDirectory housing my DNS for inside my network for my business and home use, and then use PiHole as my network-based adblocker. Adding SteamCache to the scenario seems to really bring things down.

So I needed to figure out how to use the DNS portion, without attacking my network DNS settings, as I’ll circle back to that later. Hosts files on windows are really, extremely, basic so I couldn’t add any of the wildcard entries in. Instead, I decided to use Acrylic DNS proxy locally and then just change my local DNS to localhost (127.0.0.1).

To setup Acrylic, I needed to get all of the domains that I could possibly need for games. Thankfully the SteamCache/LanCache community thought of this and https://github.com/uklans/cache-domains appears to be the defacto DNS lists. While Acrylic allows me to include DNS Host lists, there’s far too many for me to want to type, and even then, the lists don’t know where my SteamCache is located.

So it was time to go to work with some scripting:

Go ahead and download: https://github.com/uklans/cache-domains/archive/master.zip
Once there, extract it.
Using BASH, I then write the following (change 192.168.1.3 to your SteamCache IP):

# awk '{print "192.168.1.3 "$0}' *.txt > compiled.txt
# sed -i '/#/d' compiled.txt

Basically, we’re starting every line with our SteamCache’s IP. After that, let’s delete any comment (#) lines that appear. Saving Acrylic will result in it restarting, and you’ll now be proxied. 

Later, if I get the time, I’ll work on fixing SteamCache, but for now a portable version of Acrylic will suffice. 

Let’s see some screenshots!

Now there’s definitely still room for improvements. We started at 1:31AM and finished at 1:34AM, so a 3minute turn over. If we do this again, we can probably get there in under 1.5minutes for 4.7GB. That would be a nice steady 52MB/s. In fact, let’s see how it’d look fully from the Cache Drive:

About 2 minutes, and an speed I saw normally around 55-60MB/s. That’s not gigabit speeds (508Mb/s max) but still pretty nice. I sometimes need to consider that I run alot of containers and a few VMs on my unRaid, plus I have things happening on my Rig, but 2minutes for almost 5GB is pretty nice. 

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.