Home

Awesome

<h1><a href="https://github.com/aceberg/WatchYourLAN"> <img src="https://raw.githubusercontent.com/aceberg/WatchYourLAN/main/assets/logo.png" width="20" /> </a>WatchYourLAN</h1> <br/>

Docker Go Report Card Maintainability Docker Image Size (latest semver) GitHub Discussions

Lightweight network IP scanner with web GUI. Features:

Screenshot_1

More screenshots

<details> <summary>Expand</summary>

Screenshot_5
Screenshot_2
Screenshot_3
Screenshot_4

</details>

Quick start

<details> <summary>Expand</summary>

Replace $YOURTIMEZONE with correct time zone and $YOURIFACE with network interface you want to scan. Network mode must be host. Set $DOCKERDATAPATH for container to save data:

docker run --name wyl \
	-e "IFACES=$YOURIFACE" \
	-e "TZ=$YOURTIMEZONE" \
	--network="host" \
	-v $DOCKERDATAPATH/wyl:/data/WatchYourLAN \
    aceberg/watchyourlan

Web GUI should be at http://localhost:8840

</details>

Auth

<details> <summary>Expand</summary>

WatchYourLAN does not have built-in auth option. But you can use it with SSO tools like Authelia, or my simple auth app ForAuth.
Here is an example docker-compose-auth.yml.

:warning: WARNING!
Please, don't forget that WYL needs host network mode to work. So, WYL port will be exposed in this setup. You need to limit access to it with firewall or other measures.

</details>

Install on Linux

<details> <summary>Expand</summary>

All binary packages can be found in latest release. There are .deb, .rpm, .apk (Alpine Linux) and .tar.gz files.

Supported architectures: amd64, i386, arm_v5, arm_v6, arm_v7, arm64.
Dependencies: arp-scan, tzdata.

For amd64 there is a deb repo available

</details>

Config

<details> <summary>Expand</summary>

Configuration can be done through config file, GUI or environment variables. Variable names is config_v2.yaml file are the same, but in lowcase.

Basic config

VariableDescriptionDefault
TZSet your timezone for correct time
HOSTListen address0.0.0.0
PORTPort for web GUI8840
THEMEAny theme name from https://bootswatch.com in lowcase or additionalsand
COLORBackground color: light or darkdark
NODEPATHPath to local node modules
SHOUTRRR_URLWatchYourLAN uses Shoutrrr to send notifications. It is already integrated, just needs a correct URL. Examples for Discord, Email, Gotify, Matrix, Ntfy, Pushover, Slack, Telegram, Generic Webhook and etc are here

Scan settings

VariableDescriptionDefault
IFACESInterfaces to scan. Could be one or more, separated by space. See docs/VLAN_ARP_SCAN.md.
TIMEOUTTime between scans (seconds)120
ARP_ARGSArguments for arp-scan. Enable debug log level to see resulting command. (Example: -r 1). See docs/VLAN_ARP_SCAN.md.
ARP_STRS ARP_STRS_JOINEDSee docs/VLAN_ARP_SCAN.md.
LOG_LEVELLog level: debug, info, warn or errorinfo
TRIM_HISTRemove history after (hours)48
HIST_IN_DBStore History in DB - if false, the History will be stored only in memory and will be lost on app restart. Though, it will keep the app DB smaller (and InfluxDB is recommended for long term History storage)false
USE_DBEither sqlite or postgressqlite
PG_CONNECTAddress to connect to PostgreSQL. (Example: postgres://username:password@192.168.0.1:5432/dbname?sslmode=disable). Full list of URL parameters here

InfluxDB2 config

This config matches Grafana's config for InfluxDB data source

VariableDescriptionDefaultExample
INFLUX_ENABLEEnable export to InfluxDB2falsetrue
INFLUX_SKIP_TLSSkip TLS Verifyfalsetrue
INFLUX_ADDRAddress:port of InfluxDB2 serverhttps://192.168.2.3:8086/
INFLUX_BUCKETInfluxDB2 buckettest
INFLUX_ORGInfluxDB2 orghome
INFLUX_TOKENSecret token, generated by InfluxDB2
</details>

Config file

<details> <summary>Expand</summary>

Config file name is config_v2.yaml. Example:

arp_args: ""
color: dark
hist_in_db: false
host: 0.0.0.0
ifaces: enp4s0
influx_addr: ""
influx_bucket: ""
influx_enable: false
influx_org: ""
influx_skip_tls: false
influx_token: ""
log_level: info
nodepath: ""
pg_connect: ""
port: "8840"
shoutrrr_url: "gotify://192.168.0.1:8083/AwQqpAae.rrl5Ob/?title=Unknown host detected&DisableTLS=yes"
theme: sand
timeout: 60
trim_hist: 48
use_db: sqlite
</details>

Options

<details> <summary>Expand</summary>
KeyDescriptionDefault
-dPath to config dir/data/WatchYourLAN
-nPath to node modules (see below)
</details>

Local network only

<details> <summary>Expand</summary>

By default, this app pulls themes, icons and fonts from the internet. But, in some cases, it may be useful to have an independent from global network setup. I created a separate image with all necessary modules and fonts. Run with Docker:

docker run --name node-bootstrap          \
    -p 8850:8850                          \
    aceberg/node-bootstrap
docker run --name wyl \
	-e "IFACES=$YOURIFACE" \
	-e "TZ=$YOURTIMEZONE" \
	--network="host" \
	-v $DOCKERDATAPATH/wyl:/data/WatchYourLAN \
    aceberg/watchyourlan -n "http://$YOUR_IP:8850"

Or use docker-compose

</details>

API & Integrations

<details> <summary>Expand</summary>

API

Moved to docs/API.md

Integrations

</details>

Thanks

<details> <summary>Expand</summary> </details>