Forbidden Router: Container Host VM (LanCache/SteamCache + Pihole) and Portainer for management

I agree @GumbyGreen this needs to changed @wendell

needs to be

yum-config-manager -–add-repo https://download.docker.com/linux/centos/docker-ce.repo

Just nissing the second “-” before add-repo

It may be me though. I’m using a AlmaLinux 9 CT instead of VM via Proxmox.

I also had to edit

version: '2'
services:
  dns:
    image: lancachenet/lancache-dns:latest
    env_file: .env
#    restart: unless-stopped
    ports:
      - ${DNS_BIND_IP}:53:53/udp
      - ${DNS_BIND_IP}:53:53/tcp

## HTTPS requests are now handled in monolithic directly
## you could choose to return to sniproxy if desired
#
#  sniproxy:
#    image: lancachenet/sniproxy:latest
#    env_file: .env
#    restart: unless-stopped
#    ports:
#      - 443:443/tcp

  monolithic:
    image: lancachenet/monolithic:latest
    env_file: .env
#    restart: unless-stopped
    ports:
      - 192.168.1.3:80:80/tcp
      - 192.168.1.3:443:443/tcp
    volumes:
# setup paths that make sense on your host, this one
# is for mine
      - ${CACHE_ROOT}/cache:/data/cache
      - ${CACHE_ROOT}/logs:/data/logs

I had to change env_file: .env to env_file: ./stack.env BUT it may have been partly due to a permissions error on the drive I wanted to cache to.

All in all SUPER HAPPY

Can you elaborate more about how did this? I’m running into the same error as you. I’ve got pihole working without issue, but everytime I try to deploy the stack for lancache, it fails because of the .env file.

1 Like

I had to modify the example container I changed one line from env_file: .env to env_file: ./stack.env… I just had to add ./stack infront of .env. I also changed the “ports” for my setup but I think that’s in instructions.

Here is @wendell’s example that I modified so it would work for me with my set up. Sorry for delay busy weekend. Here’s the easy cut and paste version if you wanna try it.

version: '2'
services:
  dns:
    image: lancachenet/lancache-dns:latest
    env_file: ./stack.env
#    restart: unless-stopped
    ports:
      - ${DNS_BIND_IP}:53:53/udp
      - ${DNS_BIND_IP}:53:53/tcp

## HTTPS requests are now handled in monolithic directly
## you could choose to return to sniproxy if desired
#
#  sniproxy:
#    image: lancachenet/sniproxy:latest
#    env_file: .env
#    restart: unless-stopped
#    ports:
#      - 443:443/tcp

  monolithic:
    image: lancachenet/monolithic:latest
    env_file: ./stack.env
#    restart: unless-stopped
    ports:
      - 192.168.1.3:80:80/tcp
      - 192.168.1.3:443:443/tcp
    volumes:
# setup paths that make sense on your host, this one
# is for mine
      - ${CACHE_ROOT}/cache:/data/cache
      - ${CACHE_ROOT}/logs:/data/logs

has anyone been able to run Lan Cache in an Ubuntu VM? has anyone been able to run Lan Cache AND Home Assistant? and if so how since you loose local DNS host name thanks in part to Lan Cache?

1 Like

You can add more than one IP to the host and map one IP to one and the other IP to the other

Does ha still run on a different port? If so the same PC name but different ports should work for ha and cache.

Steam uses port 80/443. Ha can use port 8123 for example

1 Like

@wendell So silly question…because it’s overkill I’m sure but I do love my speeeeeeddddd. I have my proxmox set up using the 10G nic installed, but Lancache seems limited to 90-120MB/s (when cache hits of course)I know this can be limited by sizes of the file chunks depending on the service… do I need to set the link speed in portainer/docker/stack or containers to utilize that speed? Just wondering. I know the disks running it play a part as well but I have 3 zfs mirrors in the set and I’d think it would be a little faster? I did also have a little problem with loosing DNS on restarting my host, but fixed it when I saw the Restart Policies in each container in Portainer… this is so fun :slight_smile:

Hi,
I’ve just seen the post.
I’m not very active online…

Currently I’m only using OpenWrt, I had to replace pfSense due to MAP-T compability.

No I’m not running a local NTP server, all the machines uses online NTP servers. Technically (if I remember correctly) I have an NTP daemon server running in my OpenWrt VM.

My full setup run at about 80W. This is not a precise value its is the value read fromthe UPS. Under the UPS I have multiple devices like the switch the APs, ONT and the main server machine.

That consumption is with the HDD drives in a spin down state, when I access the data drives will spin up and the consumption can go up to 200W.

I live in a flat so I cannot proceed with this idea but I was thinking on how to go full solar for the 10h of light I can get on that system. so only during night it will draw power. With a cron joub I could also add a governor change and go to a powersave state instead of ondemand.

1 Like

So very true… I can attest to this.

So my Steam Cache portion was working great in my home network in my lab… I attempted to add another to PC to use the Steam Cache Server and internet seemed to work fine, all seemed well. Then I went to update/Install Games on this Entertainment Center PC… No updates and no installs would run. They just hung at 0%. No matter what game I tried or update I knew was cached.

Knowing my setup was a bastardization of this setup with a different firewall/DNS on separate devices I had “It’s always DNS” in my mind… and so it was… in a sense…lol

In all actuality, I had forgotten my Steam Cache was on a different subnet that was not allowed to access the other (IE a Wifi Network reaching back to my wired network). So while it was a DNS issue it was being able to reach said DNS that had messed me up.

So a quick edit to the firewall rules (Courtesy of Knowledge learned via @ThatGuyB and @PhaseLockedLoop) and boom, up and running downloads at full speed.

Just a weird quark I had, sure it’s not relevant to everyone, especially if they follow the whole guide in it’s entirety, but just thought I’d share the issue and my resolution. :slight_smile:

Just because this was such a fun experiment to run.

Welcome back :slight_smile:

1 Like

Thank you thank you…lol Ill still be lurking as i complete a few projects.

HA does work but, i forget which URL i need to use, lan cache seems to cause an infinite loop till the router CPU melts down. logic dictates a programmed a DNS loop but, that is not the case. no entry ever points back to the other. tried like 10 times over 3 years. the only thing i can figure is it does not like being in an ubuntu hyper V vm. i even checked that the switch doesn’t have any DNS settings or over rides.

there are a small few instances on the internet with the same issues but, no one ever found a resolution. is it even worth it now with the midwest fiber revolution? i only have 10gb from the home server to the switch everything else is 1gig.

EDIT: just got a new router, maybe LanCache will work now. i’m not sure if i should do lan cache i’ll still be mainly 1Gbps the only up side being 10G Uplinks. i suspect my raid 10 will saturate my 1Gbps but, a used unifi 24 port poe pro was was cheaper than a new unifi 24 port enterprise with the 2.5gbps ports. so for now i have to wonder how bad of grid lock that could cause saturating 1Gbps like that. the raid 10 is almost 1GB by 1GB for large files and closer to 700MB by 660MB when in use with NVR duty thats still enough to fire hose some 1Gb ports.