Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Setup instructions

HumanJHawkins edited this page Jul 24, 2018 · 7 revisions
  1. Install Docker if you don't have it:

    curl -sSL https://get.docker.com | sudo bash
    sudo usermod -aG docker $USER
    
  2. Install Docker Compose if you don't have it:

    COMPOSE_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/docker/compose/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$")
    sudo curl -o /usr/local/bin/docker-compose -L http://github.com/docker/compose/releases/download/$COMPOSE_VER/docker-compose-$(uname -s)-$(uname -m)
    sudo chmod +x /usr/local/bin/docker-compose
    sudo curl -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
    
    
  3. Clone this repo onto a volume with lots of storage space:

    git clone https://github.com/RyanEwen/lan-cache-docker.git
    
  4. Check for and handle (disable or reconfigure) existing services that listen on port 53, 80, or 443. To check:

    netstat -plnt
    

    How to handle any services you might find will depend on your use case. For cases where systemd-resolved is already listening on port 53 (i.e. Ubuntu 18.04 Server), a solution is described here: https://unix.stackexchange.com/a/358485/298673.

  5. Build docker images and spawn container instances:

    cd lan-cache-docker
    docker-compose up -d --build
    

    The containers will start up automatically at each boot, unless manually stopped.

  6. Test (optional but recommended). See How to test.

  7. Direct network traffic to your cache server:

    • Configure your router to use the cache server as a DNS server. Some routers have this setting on WAN settings page. Failing that, check the LAN settings page.
    • Alternatively you can configure individual machines by changing the DNS server address in their network settings.
Clone this wiki locally