I turned an old Android phone into a Wake-on-LAN relay. WOLE is an Expo + React Native app that runs a tiny HTTP server as a foreground service, so you can wake your homelab machines from anywhere.

Overview
I needed a reliable way to wake my home server remotely. Standard Wake-on-LAN only works if a device on the same LAN sends the magic packet. Most dedicated WOL tools require a Raspberry Pi or another always-on machine. My phone was already on the network.
POST /wol HTTP endpoint, and broadcasts UDP magic packets on the local network. Pair it with Tailscale or WireGuard and you can wake machines remotely without port forwarding or dedicated hardware. I wrote more about the product idea in WOLE: The UpSnap for Android.
WOLE app main screen with status orb and relay controls
The Foreground Service Problem
The WOL protocol was the easy part: a UDP broadcast with a specific byte pattern. The hard part was keeping the HTTP server alive on Android. Modern Android kills background processes aggressively, and each major version adds new restrictions.
react-native-background-actions, which creates a foreground service with a persistent notification. On Android 13+ the app needs runtime POST_NOTIFICATIONS permission before it can even show the notification, and on Android 14 it needs FOREGROUND_SERVICE_DATA_SYNC specifically declared. Getting the service to survive device sleep, battery optimization, and user-initiated task kills required wake locks, proper onTaskRemoved handling, and prompting users to exempt the app from battery optimizations.BootCompletedReceiver to relaunch the relay when the device restarts. Once configured, the phone can sit plugged in and keep serving requests.The Web Dashboard
http://<phone-ip>:<port>/ from any browser.The dashboard lets you save devices with MAC addresses, name them, and wake them with one click. It also polls device status with ICMP ping every 30 seconds, so the dashboard shows which machines are online. For a tool I built for myself, the UI made it much nicer than curling endpoints.
Networking Model
WOLE is flexible about how clients reach the phone:
- Same LAN: Use the phone's Wi-Fi IP directly
- VPN: Connect via Tailscale, WireGuard, or ZeroTier to reach the phone's VPN IP from anywhere
- Port forwarding: Possible but not recommended; if you do, the shared secret token authentication becomes essential
The phone must be on the same LAN as the devices you want to wake, because WOL magic packets are UDP broadcasts that do not route across subnets. The HTTP endpoint that triggers those packets can be accessed from anywhere you can reach the phone.
Tech Stack
- Expo + React Native: Cross-platform foundation with native module support for the foreground service
- Tamagui: UI framework for the Android app with dark theme and glassmorphism cards
- Vite + React: Lightweight web dashboard bundled into the APK assets
- Native Java modules: Custom
WolServerModulehandling the HTTP server, UDP broadcasts, and wake lock management - GitHub Actions: Automated APK builds and releases on every tagged version
What I Learned
Android background processing fights you at every step. Samsung, Xiaomi, Huawei, and other manufacturers add battery optimization on top of stock Android restrictions. A service that "just stays running" needs foreground service types, wake locks, boot receivers, and OEM-specific handling. Building WOLE gave me a deeper appreciation for apps like Tasker and Termux.
Related Projects
Open Resume
A resume builder with AI coaching, server-side rendering, local state persistence, and Cloudflare Workers deployment.
Personal Portfolio (2021)
My 2021 React portfolio, built to show my skills, experience, and early project work.
Related Writing
TailwindCSS v4 changed the setup flow. AI coding agents still reach for old config files and deprecated commands, so developers need to check the official docs before accepting setup code.


