-
Notifications
You must be signed in to change notification settings - Fork 0
Lan Cache Server
Deathraymind edited this page Dec 23, 2023
·
2 revisions
This guide outlines the process of setting up a Steam cache server using TrueNAS SCALE. The cache server will help in reducing bandwidth usage and improving game download speeds on your network.
- TrueNAS SCALE server installed.
- Understanding of ZFS, Docker, Kubernetes, and network configuration.
- pfSense router and optional Zentyal or AD/LDAP server for network management.
- Login to TrueNAS SCALE.
- Go to System Settings > GUI Settings.
- Change web ports to 444 and 81 to free ports 443 and 80 for the cache server.
- Ensure a storage pool is created in Storage > Create Pool.
- Use similarly sized drives for a RAID-Z configuration for data redundancy.
- Navigate to Datasets > Add Datasets.
- Create a new directory named
data, then within it, create another directory calledcache.
- TrueNAS SCALE uses Kubernetes (via Rancher) for scalable Docker deployment.
- Go to Apps > Settings > Advanced Settings.
-
Node IP: Set to
0.0.0.0(localhost). -
Route Interface: Set to your physical interface (e.g.,
enp0s25). -
Route v4 Gateway: Set to your router’s IP (e.g.,
172.16.0.1). -
Cluster CIDR: Use a different subnet than your network (e.g.,
172.17.0.0/16). -
Service CIDR: Use another separate network (e.g.,
172.18.0.0/16). -
Cluster DNS IP: Set to
172.18.0.10.
-
Node IP: Set to
- Set a static IP for TrueNAS SCALE (e.g.,
172.16.16.110) in pfSense (Status and Leases). - Restart TrueNAS SCALE.
- Use the command:
ssh admin@172.16.16.110.
- Download the latest version of Docker Compose from the official releases.
- Install with:
sudo curl -L "[Docker Compose Release URL]" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
- Navigate to the cache directory:
cd /mnt/NAS/data/cache. - Clone the Lancache repository:
git clone https://github.com/lancachenet/docker-compose lancache cd lancache - Edit the
.envfile withsudo nano .envand configure as follows:LANCACHE_IP=172.16.16.110DNS_BIND_IP=172.16.16.110-
UPSTREAM_DNS=172.16.16.40(Your Pi-hole or primary DNS server). CACHE_ROOT=/mnt/NAS/Data/cache- Other relevant settings (disk size, memory, timezone).
- Run
sudo docker-compose up -dto start the Lancache Docker instance.
- If using a Zentyal or AD/LDAP server for DNS management, configure it to use the Lancache server as a DNS forwarder.
- Add a new DNS forwarder pointing to the Lancache server (e.g.,
172.16.16.110).
- Add a new DNS forwarder pointing to the Lancache server (e.g.,
- On a host machine, test with
nslookup steam.cache.lancache.net(should resolve to TrueNAS SCALE IP). - Ping
google.comand your AD/LDAP server (e.g.,cybersecurity.lan) to confirm network connectivity.
By following these steps, you have set up a Steam cache server using TrueNAS SCALE. This setup will allow for efficient game downloads and updates, reducing internet bandwidth usage on your network. Remember to monitor and maintain your TrueNAS SCALE and network configurations for optimal performance.