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.