Wake-on-LAN service on Ubuntu Server

Wake-on-LAN Support for the $0 Home Server

With Wake-on-LAN (WOL), you can remotely wake up devices in your network, even when they are in sleep or shutdown mode (if supported). This feature keeps the Ethernet adapter powered, listening for a “magic packet” that triggers the device to wake. Below is a detailed setup guide for WOL, including BIOS/UEFI settings, Windows configuration, and usage with tools like etherwake and Siri Shortcuts.


Why Use Wake-on-LAN?

  • Remote access: Wake your PC from anywhere to perform tasks or access files.
  • Energy savings: Turn off devices when not in use but wake them remotely when needed.
  • Convenience: Quickly wake computers via mobile devices or automations, avoiding manual access.

Step-by-Step Wake-on-LAN Setup

1. Check if Your Device Supports Wake-on-LAN

Not all devices support WOL. To verify:

  • Desktops: Most motherboards support it by default.
  • Laptops: Some enterprise models support WOL, but many do not.
  • Connected Standby: Some laptops can only be woken from sleep but not from full shutdown.

2. Enable Wake-on-LAN in BIOS/UEFI

  1. Reboot your computer and enter the BIOS/UEFI settings (usually by pressing Del, F2, or F12 during startup).
  2. Look for options related to Wake-on-LAN, often under:
  • Power Management
  • Advanced Settings
  • PCI/PCIe Settings
  1. Enable options such as:
  • Wake on PCIe Device or Wake on LAN
  • Power on by Ethernet
  1. Save your settings and restart your computer.

3. Configure Wake-on-LAN in Windows

  1. Open Device Manager:
  • Press Windows + X and select Device Manager.
  1. Expand Network Adapters and double-click your Ethernet adapter (e.g., Realtek, Intel).
  2. Go to the Power Management tab:
  • Check Allow this device to wake the computer.
  • Check Only allow a magic packet to wake the computer.
  1. Find Your MAC Address:
  • Right-click the network icon in the taskbar and select Network & Internet settings.
  • Go to Properties under your Ethernet connection.
  • Note the Physical Address (MAC) (e.g., 00:1A:2B:3C:4D:5E).

4. Install Etherwake on the Home Server

Your home server will send the magic packet to wake other devices in the network.

  1. SSH into your server and install Etherwake:
   sudo apt install etherwake
  1. Find the network interface used by your server:
   ip a

Look for an interface marked UP (e.g., eth0 or enp0s3).


5. Use Etherwake to Send Magic Packets

To wake a device, use the MAC address of the target device and the correct network interface.

  1. Run the following command:
   sudo etherwake -i [network_interface] -b [MAC_address]

Example:

   sudo etherwake -i eth0 -b 00:1A:2B:3C:4D:5E
  1. If successful, the target device should power on within a few seconds.

6. Create a Siri Shortcut for WOL (Optional)

You can automate WOL using Siri Shortcuts on iOS or Tasker on Android to wake devices with a tap or voice command.

Steps to Create a Siri Shortcut:

  1. Open the Shortcuts app on your iPhone or iPad.
  2. Tap + (Add Shortcut) and select Add Action.
  3. Search for “Run Script over SSH” and select it.
  4. Fill in the details:
  • Host: [server IP]
  • User: [your server username]
  • Password: [your server password]
  • Script:
    bash etherwake -i eth0 -b 00:1A:2B:3C:4D:5E
  1. Save the shortcut and add it to your Home Screen or assign it to a Siri voice command (e.g., “Wake up my PC”).

7. Optional: Use Tasker for Android

  1. Install Tasker from the Play Store.
  2. Create a new task and select “Run Command”.
  3. Input the same Etherwake command:
   ssh [user]@[server IP] etherwake -i eth0 -b 00:1A:2B:3C:4D:5E
  1. Assign this task to a widget or automation trigger.

8. Test the Wake-on-LAN Setup

  1. Shutdown or put the target device to sleep.
  2. Send the magic packet using either:
  • Etherwake from the server.
  • Siri Shortcut or Tasker widget.
  1. If configured correctly, the target device should wake up.

Common Troubleshooting Tips

  • Ethernet-only: WOL typically works only over Ethernet, not Wi-Fi.
  • Router Settings: Ensure port forwarding is not blocking the magic packet.
  • BIOS Settings: Double-check that WOL is enabled.
  • MAC Address: Verify the MAC address is correct (check in Device Manager).
  • Firewall: Ensure any firewall settings are not blocking WOL packets.

Summary

With Wake-on-LAN configured, you can now wake up your desktop or laptop remotely from your home server using magic packets. Whether you’re using etherwake on the server, a Siri Shortcut, or Tasker, this setup provides a powerful way to manage your devices from anywhere.

This feature works seamlessly with other tools like ISL Light or VPN access to give you full control over your devices and network remotely.