Wake on LAN web application. WolWeb allows you to remotely wake up devices on your network using their MAC addresses. This is particularly useful for managing devices that support Wake-on-LAN (WoL) functionality.
To configure WolWeb, create a YAML file with the following structure. This file contains the MAC addresses of the devices you want to wake up.
If you set the host field, you will be able to ping the device to check if it is online.
config.yaml
PrivilegedPing: false
MacAddresses:
- name: "NAS"
address: "00:11:22:00:00:00"
host: "no.such.host.org"
- name: "Home Server"
address: "00:11:22:00:00:01"
host: "192.168.60.2"
- name: "File Server"
address: "00:11:22:00:00:02"
host: "192.168.60.3"
- name: "Media Center PC"
address: "00:11:22:00:00:03"$ wolweb -config /path/to/config.yamlYou can customize the address and port on which the WolWeb application listens by using the -address flag. The default address is :8951.
$ wolweb -config /path/to/config.yaml -address :8080To build the WolWeb application from source, follow these steps:
- Ensure you have Go installed on your system. You can download it from golang.org.
- Clone the repository:
git clone https://github.com/Ajnasz/wolweb.git
cd wolweb- Build the UI
cd ui/wolweb
npm install
npm run build- Build the application:
go build -o wolweb- The
wolwebexecutable will be created in the current directory. You can now run it using:
./wolwebTo build the WolWeb application as a Docker image, follow these steps:
- Clone the repository:
git clone https://github.com/Ajnasz/wolweb.git- Build the Docker image:
docker build -t wolweb .-
Create a configuration file named
config.yamlwith the MAC addresses of the devices you want to wake up. You can use the example configuration provided above. -
Pull the Docker image from the GitHub Container Registry or use the image you built in the previous step:
docker pull ghcr.io/ajnasz/wolweb:v1.1.2- Run the Docker container:
docker run -d --network host -v $PWD/config.yaml:/app/config.yaml ghcr.io/ajnasz/wolweb:v1.1.2You must mount the configuration file as /app/config.yaml in the container. You can replace $PWD/config.yaml with the actual path to your configuration file.
You will need to set the network mode to host to allow the container to access network devices.
To run the WolWeb application as a systemd service, create a file named wolweb.service in /etc/systemd/system/ with the following content:
[Unit]
Description=WolWeb Service
After=network.target
[Service]
ExecStart=/path/to/wolweb
Restart=always
User=nobody
Group=nogroup
Environment=PATH=/usr/bin:/usr/local/bin
WorkingDirectory=/path/to/working/directory
[Install]
WantedBy=multi-user.targetReplace /path/to/wolweb with the actual path to the wolweb executable and /path/to/working/directory with the working directory for the service.
You can now create the systemd service file and enable it using the following commands:
sudo systemctl daemon-reload
sudo systemctl enable wolweb.service
sudo systemctl start wolweb.service