.. | ||
readme.md |
WatchYourLAN
guide-by-example
Purpose & Overview
Monitor LAN with regular IP scans.
Simple webgui ip scanner with notification when new unknown MAC address appears.
Backend is written in Go.
Files and directory structure
/home/
└── ~/
└── docker/
└── watchyourlan/
├── 🗋 .env
└── 🗋 docker-compose.yml
.env
- a file containing environment variables for docker composedocker-compose.yml
- a docker compose file, telling docker how to run the container
Compose
Of note is the network_mode
being set to host
,
which means that the container shares the IP with the docker-host
and is on the docker-host network, likely the main netowork,
not some virtual docker network.
docker-compose.yml
services:
watchyourlan:
image: aceberg/watchyourlan
container_name: watchyourlan
hostname: watchyourlan
network_mode: host
env_file: .env
restart: unless-stopped
volumes:
- ./watchyourlan_data:/data
.env
# GENERAL
TZ=Europe/Bratislava
IFACE="ens33"
GUIIP: "10.0.19.4"
GUIPORT="8840"
THEME="darkly"
To get variables IFACE
and GUIIP
for the .env
file,
ssh to docker-host and ip r
Reverse proxy
Caddy v2 is used, details here.
Because of the container running in a host network mode, the IP of the docker-host is used instead of just some container hostname.
Caddyfile
lan.{$MY_DOMAIN} {
reverse_proxy 10.0.19.4:8840
}
Notifications
WatchYourLAN uses Shoutrrr
for notifications.
If using ntfy like me,
one just uses generic webhook notation of shoutrrr.
In Config:
- Shoutrrr URL:
generic+https://ntfy.example.com/LAN_home
Trouble shooting
Update
Manual image update:
docker compose pull
docker compose up -d
docker image prune