A lightweight Docker container that provides a REST API for sending Wake-on-LAN (WoL) magic packets to wake up devices on your network.
- Web GUI for easy testing and manual wake requests
- Simple REST API endpoint to send WoL packets
- Accepts MAC addresses via POST requests
- Optional custom broadcast address support
- Health check endpoint
- Runs on Unraid and other Docker hosts
- Download all files to a directory on your Unraid server
- Navigate to the directory in terminal
- Run:
docker-compose up -d
```bash
docker build -t wol-rest-api .
docker run -d
--name wol-rest-api
--network host
--restart unless-stopped
wol-rest-api
```
Add a new container in Unraid with these settings:
- Repository: Build from the Dockerfile or push to Docker Hub
- Network Type: Host (required for WoL broadcasts)
- Port: 3000
Open your browser and navigate to: ``` http://your-unraid-ip:3000 ```
The web interface provides a simple form to:
- Enter MAC addresses with auto-formatting
- Optionally specify a custom broadcast address
- Send WoL packets with visual feedback
- See success/error messages instantly
```bash curl http://localhost:3000/health ```
```bash
curl -X POST http://localhost:3000/wake
-H "Content-Type: application/json"
-d '{"mac": "00:11:22:33:44:55"}'
```
```bash
curl -X POST http://localhost:3000/wake
-H "Content-Type: application/json"
-d '{"mac": "00:11:22:33:44:55", "broadcast": "192.168.1.255"}'
```
Send a Wake-on-LAN magic packet to a device.
Request Body: ```json { "mac": "00:11:22:33:44:55", "broadcast": "255.255.255.255" } ```
mac(required): MAC address in formatXX:XX:XX:XX:XX:XXorXX-XX-XX-XX-XX-XXbroadcast(optional): Broadcast address (defaults to255.255.255.255)
Success Response: ```json { "success": true, "message": "Wake-on-LAN packet sent successfully", "mac": "00:11:22:33:44:55", "broadcast": "255.255.255.255" } ```
Check if the API is running.
Response: ```json { "status": "ok", "message": "WoL REST API is running" } ```
- Network Mode: The container must use
hostnetwork mode to send broadcast packets - Firewall: Ensure UDP port 9 (WoL default) is not blocked
- Target Devices: Devices must have Wake-on-LAN enabled in BIOS/UEFI and network adapter settings
- If WoL packets aren't working, verify the target device supports WoL
- Check that the container is using host network mode
- Ensure the MAC address format is correct
- Try specifying your subnet's broadcast address explicitly
PORT: Server port (default: 3080)