Wake computers on your LAN via Wake-on-LAN, with live TCP/ICMP status detection.
277
Web app to wake computers on the local network via Wake-on-LAN and see at a glance which ones are on. Minimalist, modern UI (dark theme with neon accents), meant for home / lab use, with minimal storage in a JSON file.
Note: Wake-on-LAN can only turn machines on. Powering off a remote machine would require installing something on it (credentials + RPC/WMI or SSH), so the app is wake + monitoring only. The magic packet targets the MAC, which is therefore required.
@astrojs/node adapter (standalone).@tailwindcss/vite).>= 22.12.0 (for local development), or Docker (for deployment).npm install
npm run dev # http://localhost:4321
Multi-stage Dockerfile + docker-compose.yml with three profiles:
docker compose --profile dev up --build # development (hot reload)
docker compose --profile staging up --build -d # staging (port 4322)
docker compose --profile prod up --build -d # production (port 4321)
Or with the npm shortcuts: npm run docker:dev, npm run docker:staging, npm run docker:prod.
network_mode: host is required so the Wake-on-LAN UDP broadcast and the ICMP ping
reach the real LAN. It needs a Linux host (on Docker Desktop for Windows/Mac the host
network is limited)./data volume (one per profile).| Variable | Default | Description |
|---|---|---|
DATA_FILE | ./data/devices.json | Path to the devices JSON file. |
HOST | localhost | SSR server listen interface. |
PORT | 4321 | SSR server port. |
Each device is stored in data/devices.json:
{
"devices": [
{
"id": "uuid",
"name": "Servidor-NAS", // display name
"mac": "AA:BB:CC:DD:EE:FF", // REQUIRED (WoL targets the MAC)
"ip": "192.168.1.10" // optional, only used for status probing
}
]
}
All routes return JSON. Mutating methods are protected by Astro's checkOrigin (the app's
own fetch, being same-origin, satisfies it automatically).
| Method | Route | Description |
|---|---|---|
| GET | /api/devices | List devices. |
| POST | /api/devices | Create a device. |
| PATCH | /api/devices/:id | Edit a device. |
| DELETE | /api/devices/:id | Delete a device. |
| POST | /api/devices/:id/wake | Send the magic packet (Wake-on-LAN). |
| GET | /api/devices/:id/status | Status of a single device. |
| GET | /api/status | Status of the whole fleet. |
src/
├── pages/
│ ├── index.astro # initial SSR load + Dashboard island
│ └── api/ # SSR endpoints (devices, wake, status)
├── components/ # Preact components (Dashboard, DeviceCard, modals…)
├── hooks/ # custom hooks (state: devices, polling, wake, toasts…)
├── lib/ # API client, status metadata, utilities
├── layouts/Layout.astro # base layout (dark theme)
├── styles/global.css # Tailwind 4 + @theme tokens (neon)
└── server/ # backend logic
├── store.ts # CRUD over the JSON (+ lock, atomic writes)
├── validation/ # MAC/IP normalization, device validation
├── wol/ # magic packet + UDP send
├── status/ # TCP + ICMP probing and status resolution
├── http/ # response and error helpers
└── errors/ # typed errors (ValidationError, NotFoundError)
| Command | Action |
|---|---|
npm run dev | Development server at localhost:4321. |
npm run build | Production build to ./dist/. |
npm start | Run the built SSR server. |
npm run format | Format the code with Prettier. |
npm run docker:* | Bring up a Docker profile (dev/staging/prod). |
Content type
Image
Digest
sha256:b92304ff4…
Size
136.8 MB
Last updated
about 2 months ago
docker pull negrii/wake-lan-app