Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

LANCache Game Download/Update Caching Server (Flatcar Container Linux Config)

This project provides Flatcar Container Linux configurations for setting up a LANCache server, based on the LinusTechTips WhaleLAN LANCache server build video. LANCache dramatically reduces internet bandwidth usage during LAN parties by caching game downloads and updates locally.

Config Versions

  • Simple Version: Single disk installation for basic setups
  • Video Version: Advanced configuration with LACP network bonding and 4-disk RAID0 array (as featured in the LTT video)

Required Customizations

Before using either config, you must update:

  • SSH public key: Replace with your own key for secure access

    passwd:
    users:
        - name: core
        ssh_authorized_keys:
            - "INSERT YOUR SSH PUBLIC KEY HERE"
    
  • Disk ID: Set the correct disk identifier for your storage devices (may need to boot a live environment to determine these)

    storage:
    disks:
        - device: "/dev/disk/by-id/nvme-KIOXIA_KCMYXRUG15T3_<SERIAL1>"
        wipe_table: true
    filesystems:
        - device: "/dev/disk/by-id/nvme-KIOXIA_KCMYXRUG15T3_<SERIAL1>-part1"
        path: "/mnt/lancache"
        format: "xfs"
        label: "lancache"
        wipe_filesystem: true
    
  • Network settings: Adjust static IP addresses to match your network

        - path: /etc/systemd/network/10-br0-net.network
        contents:
            inline: |
            [Match]
            Name=br0
    
            [Network]
            Address=10.0.0.20/24
            Gateway=10.0.0.1
            DNS=1.1.1.1
            DNS=8.8.8.8
    
        - name: lancache-dns.service
        enabled: true
        contents: |
            [Unit]
            Description=LANCache-DNS Docker Container
            After=docker.service
            Requires=docker.service
    
            [Service]
            ExecStart=/usr/bin/docker run \
            --name lancache-dns \
            --rm \
            --publish 10.0.0.20:53:53/udp \
            --publish 10.0.0.20:53:53/tcp \
            -e USE_GENERIC_CACHE=true \
            -e LANCACHE_IP="10.0.0.20" \
            -e DNS_BIND_IP=10.0.0.20 \
            -e UPSTREAM_DNS="1.1.1.1 8.8.8.8" \
            lancachenet/lancache-dns:latest
            ExecStop=/usr/bin/docker stop lancache-dns
            Restart=always
            RestartSec=5
    
            [Install]
            WantedBy=multi-user.target
    

Installation Instructions

  1. Install Butane, which you'll need to convert the human-readable Butane config to a system-readable Ignition config:

    • Windows (in cmd)
      winget install butane
      
    • MacOS (in terminal, requires Homebrew):
      brew install butane
      
    • Debian/Ubuntu Linux:
      sudo apt install butane
      
  2. Customize your chosen config (simple version/human-config.yaml or video version/human-config.yaml) with your SSH key, disk IDs, and network settings.

  3. Convert the human-readable Butane config to a system-readable Ignition config:

    butane --pretty --strict human-config.yaml --output system-config.ign
    
  4. Install Flatcar using Ubuntu Server USB:

    • Create an Ubuntu Server install USB by downloading the ISO and flashing it to a USB stick with BalenaEtcher or Rufus
    • Boot Ubuntu Server installer and drop into terminal (Ctrl+Alt+F2)
    • Download Flatcar installer: wget https://raw.githubusercontent.com/flatcar/init/flatcar-master/bin/flatcar-install
    • Make executable: chmod +x flatcar-install
    • Find your target disk: lsblk (e.g., /dev/sda)
    • Upload your system-config.ign to pastie.io and copy the raw URL
    • Download config: wget https://pastie.io/raw/your-paste-id -O config.ign
    • Install: sudo ./flatcar-install -d /dev/sda -i config.ign

About

Example config files from the LinusTechTips "WhaleLAN LAN Cache" video, designed to easily deploy a LAN Cache server with Flatcar Container Linux

Resources

Stars

93 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors