Benjamin Looi
Back to projects
WOLE

WOLE

February 1, 2026

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.

WOLE turns an Android phone into a persistent WOL relay. It runs as a foreground service, exposes a 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

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.

I built the relay on 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.
The auto-start feature uses a BootCompletedReceiver to relaunch the relay when the device restarts. Once configured, the phone can sit plugged in and keep serving requests.

The Web Dashboard

The Android app handles configuration and status, but the day-to-day interface is a web dashboard served from the phone. It is a Vite + React app bundled into the APK assets directory. When the relay runs, you visit 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 WolServerModule handling 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

web
Open Resume

Open Resume

A resume builder with AI coaching, server-side rendering, local state persistence, and Cloudflare Workers deployment.

react
typescript
tailwind
zustand
web
Personal Portfolio (2021)

Personal Portfolio (2021)

My 2021 React portfolio, built to show my skills, experience, and early project work.

react
typescript
tailwind

Related Writing

WOLE: The UpSnap for Android
android
wake-on-lan
react-native

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.