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:
Installing Docker via your package manager may install an unsupported out of date version. It is recommended to install it via Docker's official install instructions, which can be found here
The Simplest Method
If you have a Linux machine that already has Docker pre-installed, please just run the following commands:
~ $ git clone https://github.com/lancachenet/docker-compose/ lancache --depth=1
~ $ 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. The cache will try to keep around10g
free space (seeMIN_DISK_FREE
), but you may want to pick an appropriate size that leaves some space available for other data. The size should be in gigabytes (suffixg
) or terabytes (suffixt
). (For very large sizes you should understand whatCACHE_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.