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?

With WatchYourLAN, you can ensure that your home network remains both private and optimized for your use.

  • With WatchYourLAN, you can:
    • 👁️ Monitor Your Network: Keep track of all devices connected to your network in real-time, ensuring that only authorized devices are accessing your network.
    • 🔒 Enhance Privacy: Identify any unfamiliar or unauthorized devices connected to your network, enhancing the privacy and security of your home network.
    • ⏱️ Quick Setup: Get up and running with WatchYourLAN in less than 5 minutes, thanks to its simple and intuitive setup process.

And the best of all, we can have WatchYourLAN 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!)

SelfHosting WatchYourLAN

Pre-Requisites!! Just Get Docker 🐋

Important step and quite recommended for any SelfHosting Project - Get Docker Installed

It will be one command, this one, if you are in Linux:

apt-get update && sudo apt-get upgrade && curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh && docker version

And install also Docker-compose with:

apt install docker-compose -y

Having Docker to help us actually makes the installation of WatchYourLAN pretty simple.

WatchYourLAN Docker Compose

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 do I Deploy Nginx Proxy Manager?

  • If you’re interested in deploying a separate NGINX instance with Docker, I’ve created a comprehensive guide for that here.
    • Easy management of reverse proxy configurations.
    • Secure access control with SSL/TLS encryption.
    • Simple integration with various web services and applications.

How can I Check Server Performance?

  • Once you’re comfortable with monitoring who is connected to your LAN and want to monitor server performance, you can follow this guide to deploy NetData with Docker. NetData is a free and open-source tool for monitoring real-time system and application metrics.
    • Real-time monitoring of system performance metrics.
    • Comprehensive visualization of server health and resource usage.
    • Lightweight and easy to install, suitable for a wide range of systems.