This Node.js application allows to connect to a web interface and trigger a magic packet that will wake another device on the network through its ethernet adapter.
The easiest is probably to use the provided docker image. The image expects 3 environment variables to be present:
$ export WOL_TARGET_IP=192.168.0.123
$ export WOL_TARGET_MAC=00:00:00:00:00:00
$ export WOL_PASSPHRASE=your_l0ng_but_easy_to_remember_passphrase
The first is the local IP of the device to wake (for upstate monitoring). The second is the MAC address of the adapter that will receive the magic packet and needs to wake up. Finally, the last one is the passphrase that will allow anyone with access to the web interface to send this Wake-on-LAN command.
Choose a password that is long and complex enough.
docker run
docker run --network="host" -d vbersier/svelte-wol:latest
services:
wol:
image: vbersier/svelte-wol:latest
restart: unless-stopped
# host mode is needed for UDP broadcast
network_mode: host
environment:
WOL_TARGET_IP: '192.168.0.123'
WOL_TARGET_MAC: 00:00:00:00:00:00
WOL_PASSPHRASE: your_l0ng_but_easy_to_remember_passphrase
This web interface is not automatically accessible through the internet. You could, for instance, forward port 3000
in
your firewall to the device running svelte-wol
, and then accessing it through its public IP.
You could also use a dynDNS service to have a domain name always pointing to your device's public IP.
Finally, you could use something like Cloudflare Tunnel to setup a permanent tunnel to your local webserver through a custom domain.