Quickstart

Prerequisites

The best and quickest way is to get started with lancache.net is to use the quickstart. Before you begin make sure you have:

The Simplest Method

If you have a Linux machine that already has Docker pre-installed, please just run the following commands:

Terminal

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

~ $ cd lancache

~/lancache $ nano .env

~/lancache $ docker-compose up -d

# => Configure your router to serve ONLY lancache-dns

This should bring up a fully functional LanCache and DNS container, and an SNI Proxy to handle passthrough of https traffic.

It's always DNS

It's very important the lancache-dns is the ONLY dns server given out to your clients. Any other dns servers should be configured using the UPSTREAM_DNS option in the .env file.

More Detail

When you edit the .env file most users are going to need to make the following changes:

  • LANCACHE_IP should be set to the ip address that you wish your DNS to hand out for your cache container. In normal operation this would be the ip of the box running your cache.
  • DNS_BIND_IP can be commented out in a simple setup or you can choose the ip address of your dns container (which could be the same as your lancache ip)
  • CACHE_ROOT is where you want to store the cached data. For best practice we recommend a mount point on a separate volume from your OS.
  • CACHE_DISK_SIZE ensure this matches the size of the volume you have the cache root on. Remember to leave some space available. The size should be in either megabytes (suffix m) or gigabytes (suffix g). (For very large sizes you should understand what CACHE_INDEX_SIZE does)
Common Issues

Be sure to check the common issues page if you have any problems setting up your server.

More Advanced Information

If you want to play with advanced installation and further configuration options we recommend starting with one of the guides below. For detailed install instructions have a look at one of the following guides.