- Notifications
You must be signed in to change notification settings - Fork12
🦭 Wake up your devices with a single command or click. A Wake-On-LAN tool that works via CLI and web interface.
License
Trugamr/wol
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A CLI tool to send Wake-On-LAN (WOL) magic packets to wake up devices on yournetwork. Features both CLI commands and a web interface.
- Send WOL magic packets via CLI or web interface
- Configure multiple machines with names for easy access
- List configured machines
- Web interface for easy wake-up
- Docker support
Download the latest release for your platform from thereleases page.
Available for:
- Linux (x86_64, arm64, armv7)
- macOS (x86_64, arm64)
- Windows (x86_64)
go install github.com/trugamr/wol@latest
docker run --network host -v$(pwd)/config.yaml:/etc/wol/config.yaml ghcr.io/trugamr/wol:latest
Or using docker-compose:
# Method 1: Using bind mountservices:wol:image:ghcr.io/trugamr/wol:latestcommand:serve# To start the web interfacenetwork_mode:"host"volumes: -./config.yaml:/etc/wol/config.yaml# Method 2: Using environment variablesservices:wol:image:ghcr.io/trugamr/wol:latestcommand:serve# To start the web interfacenetwork_mode:"host"environment:WOL_CONFIG:| machines: - name: desktop mac: "00:11:22:33:44:55" ip: "192.168.1.100" # Optional, for status checking - name: server mac: "AA:BB:CC:DD:EE:FF" ip: "server.local" server: listen: ":7777" # Optional, defaults to :7777 ping: privileged: false # Optional, set to true to use privileged ping
Check outexamples/reverse-proxy.yml
for an example of running wol behindreverse proxy with basic auth, https etc.
Note
The config file should be mounted to/etc/wol/config.yaml
inside thecontainer. Host networking is recommended for Wake-on-LAN packets to workproperly on your local network.
Create aconfig.yaml
file in one of these locations (in order of precedence):
./config.yaml
(current directory)~/.wol/config.yaml
(home directory)/etc/wol/config.yaml
(system-wide)
Alternatively, you can provide the configuration via theWOL_CONFIG
environment variable:
export WOL_CONFIG='machines: - name: desktop mac: "00:11:22:33:44:55" ip: "192.168.1.100" # Optional, for status checking - name: server mac: "AA:BB:CC:DD:EE:FF" ip: "server.local"server: listen: ":7777" # Optional, defaults to :7777'
Example configuration:
machines: -name:desktopmac:"00:11:22:33:44:55"ip:"192.168.1.100"# Optional, for status checking -name:servermac:"AA:BB:CC:DD:EE:FF"ip:"server.local"server:listen:":7777"# Optional, defaults to :7777ping:privileged:false# Optional, set to true if you need privileged ping
# List all configured machineswol list# Wake up a machine by namewol send --name desktop# Wake up a machine by MAC addresswol send --mac"00:11:22:33:44:55"# Start the web interfacewol serve# Show version informationwol version
The web interface is available athttp://localhost:7777
when running the servecommand. It provides:
- List of all configured machines
- One-click wake up buttons
- Real-time machine status monitoring (when IP is configured)
- Version information
- Links to documentation and support
# Clone the repositorygit clone https://github.com/trugamr/wol.gitcd wol# Buildgo build# Run./wol
When running in a Docker container, the machine status feature that uses ping may not work due to permission issues. This is because the application usespro-bing for sending pings, which requires specific Linux kernel settings.
To fix this issue, you need to set the following sysctl parameter on your host system:
sysctl -w net.ipv4.ping_group_range="0 2147483647"
To make this change persistent, add it to your/etc/sysctl.conf
file.
You can also try experimenting with settingping.privileged: true
in your configuration as an alternative solution.
For more details, seeissue #12.
This project is licensed under the MIT License. See theLICENSEfile for details.
Contributions are welcome! Feel free to open issues or submit pull requests.
About
🦭 Wake up your devices with a single command or click. A Wake-On-LAN tool that works via CLI and web interface.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.