Wake-on-LAN Setup
Wake-on-LAN (WOL) allows your server to be powered on remotely by sending a special network packet.
How It Works
Section titled “How It Works”- Your server’s NIC receives a “magic packet” containing its MAC address
- The NIC signals the motherboard to power on
- The system boots normally
Prerequisites
Section titled “Prerequisites”- Ethernet connection (WiFi WOL is rarely supported)
- Motherboard/BIOS with WOL support
- NIC with WOL capability
- Server must be in S5 (soft-off) state
BIOS/UEFI Configuration
Section titled “BIOS/UEFI Configuration”Enter BIOS setup (usually Del, F2, or F12 at boot) and enable:
| Setting | Common Names |
|---|---|
| Wake-on-LAN | WOL, Wake on LAN, Power On by PCI-E |
| Network Boot | PXE Boot, Network Stack (not required, but often in same menu) |
| Deep Sleep | Disable if WOL not working |
Location varies by manufacturer:
- ASUS: Advanced → APM Configuration → Power On By PCI-E
- MSI: Settings → Advanced → Wake Up Event Setup → Resume By PCI-E Device
- Gigabyte: Power → Wake on LAN
- Dell: Power Management → Wake on LAN
- HP: Power → Hardware Power Management → S5 Wake on LAN
Linux Network Configuration
Section titled “Linux Network Configuration”Some NICs require WOL to be explicitly enabled at the OS level before shutdown.
Check current status
Section titled “Check current status”sudo ethtool eth0 | grep Wake-ong= WOL enabled (magic packet)d= WOL disabled
Enable WOL
Section titled “Enable WOL”sudo ethtool -s eth0 wol gMake persistent
Section titled “Make persistent”The setting resets on reboot. To persist:
systemd (recommended)
Section titled “systemd (recommended)”Create /etc/systemd/system/wol.service:
[Unit]Description=Enable Wake-on-LANAfter=network.target
[Service]Type=oneshotExecStart=/usr/sbin/ethtool -s eth0 wol g
[Install]WantedBy=multi-user.targetEnable it:
sudo systemctl enable wol.serviceNetworkManager
Section titled “NetworkManager”nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic/etc/network/interfaces (Debian)
Section titled “/etc/network/interfaces (Debian)”auto eth0iface eth0 inet dhcp ethernet-wol gFinding Your MAC Address
Section titled “Finding Your MAC Address”ip link show eth0# Look for "link/ether aa:bb:cc:dd:ee:ff"Or:
cat /sys/class/net/eth0/addressTesting WOL
Section titled “Testing WOL”From another machine on the same network:
# Install wakeonlansudo apt install wakeonlan
# Send magic packetwakeonlan aa:bb:cc:dd:ee:ffYour server should power on within a few seconds.
Troubleshooting
Section titled “Troubleshooting”Server doesn’t wake
Section titled “Server doesn’t wake”- Check BIOS settings - WOL must be enabled
- Check NIC settings - Run
ethtool eth0to verify WOL is enabled - Check power state - Server must be in S5 (soft shutdown), not hard powered off
- Check network - Sender must be on same broadcast domain
- Check MAC address - Verify the correct MAC is configured
WOL works once then stops
Section titled “WOL works once then stops”- NIC WOL setting may reset after shutdown
- Create a systemd service to re-enable on boot (see above)
Deep sleep issues
Section titled “Deep sleep issues”Some systems enter S4 (hibernate) or disconnect NIC in sleep:
- Disable “Deep Sleep” or “ErP” in BIOS
- Ensure “Power On After Power Failure” is enabled
Testing from articwake
Section titled “Testing from articwake”After configuring your server, test from articwake:
# SSH into the Pissh root@<articwake-ip>
# Install wakeonlanapk add wakeonlan
# Test directlywakeonlan aa:bb:cc:dd:ee:ff