Do you have a power-hungry development workstation that you prefer to suspend when not in use? At home, it’s easy to wake it with a Wake-on-LAN (WOL) command from your laptop and suspend it again via SSH. But what if you’re away—at a café, library, or work—and still need to manage your PC at home remotely? If your network is stuck behind CGNAT and installing OpenWrt on your router isn’t an option, don’t worry. With an old Android smartphone, you can transform it into a WOL box, allowing you to remotely wake up and suspend your PC no matter where you are. This guide will show you how!
Why use an Android Device for Wake-on-LAN
- Eco-friendly: Repurposing old devices keeps them out of landfills and reduces e-waste.
- Cost-effective: Free if you have an old Android phone laying around.
- Remote Access: Running ssh-server in Termux with Tailscale’s VPN allows you to securely wake up your devices from anywhere in the world.
- Power-efficient: Android devices typically consume very little power, making them ideal for this purpose.
Why Use Tailscale?
Tailscale simplifies network connectivity by creating a secure mesh VPN across devices, allowing you to access your devices anywhere, securely, as though they were all on the same local network. By installing Tailscale on your devices, you can securely access your home network from anywhere, including the ability to send WoL packets to wake up machines that are asleep.
Prerequisites
Before we dive into the setup, here are a few things you’ll need:
- Old Android device running at least Android 5.0 (Lollipop) or higher.
- Tailscale account (if your ISP is using CGNAT).
- A PC, server, or NAS on your home network that supports Wake-on-LAN.
Step 1: Install Tailscale on Your Old Android Device
Download the Tailscale app from the Google Play Store and install on your old Android device.
If Tailscale app is not working on your device, download Tailscale binary in Termux and start Tailscale in userspace networking mode on startup.
Step 2: Set Up Wake-on-LAN on Your Target Device
To wake a device using WoL, it must be properly configured to respond to WoL magic packets.
Enable Wake-on-LAN in your OS: Search Google for instructions to enable Wake-on-LAN in your OS (Windows, Linux distro).
Find the MAC address of your ethernet interface you want to wake up. You’ll need this to send the magic packet. On Windows, use the command
ipconfig /all
to locate the Physical Address of your network interface.Ensure your router and BIOS settings are configured to allow WoL signals to pass through. Typically, there will be settings in your router to forward WoL packets.
Test if Wake-on-LAN works: Put your computer to sleep or shutdown. Then, download a Wake-on-LAN app in Google Play Store to test if Wake-on-LAN works on your computer.
Step 3: Configure Your Android Device as a Wake-on-LAN Controller
Turn your old Android device into a handy Wake-on-LAN (WoL) controller for remotely waking computers or servers.
1. Install the Termux App
Download and install the Termux app from one of the following trusted sources:
2. Install Required Packages
Open Termux and install the necessary packages for Wake-on-LAN and SSH functionality:
pkg install openssh wol -y
3. Test Wake-on-LAN Locally
Verify that your setup can send WoL packets within the Termux app:
# Replace with your target PC's MAC address
wol 22:44:44:ba:ee:0c
4. Test Wake-on-LAN Over SSH
Next, ensure you can send WoL packets remotely via SSH. From another machine, SSH into the phone and run the WoL command:
# Replace 192.168.1.121 with your phone's IP address
ssh -p 8022 192.168.1.121 -t "wol 22:44:44:ba:ee:0c"
5. Test with Tailscale for Remote Access
If the local test works, try sending WoL packets using Tailscale to access the phone from outside your home network:
# Replace wol-machine with your phone's Tailscale hostname
ssh -p 8022 wol-machine -t "wol 22:44:44:ba:ee:0c"
6. Simplify the Command with an Alias
For convenience, you can create an alias for the WoL command to make it easier to remember and reuse.
alias wakepc='ssh -p 8022 wol-machine -t "wol 22:44:44:ba:ee:0c"'
Conclusion
Repurposing an old Android device into a Wake-on-LAN controller using Tailscale is a great way to extend the usefulness of outdated hardware while adding a layer of convenience and security to your home network. With a few simple steps, you can wake up your sleeping devices from anywhere in the world, making remote access more efficient and environmentally friendly. So, dust off that old phone, and give it a new life as part of your home tech ecosystem!
Happy repurposing!