Skip to content

Ajnasz/wolweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WolWeb

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.

image

Configuration

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"

Usage

$ wolweb -config /path/to/config.yaml

Customizing the listening address and port

You 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 :8080

Building the Golang App

To build the WolWeb application from source, follow these steps:

  1. Ensure you have Go installed on your system. You can download it from golang.org.
  2. Clone the repository:
git clone https://github.com/Ajnasz/wolweb.git
cd wolweb
  1. Build the UI
cd ui/wolweb
npm install
npm run build
  1. Build the application:
go build -o wolweb
  1. The wolweb executable will be created in the current directory. You can now run it using:
./wolweb

Building the Docker Image

To build the WolWeb application as a Docker image, follow these steps:

  1. Clone the repository:
git clone https://github.com/Ajnasz/wolweb.git
  1. Build the Docker image:
docker build -t wolweb .

Running the Docker Container

  1. Create a configuration file named config.yaml with the MAC addresses of the devices you want to wake up. You can use the example configuration provided above.

  2. 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
  1. Run the Docker container:
docker run -d --network host -v $PWD/config.yaml:/app/config.yaml ghcr.io/ajnasz/wolweb:v1.1.2

You 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.

Running as a Systemd Service

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.target

Replace /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

About

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.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors