LocoNS

Simple mDNS server supporting only A and AAAA records. It aims to be as simple as possible and not to fullfil all mDNS needs.

Running

While you can start application on its own, I personally prefer to use it in Docker. To start it use something like this:

docker run \
    -v /etc/hosts:/etc/hosts \
    --network=host \
    medo64/locons:latest

Alternatively, you can use compose.yaml

Configuration

The following environment variables can further configure the system:

VariableDefaultDescription
DEFAULT_TTL90Default TTL to use when sending responses
IPanyList of comma-separated IP addresses to bind to
MINIMUM_TTL60Minimum TTL when learning hosts from responses; will apply even for 0 TTLs
NO_HOSTSfalseIf set to true, mDNS will not read /etc/hosts file
NO_LEARNfalseIf set to true, mDNS will not learn from observed network responses
PREFER_LEARNEDfalseIf set to true, IP response will be ordered to prefer learned addresses

The following environment variables are for troubleshooting purposes and usually require no configuration:

VariableDefaultDescription
LOG_LEVELInformationOne of log levels: Verbose, Debug, Information, Warning, Error, Fatal
USE_INOPERABLE_INTERFACESfalseIf true, engine will also use interfaces that are reported inoperable
USE_UNSUPPORTED_INTERFACESfalseIf true, engine will also use interfaces that don’t support multicast
Install via repository:
wget -O- http://packages.medo64.com/keys/medo64.asc \
    | sudo tee /etc/apt/trusted.gpg.d/medo64.asc

echo "deb http://packages.medo64.com/deb stable main" \
    | sudo tee /etc/apt/sources.list.d/medo64.list

sudo apt-get update
sudo apt-get install locons
Dockerhub

Docker pull command:
docker pull medo64/locons
GitHub Repository (MIT License)

Clone repository:
git clone https://github.com/Medo64/LocoNS.git