Relay Wake-on-LAN (WOL) packets between multiple networks or interfaces. This is useful for environments where devices are on separate subnets and need to be woken up remotely.
- Listens for WOL packets on specified interfaces
- Relays valid WOL packets to all other monitored networks
- Prevents packet loops and duplicate broadcasts
- Lightweight and easy to deploy (single binary or Docker image)
Add the following service to your compose.yaml to relay WOL packets between
the eno1 and eno2 network interfaces:
services:
wol-relay:
image: ghcr.io/danroc/wol-relay:latest
container_name: wol-relay
network_mode: host
command: eno1 eno2
security_opt:
- no-new-privileges:true
restart: unless-stoppedNote:
network_mode: hostis required for the container to access host network interfaces and broadcast packets.
You can also run the relay directly on your host:
# Build the binary
go build
# Run the relay
sudo ./wol-relay eno1 eno2Replace eno1 and eno2 with the names of your network interfaces.
- Go 1.24+ (for building from source)
- Sufficient privileges to access network interfaces and send broadcast packets
-
Run tests:
go test ./... -
Build Docker image:
docker build -t wol-relay .