Deployment guide

WatchYourLAN

Overview

WatchYourLAN is a lightweight, self-hosted network IP scanner with a modern web dashboard. It periodically arp-scans your local network, discovers every device it can see, and records each host's MAC address, IP address, name and vendor along with a full online and offline history. New or unknown devices are surfaced immediately, and every host is queryable through the web UI and a REST API.

This SecureAnyCloud image installs the pinned WatchYourLAN 2.1.4 static binary and runs it under systemd with its SQLite datastore. WatchYourLAN ships no login of its own, so the image is secure by default: the scanner binds only to the loopback interface, and nginx fronts it on port 80 with HTTP Basic Auth. A unique password is generated on the first boot of every VM.

What you get:

  • WatchYourLAN 2.1.4 (single static Go binary) running as the watchyourlan systemd service
  • Periodic arp-scan discovery of every host on the VM's primary network interface
  • A SQLite datastore at /var/lib/watchyourlan/scan.db that records hosts and their online/offline history
  • The WatchYourLAN web UI and REST API bound to 127.0.0.1:8840 (loopback only, never exposed directly)
  • nginx fronting the UI on :80 with HTTP Basic Auth and a unique password generated on first boot
  • watchyourlan.service and nginx.service as systemd units, enabled and active
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2s (2 vCPU / 4 GiB RAM) is a comfortable starting size, because WatchYourLAN is very light on resources.

In the network security group (NSG), allow inbound 22/tcp from your management network, 80/tcp for the web UI, and 443/tcp if you add TLS.

WatchYourLAN scans the network the VM is attached to, so deploy it on the VNet and subnet whose hosts you want to see. It serves plain HTTP on port 80. Terminate TLS in front of it with your own domain (see Maintenance).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for WatchYourLAN by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Select Review + create, then Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:watchyourlan-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name watchyourlan \
  --image sac1647283583153:watchyourlan-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name watchyourlan --port 80 --priority 1010

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

systemctl is-active watchyourlan.service nginx.service

Both services report active. WatchYourLAN serves its web UI and REST API on the loopback connector 127.0.0.1:8840, and nginx fronts the UI on port 80 with HTTP Basic Auth. The SQLite datastore lives at /var/lib/watchyourlan/scan.db.

Step 5 - Retrieve your web UI password

WatchYourLAN has no built-in login, so the image protects its web UI and REST API with nginx HTTP Basic Auth. The username is admin. A unique password is generated on the first boot of your VM and written to a root-only file. Read it with:

sudo cat /root/watchyourlan-credentials.txt

The file contains WATCHYOURLAN_USERNAME, WATCHYOURLAN_PASSWORD and the WATCHYOURLAN_URL to open in a browser. The password is stored on disk only as a bcrypt hash in /etc/nginx/.watchyourlan.htpasswd, so no plaintext password ships in the image. Store the password somewhere safe.

Step 6 - Confirm the health endpoint

nginx serves an unauthenticated health endpoint for load balancers and probes:

curl -s http://localhost/healthz

It returns ok. This endpoint never requires authentication, so you can use it for an Azure Load Balancer health probe.

Step 7 - Confirm authentication is enforced

A password is set on first boot, so an unauthenticated request to the web UI returns HTTP 401. Nobody reaches your dashboard without the password. The commands below read the per-VM password from the credentials file and test both cases: an unauthenticated request is rejected, and the correct password authenticates.

PW=$(sudo grep '^WATCHYOURLAN_PASSWORD=' /root/watchyourlan-credentials.txt | cut -d= -f2-)
echo "unauth: $(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1/)"
echo "authed: $(curl -s -o /dev/null -w '%{http_code}' -u admin:$PW http://127.0.0.1/)"

The output is unauth: 401 followed by authed: 200. The REST API sits behind the same Basic Auth. For example, the discovered hosts are available at /api/all and the running version at /api/version.

Step 8 - Sign in to the web UI

Browse to http://<vm-public-ip>/. Your browser prompts for a username and password. Enter admin and the password from Step 5.

WatchYourLAN opens on its dashboard, a table of every host it has discovered on your network. Each row shows the host's name, IP address, MAC address, hardware vendor and whether it is currently online. On a freshly deployed cloud VM, the table starts small and fills in as the periodic scan runs. On a busy LAN, it lists every device on the subnet.

Step 9 - Inspect a discovered host

Click any host to open its detail page. It shows the device's identity (name, IP, MAC and vendor) alongside the record of when it has been seen. Use this page to name and annotate the devices you recognize, so that unknown arrivals stand out.

Step 10 - Review the scan history

Open the History page to see how many hosts have been online over time. This timeline turns WatchYourLAN from a one-off scan into a continuous record of who is on your network and when.

Step 11 - Review the configuration page

Open the Config page to see the active settings: the interface being scanned, the scan interval, the theme and the datastore in use. The image writes these settings on first boot, and it detects the interface automatically from the VM's default route.

Step 12 - How scanning works

WatchYourLAN scans the VM's primary network interface on a fixed interval (120 seconds by default) using arp-scan, and records everything it finds in its SQLite datastore. Because it runs continuously, hosts that appear or disappear are captured in the history, and any new device on the subnet shows up on the next scan.

On a solo cloud VM, the scanner sees only a handful of neighbors. Deploy it on a subnet with the devices you care about to get the full picture.

You can trigger an immediate rescan from the web UI, or from the authenticated REST API:

PW=$(sudo grep '^WATCHYOURLAN_PASSWORD=' /root/watchyourlan-credentials.txt | cut -d= -f2-)
curl -s -o /dev/null -w '%{http_code}\n' -u admin:$PW http://127.0.0.1/api/all

The command prints 200, which confirms that the hosts API is reachable behind the Basic Auth proxy.

Maintenance

  • Password: the web UI password is set on first boot and stored as a bcrypt entry in /etc/nginx/.watchyourlan.htpasswd. To change it, run sudo htpasswd -B /etc/nginx/.watchyourlan.htpasswd admin, then sudo systemctl reload nginx.
  • Scanned interface and interval: the image writes the detected interface and defaults into /var/lib/watchyourlan/config_v2.yaml. To change the interface, the scan interval (TIMEOUT) or the history retention (TRIM_HIST), edit that file or use the Config page in the UI. Then run sudo systemctl restart watchyourlan.
  • Datastore: all WatchYourLAN state lives in /var/lib/watchyourlan/scan.db. Back up that file to preserve your host history.
  • Upgrades: WatchYourLAN is a single static binary at /usr/local/bin/watchyourlan. To upgrade, download a newer pinned release, verify its checksum, replace the binary and run sudo systemctl restart watchyourlan. Your datastore is preserved.
  • TLS: nginx fronts WatchYourLAN on plain HTTP port 80. Add TLS, for example with certbot and your own domain, before you expose it beyond a trusted network.
  • Security patches: unattended-upgrades stays enabled, so the OS continues to receive security updates automatically.

Support

SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.

Deploy on Azure

Launch WatchYourLAN on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure