Guide - steamcache on Centos7/podman

Preface:

I write this guide from POV of the root user
I wont cover OS install or drive/disk/filesystem setup
I am using a file system mounted at /mnt/cached

mkdir -p /mnt/cached/cache/{riot,origin,blizzard,steam}/{data,logs}

I set selinux on that directory:

semanage fcontext -a -t container_file_t ‘/mnt/cached(/.*)?’

The number of IP addresses you need to use can vary.
If only doing steamcache: two Ip addresses should be enough
Be sure to use whatever you desire for your upstream dns *

Step one: install Centos7 (minimal)

Step two: setup static networking

vim /etc/sysconfig/network-scripts/ifcfg-eth0
nmcli con reload && nmcli con up eth0
ip add

or

nmtui
nmcli con reload && nmcli con up eth0
ip add

Step three: install packages and updates

yum install vim bash-completion setroubleshoot epel-release net-snmp && yum upgrade
shutdown -r +4

wait for reboot

yum install podman

Step four: scripts

Create three executable scripts from the below text
Edit them if you have different IP’s or are using a different folder/mount point.
The first two should be all you need, unless you need to cleanup and start over.

#!/bin/bash
# Steam

sudo podman run \
--restart always -d \
--name steam-cache \
-v /mnt/cached/cache/steam/data:/data/cache \
-v /mnt/cached/cache/steam/logs:/data/logs \
-p 192.168.0.50:80:80 \
lancachenet/generic:latest

#Origin

sudo podman run \
--restart always -d \
--name origin-cache \
-v /mnt/cached/cache/origin/data:/data/cache \
-v /mnt/cached/cache/origin/logs:/data/logs \
-p 192.168.0.51:80:80 \
lancachenet/generic:latest

#Blizzard / Battle.net

sudo podman run \
--restart always -d \
--name blizzard-cache \
-v /mnt/cached/cache/blizzard/data:/data/cache \
-v /mnt/cached/cache/blizzard/logs:/data/logs \
-p 192.168.0.52:80:80 \
lancachenet/generic:latest

#Riot Games

sudo podman run \
--restart always -d \
--name riot-cache \
-v /mnt/cached/cache/riot/data:/data/cache \
-v /mnt/cached/cache/riot/logs:/data/logs \
-p 192.168.0.53:80:80 \
lancachenet/generic:latest


#!/bin/bash

sudo podman run \
--restart always -d \
--name steamcache-dns \
-p 192.168.0.50:53:53/udp \
-e UPSTREAM_DNS=192.168.0.124 \
-e STEAMCACHE_IP=192.168.0.50 \
-e ORIGINCACHE_IP=192.168.0.51 \
-e BLIZZARDCACHE_IP=192.168.0.52 \
-e RIOTCACHE_IP=192.168.0.53 \
lancachenet/lancache-dns:latest


sudo podman run \
--restart always -d \
--name sniproxy \
-p 192.168.0.50:443:443 \
lancachenet/sniproxy:latest


#!/bin/bash

podman stop steam-cache steamcache-dns riot-cache blizzard-cache origin-cache sniproxy
sleep 1
podman rm steam-cache steamcache-dns riot-cache blizzard-cache origin-cache sniproxy




If anyone wants to touch up the formating and make this easier to read… feel free.
Thanks.

6 Likes

Fucking pro detected.

Oh shit.

No, thank you.

Have you cached any games yet?

2 Likes

Hadn’t known about podman, looks interesting.

Great guide.

2 Likes

image

You could say a few

2 Likes

I could never get this shit working from a DNS perspective. It’s my fucking Unifi, I think.

Might have to jump ship to a pfsense router or something…

But I’m definitely going to be following this guide once that’s done.

3 Likes

I actually use this beside my pihole… i have conditional forwarding pointing to the steamcache-dns from my pihole.

2 Likes

Hmmm, does pihole handle DHCP as well as DNS? (I’ve thought about deploying one, just never got around to it)

3 Likes

Yes.

I don’t use it though since I have pfsense handling DHCP for me.

4 Likes

1 Like