HELP! It won't work! LanCache Server+Raspberry Pi 4+Ubuntu Server

I really want to make a portable Lan/Steam Cache for use with small groups. A Raspberry Pi 4 seems the ultimate hardware choise for a portable rig like this and it would be neat to intergrate this in with some other basic network hardware as portable solution.

I have tried this setup countless times on multiple pieces of hardware, followed mutiple guides to no avail. Any clues?
I have followed the guide mentions here, as well as other RP4 specific and ubuntu specific guides

The setup -

  • Raspberry Pi 4, 4GB(multiple units, differnt cooling cases)

  • WD Mypassport 2TB mechnical HDD(USB3)

  • WD Blue 500GB SSD(USB3 Hub)

Before I run the main Lan Cache code, I install Docker and Docker-Compose. I just use 1 HDD at a time, installing Ubuntu Server (I have tried several releases). For some reason, the RP4 version of Ubuntu server needs this script to be run before it will boot, this only applies to the 64 bit version Ubuntu server, not desktop. I run this script after moutning the drive to anohter system.

sudo curl https://raw.githubusercontent.com/TheRemote/Ubuntu-Server-raspi4-unofficial/master/BootFix.sh | sudo bash

After this, I set the server up by updating it. This takes a while.

I have done the same setup on multiple RP4s. I have also done the setup in a VM, and it worked right away - Here is the basic code for Lan Cache I have been using.

  git clone https://github.com/lancachenet/docker-compose/ lancache

  cd lancache

  nano .env

  docker-compose up -d

The command line reports that the container has started up and is running it. Stopping the container reports everything worked also. But when I do a port scan of the machine, it will only show port 22 as being open. But when I scan a VM with the same setup I can see ports 53,80,443 all open, and the Lan Cache actually works on that machine.

‘hello world’ works also.

Has any one gotten this working recently, HELP!

1 Like

Hello, have you changed any configuration in .env file. LANCACHE_IP and DNS_BIND_IP should be your specific Pi IP.

You can read what configs to change on Quickstart | LanCache.NET

Also have you configured your firewall and done basic interception tests from Docker-Compose | LanCache.NET

1 Like

You might just need to provide your Pi as dns on clients you want to use it with (you can just change in router DHCP settings main DNS to your Pi ip address)

then do a quick check where it will go if you look for steam cache domains…

ipconfig /flushdns
nslookup steam.cache.lancache.net
nslookup lancache.steamcontent.com

if it goes to RaspPi, try downloading game, checking your cache on Pi, then removing and re-downloading game. Second time it should get it from cache.

1 Like

Yep, I tried configuring the .env file. Setting both (and I tried commenting out one as well) IPs to my RP host IP. Nothing worked. When I port scan a working Lancache, it shows lots of open ports. But when I scan the RP for open ports it shows nothing. Setting the Pi’s IP to DNS on a client just break the internet until I change it back. Doing the same on a non-Raspberry pi setup works though.
I assume if no internet is wokring, the cache isn’t working either.

The firewall might be something to look at, I will go down that rabbit hole in the morning and see what works. Hopefully by the end of this I can put together a up to date guide for this process.

1 Like

oh you probably also have internal firewall issue, you might have ufw or some other firewall enabled there by default and you might need to open ports there too. you can try

sudo ufw allow 53,80,443 proto tcp
sudo ufw allow 53 proto udp

then to check do

sudo ufw status verbose
1 Like

For anyone wanting to get a setup like this working for them selves, I have saved a bunch of command lines sent over to me by @dexmaster. Tested and tested again.

This sets up a LanCache server using the main storage of you Pi. It is recommended to set this up on separate storage from the main system, so further instructions might pop up to do that sooner or later.

@dexmaster was the brains behind the operation and a big thanks to @sprouts87 for suggesting I persists with the side project and harass dexmaster ;).

sudo apt update && sudo apt upgrade

#sudo apt purge docker*

sudo apt install -y git libffi-dev libssl-dev  python3-dev python3 python3-pip

curl -sSL https://get.docker.com/ | sh

sudo usermod -aG docker ${USER}

sudo pip3 install docker-compose

sudo systemctl enable docker

sudo service docker start

git clone https://github.com/jrcichra/lancache-rpi.git

cd lancache-rpi

nano .env
#change LANCACHE_IP and DNS_BIND_IP to 0.0.0.0 or your static IP

docker-compose up -d

docker-compose logs -f

docker system prune

If you try a setup like this, let me know how it goes. I have mine on a WD blue 1Tb SSD right now and it can almost max out the gigabit connection… ALMOST!

1 Like