Have you ever wondered who’s secretly using your home Wi-Fi while you’re watching your favorite show?
There is a free and open source tool, WatchYourLAN, they we can deploy and use with Docker to check precisely that.
Why using WatchYourLAN?
Imagine that there would be a tool, where in real-time, you see a list of devices connected to your network. There’s your TV, laptop, smartphone… and wait, what’s that unfamiliar device?
With WatchYourLAN, you can ensure that your home network remains both private and optimized for your use.
And the best of all, we can have it running in less than 5 minutes.
How to check devices connected at home?
You can find the project details at aceberg’s Github (great job!)
Watch your LAN - Docker container
One recurrent topic that has to be addressed in the first place is to setup docker in our machine.
You can install Docker and Docker-compose with:
apt-get update && sudo apt-get upgrade && curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh && docker version
apt install docker-compose -y
Having Docker to help us actually makes the installation of WatchYourLAN pretty simple.
We just need to use the DockerHub Image of WatchYourLAN that you can find here.
And this simple configuration file to give the instructions to Docker that we want to deploy WatchYourLAN:
---
version: "3"
services:
wyl:
image: aceberg/watchyourlan
container_name: watchyourlan
network_mode: "host"
restart: unless-stopped
volumes:
- /home/your_user/Docker/watchyourlan/wyl:/data
environment:
TZ: Europe/Paris # required: needs your TZ for correct time
IFACE: "eth0" # required: 1 or more interface, use the command 'ip link conf' and use the second entry
DBPATH: "/data/db.sqlite" # optional, default: /data/db.sqlite
GUIIP: "0.0.0.0" # optional, default: localhost
GUIPORT: "8840" # optional, default: 8840
TIMEOUT: "120" # optional, time in seconds, default: 60
SHOUTRRR_URL: "" # optional, set url to notify
THEME: "darkly" # optional
Deploy WatchYourLan Docker with CLI
Providing that the previous steps are clear, we can jump to our terminal and use:
sudo nano docker-compose.yml
This will open a text editor, where we can paste the following configuration file:
To save, use CTRL+O, then CTRL+X to exit.
Then just deploy the service with:
sudo docker-compose up -d
You are ready to discover the devices in your network with WatchYourLan, the service will be running in 0.0.0.0:8840 or localhost:8840 if you use the configuration file as it is provided.
Deploy WatchYourLan Docker with Portainer
If you are not confortable with the terminal, you can always install Portainer with Docker.
Then you just need to paste the configuration file above as a new Portainer stack, and you will have deployed WatchYourLAN with Docker, but with a GUI.
FAQ
How to Deploy Nginx Proxy Manager
If you are interested in deploying a separated NGINX instance with Docker, I already created a guide for that here.
How to check server performance?
If you are already confortable with monitoring who is connected to your LAN and now want to see how is some server performing, you can check this guide to deploy NetData with Docker - A F/OSS tool to monitor server performance.