aakashv-dev/WoLDock
About
Wake-on-LAN dashboard for your homelab : see what's online and wake it from anywhere
Systems & InfrastructureWhat you can do
- Wake-on-LAN — sends the 102-byte magic packet over UDP 9 and 7, to your subnet broadcast and 255.255.255.255, three times per address.
- Built-in authentication — login screen, scrypt-hashed password, session cookies, per-IP throttling, proxy mode for Authelia/Tailscale.
- API tokens — for cron jobs, scripts and Home Assistant; shown once, stored hashed, revocable.
- Live status — online/offline with 12-second refresh and "last seen" on offline machines.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalWoLDock
Wake your homelab from anywhere.
Quick start · Authentication · Deploy · Features · Configuration · API · Troubleshooting
Try it in 60 seconds
docker run -d --name woldock --network host \
-v woldock-data:/app/data \
aakashvdev/woldock:latest
docker logs -f woldock # first-run setup code
Open http://localhost:4321, enter the setup code, and add your first machine.
That is the whole install on a Linux Docker host. On Windows or macOS, run
node server.js instead — Docker Desktop cannot broadcast Wake-on-LAN to your LAN.
Also published to GHCR as ghcr.io/aakashv-dev/woldock:latest.

A tiny self-hosted control panel for your homelab. Add each machine by IP, see at a glance whether it is online, and switch it on with a Wake-on-LAN magic packet — from your desk or from your phone on the other side of a VPN.
One Node.js process. Zero npm dependencies. One JSON file for your machine list. A built-in login so it is safe to put behind nginx. No accounts, no cloud, no telemetry.
Why another dashboard?
Most homelab dashboards want to scrape every service you run, or require Docker, a database and a YAML tree. This one does two things:
- Is it up? — ICMP ping, refreshed automatically.
- Turn it on. — UDP magic packet, one click.
And it is designed to be reachable, not just LAN-local: first-run setup, session auth, API tokens and proxy-aware cookies are in the box. If you want service uptime history and widgets, use Uptime Kuma or Homepage. If you want a page that answers "which boxes are awake, can I wake the NAS, and can I reach it from outside?", this is for you.
✨ Features
- Wake-on-LAN — sends the 102-byte magic packet over UDP 9 and 7, to your
subnet broadcast and
255.255.255.255, three times per address. - Built-in authentication — login screen, scrypt-hashed password, session cookies, per-IP throttling, proxy mode for Authelia/Tailscale.
- API tokens — for cron jobs, scripts and Home Assistant; shown once, stored hashed, revocable.
- Live status — online/offline with 12-second refresh and "last seen" on offline machines.
- Subnet discovery — scan your
/24, reverse-DNS the hosts, add them in one click. - Notes and quick links — a line of notes and a web UI link on each card.
- Favorites and search — pin machines to the top, filter by name, IP, MAC, notes or URL.
- Installable PWA — manifest, icons and service worker, over HTTPS.
- Zero dependencies — only Node.js built-ins. Nothing to
npm install. - Human-readable data —
data/machines.json, atomic writes, easy to back up or hand-edit. - Dark, responsive UI — keyboard shortcuts, reduced-motion support, no framework, no build step.
🚀 Quick start
Requirements: Node.js 18 or newer. That is the whole list.
git clone https://github.com/aakashv-dev/woldock.git
cd woldock
npm start
Open http://localhost:4321. The console prints your LAN URL, your machine count and, on first run, a setup code:
WoLDock
Local: http://localhost:4321
Network: http://192.168.1.20:4321
Machines: 0 saved in data/machines.json
Auth: setup required
First run: open the dashboard and create an admin account.
Setup code: 4F9C2A7D
(The code changes when the server restarts.)
Open the dashboard, enter that code, choose a password, and you are in. The code is single-use and printed only to the server console, so a stranger who reaches the port before you cannot take over the instance.
Windows without npm — PowerShell often blocks npm.ps1, so there is a
launcher that calls Node directly:
start.cmd
Docker
Multi-arch images (linux/amd64, linux/arm64) are published to both registries:
- Docker Hub —
docker.io/aakashvdev/woldock - GHCR —
ghcr.io/aakashv-dev/woldock
docker pull aakashvdev/woldock:latest
docker run -d --name woldock \
--network host \
-v woldock-data:/app/data \
aakashvdev/woldock:latest
docker logs -f woldock # first-run setup code
Tags: latest plus 1.0.1 / 1.0 / 1 for releases, edge for the tip of
main, and immutable sha-<commit> builds.
Prefer provisioning the password up front, especially in automation:
docker run -d --name woldock \
--network host \
-e WOLDOCK_USER=admin \
-e WOLDOCK_PASSWORD='change-me-please' \
-v woldock-data:/app/data \
aakashvdev/woldock:latest
Host networking is required. Wake-on-LAN is a broadcast, so the container needs
network_mode: host. That works on Linux — Unraid, Proxmox, Raspberry Pi. Docker Desktop's VM cannot broadcast onto your physical LAN, so on Windows and macOS run the app withnode server.js.
Portainer — paste deploy/portainer-stack.yml
into a new stack. It already sets host networking, a named data volume,
pull_policy: always, and log rotation.
On Docker Desktop you can still try the UI, auth and discovery with the bridge override — just expect Wake to be a no-op:
docker compose -f docker-compose.yml -f docker-compose.local.yml up --build
Building from a checkout instead:
docker compose up -d --build
# or
docker build -t woldock .
docker run -d --name woldock -p 4321:4321 -v woldock-data:/app/data woldock
The image runs the app as the unprivileged
nodeuser with an ambientCAP_NET_RAW, so ICMP status checks and discovery work even on hosts that ignore file capabilities (nosuid rootfs, user namespaces). The entrypoint briefly starts as root to grant it; the server itself is not root.docker execdefaults to root.
Run it on boot
Linux (systemd) — a hardened unit is in
deploy/woldock.service:
sudo useradd --system --home /opt/woldock --shell /usr/sbin/nologin woldock
sudo chown -R woldock:woldock /opt/woldock
sudo cp deploy/woldock.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now woldock
sudo journalctl -u woldock -f # first-run setup code
Put PORT=4321, AUTH_MODE=password, TRUST_PROXY=1 and friends in
/etc/woldock.env; the unit reads it if present.
Windows (Task Scheduler) — since it is a foreground Node process:
- Open Task Scheduler → Create Task (not "Basic Task").
- General: name it
WoLDock, choose Run whether user is logged on or not. - Triggers: At startup.
- Actions: Start a program →
C:\path\to\woldock\start.cmd. Set Start in to the project folder. - Settings: enable Restart the task if it fails, every 1 minute.
If you prefer a real Windows service, NSSM works:
nssm install WoLDock "C:\Program Files\nodejs\node.exe" server.js with the
project folder as Startup directory.
Docker — restart: unless-stopped is already set in docker-compose.yml.
🔐 Authentication
Three modes, chosen with AUTH_MODE:
| Mode | Behaviour | When |
|---|---|---|
password |
Built-in login screen, scrypt hash, session cookie | Default when HOST is not loopback |
proxy |
Trusts an identity header from a proxy you allow | Authelia, Authentik, Tailscale Serve, Cloudflare Access |
none |
No gate, with a warning if bound to a network interface | Local development |
The defaults are deliberate: HOST=127.0.0.1 gives you no login for local
development, while the default 0.0.0.0 requires setup. If you only ever want
it on localhost:
HOST=127.0.0.1 npm start

Managing the password
Change it from the dashboard — Account (gear icon) → Change password — which verifies your current password and signs out every other device. Or use the CLI:
node server.js --set-password # set or reset (hidden prompt)
node server.js --list-tokens
node server.js --add-token "cron"
Both paths bump a session generation stored in auth.json, so every existing
session becomes invalid — including browsers that are already open. Your current
tab receives a fresh session when changing it from the UI, so you stay signed in.
For containers and config management, WOLDOCK_USER + WOLDOCK_PASSWORD
provision the account on first start; WOLDOCK_SETUP_CODE pins the setup code.
API tokens
Tokens are for machines, not browsers. Create one and copy it immediately — only its SHA-256 hash is stored:
TOKEN=$(node server.js --add-token "nightly wake" --expires-days 90 | grep -o 'wld_[A-Za-z0-9_-]*')
curl -H "Authorization: Bearer $TOKEN" http://localhost:4321/api/machines
Tokens never expire by default. Pass --expires-days N (CLI) or
expiresInDays: N (API) when creating one to give it a lifetime; expired tokens
are rejected and pruned automatically. Revoke any token with
DELETE /api/tokens/:id.
Sessions
HttpOnly,SameSite=Strict,Path=/, andSecurewhenever TLS is detected.- 30 days with Stay signed in, 12 hours otherwise (
SESSION_DAYSchanges the long one). - Stored as hashes in
data/sessions.json, so a server restart does not kick you out. - Sign out from the icon in the top bar.
🌐 Deploying behind nginx
A ready-to-edit configuration is in deploy/nginx.conf, and
a minimal deploy/Caddyfile is included too.
The important parts:
location / {
proxy_pass http://127.0.0.1:4321;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 30s; # discovery scans take a few seconds
}
Then start WoLDock with:
TRUST_PROXY=1 npm start
TRUST_PROXY=1 does two things: it makes session cookies Secure when nginx
reports X-Forwarded-Proto: https, and it makes rate limiting use the real client
IP instead of nginx's. Only enable it when a proxy you control is in front.
Use a subdomain (woldock.example.com), not a subpath — the app assumes it is
served from /.
Reaching it from outside
In order of preference:
- Tailscale / WireGuard — no open ports, no public attack surface.
- Cloudflare Tunnel + Access — TLS and an identity provider for free.
- A VPS reverse proxy over WireGuard — if you want your own domain and IP.
Do not port-forward the app directly, even with a password. TLS, rate limiting and a network boundary are part of the security model — see SECURITY.md.
Behind an identity proxy
If you already run Authelia or Tailscale Serve and want it to own authentication:
AUTH_MODE=proxy TRUST_PROXY=1 TRUSTED_PROXIES=127.0.0.1 npm start
WoLDock accepts X-Auth-Request-User (configurable with PROXY_AUTH_HEADER) from
the allowed proxy addresses only. No password screen, no sessions.
🖥️ Using the dashboard
Add a machine
Click Add machine, type a name and IP, then press Detect to read the MAC address from the ARP table (the machine must be powered on and on the same network). If detection fails, type the MAC manually.

Leave the name blank to use the IP. Notes and a Web URL (Proxmox, TrueNAS, iLO…) are optional; the URL becomes a link on the card. If the machine is on a different subnet, open Advanced and set that subnet's broadcast address.
Discover
Discover pings every address on your /24, reads the ARP table, resolves
hostnames and lists what it finds — including machines you have not added yet.
One click adds a device with the right MAC.
Wake
Press Wake on an offline card. The card turns amber, the dashboard polls every 5 seconds for up to 90 seconds, and tells you when the machine answers. If it never does, you get a warning instead of silence. The Wake button disappears for online machines.
Organize
- Star a machine to pin it to the top.
- Search matches name, IP, MAC, notes and URL; the count shows how many match.
- Notes appear as a two-line preview on the card.
- Last seen appears on offline cards, from persisted status history.
Keyboard shortcuts
| Key | Action |
|---|---|
R |
Refresh all statuses |
/ or F |
Focus the search box |
Esc |
Close the open dialog |
🧠 How it works
A browser cannot send a magic packet — Wake-on-LAN is a raw UDP broadcast, which page JavaScript is not allowed to do. That is why this app has a server.
flowchart LR
UI["Browser<br/>dashboard UI"] -->|"HTTPS + session cookie"| NG["nginx / Caddy<br/>TLS + rate limit"]
NG -->|"HTTP, loopback"| SRV["server.js<br/>Node.js :4321"]
SRV <-->|"read / write"| DB[("data/*.json")]
SRV -->|"ICMP ping"| NET["Your LAN"]
SRV -->|"UDP 9 & 7<br/>magic packet"| NET
SRV -->|"ARP table"| OS["Host OS"]
NET --- M1["NAS ✅"]
NET --- M2["Proxmox ⚡"]
NET --- M3["Raspberry Pi 💤"]
- Status is
pingfrom the host, in parallel with a 1200 ms timeout, cached for 4 seconds and refreshed by the browser every 12 seconds. - Wake builds the standard packet (six
0xFFbytes, then the MAC 16 times) and broadcasts it to ports 9 and 7, three times per address, plus a best-effort unicast. - Auth uses
crypto.scryptfor the password, random session IDs stored as SHA-256 hashes, and constant-time comparisons throughout. - Discovery runs a ping sweep of your
/24with 48 workers, then reads the ARP table and reverse-DNS the responders.
There is no outbound internet call anywhere in the code.
⚙️ Configuration
| Variable | Default | Description |
|---|---|---|
PORT |
4321 |
HTTP port |
HOST |
0.0.0.0 |
Bind address (127.0.0.1 for local only) |
AUTH_MODE |
password (or none on loopback) |
password, proxy, none |
WOLDOCK_USER |
admin |
Admin username for setup / provisioning |
WOLDOCK_PASSWORD |
— | Provision the password non-interactively |
WOLDOCK_SETUP_CODE |
random | Pin the first-run setup code |
SESSION_DAYS |
30 |
"Stay signed in" lifetime |
TRUST_PROXY |
off | Trust X-Forwarded-* from a reverse proxy |
TRUSTED_PROXIES |
127.0.0.1,::1 |
Allowed proxy peers for proxy mode |
PROXY_AUTH_HEADER |
x-auth-request-user |
Identity header for proxy mode |
WOL_PORTS |
9,7 |
UDP ports for magic packets |
DISCOVERY_CIDR |
— | Force the subnet discovery scans, e.g. 192.168.1.0/24 |
DISCOVERY_INTERFACE |
— | Force the interface discovery uses, e.g. eth0 |
LOG_REQUESTS |
off | Log every HTTP request |
PORT=8080 node server.js # macOS / Linux
set PORT=8080 && node server.js # Windows cmd
$env:PORT=8080; node server.js # Windows PowerShell
Files in data/ (all git-ignored):
| File | Contents |
|---|---|
machines.json |
Your machines, notes, links, favorites, last seen |
auth.json |
Username, scrypt salt and hash |
sessions.json |
Hashed session IDs and expiry |
tokens.json |
Hashed API tokens |
💤 Enabling Wake-on-LAN on a machine
The dashboard can only wake machines that are configured to be woken. This part happens on the target, once:
BIOS / UEFI
Enable Wake on LAN, Power On by PCI-E/PCI or Resume by LAN. Every
vendor names it differently, and some need ErP/Deep Sleep turned off so the
NIC keeps power in standby.
- HP — Advanced → Power Management Options → S5 Wake on LAN, disable Deep Sleep
- Dell — Power Management → Wake on LAN/WLAN → LAN Only
- Lenovo — Power → Automatic Power On → Wake on LAN
Windows
- Device Manager → your adapter → Properties
- Power Management → allow this device to wake the computer
- Advanced → Wake on Magic Packet → Enabled
- Optional: Wake on pattern match → Disabled
Check with powercfg /devicequery wake_armed. If wake works from sleep but not
from shutdown, turn off Fast Startup:
powercfg /h off
shutdown /s /f /t 0
Linux
sudo ethtool -s eth0 wol g
sudo ethtool eth0 | grep Wake-on # Wake-on: g
Persist it with NetworkManager (ethernet.wake-on-lan = 64) or a systemd unit
running the ethtool command at boot.
Requirements that trip people up:
- Wired Ethernet only. Wake-on-Wi-Fi is vendor-specific and rarely works.
- The machine needs standby power — a switched-off power strip cannot be woken.
- The MAC must match the NIC that is actually connected.
🔍 Troubleshooting
The target does not wake
Run the bundled listener on a second machine on the same LAN and press Wake:
node tools/wol-listen.js
- A
MAGIC PACKETline appears → delivery works; the problem is on the target (BIOS, NIC settings, Fast Startup). - Nothing appears → network problem: different VLAN, Wi-Fi isolation, wrong broadcast address, or the listener's firewall.
Use an unprivileged port on both sides if UDP 9 is blocked:
PORT=9999 node tools/wol-listen.js and WOL_PORTS=9999 node server.js.
| Symptom | Fix |
|---|---|
| Shows Offline but the machine is up | Its firewall blocks ICMP (Windows default). Allow File and Printer Sharing (Echo Request) |
| Wake does nothing, packet is delivered | WOL disabled in BIOS/NIC, wrong MAC, or no standby power |
| Wake works on the same subnet only | Routers drop broadcasts. Same VLAN, or set the subnet broadcast under Advanced |
| Detect finds no MAC | Host off or not in ARP. Power it on, ping once, retry |
| Login loop behind a proxy | Set TRUST_PROXY=1, and make sure nginx sends X-Forwarded-Proto |
| Logged out after every restart | Sessions are stored in data/sessions.json; make sure data/ is a writable volume |
429 Too many attempts |
Five wrong passwords. Wait 30 seconds; the delay doubles up to 15 minutes |
| Setup code rejected | It changes on every restart and is printed at startup; check the console |
| PWA will not install | Service workers need HTTPS (or localhost) |
🔌 API
Every endpoint except /api/health and /api/auth/* requires a session cookie or
Authorization: Bearer <token>.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/health |
Liveness, version; public |
GET |
/api/auth/status |
Mode, session state, needsSetup |
POST |
/api/auth/login |
{ username, password, remember } |
POST |
/api/auth/setup |
{ code, username, password } |
POST |
/api/auth/logout |
Clear the session |
POST |
/api/auth/password |
{ currentPassword, newPassword }; revokes other sessions |
GET |
/api/machines |
List machines |
POST |
/api/machines |
Add { name, ip, mac, notes?, url?, favorite? } |
PATCH |
/api/machines/:id |
Partial update |
PUT |
/api/machines/:id |
Replace a machine |
DELETE |
/api/machines/:id |
Remove a machine |
POST |
/api/machines/:id/wake |
Send the magic packet |
POST |
/api/wake-all |
Wake every machine |
GET |
/api/status |
Ping all machines (?force=1) |
GET |
/api/discover |
Scan the local /24 |
GET |
/api/detect?ip=1.2.3.4 |
Look up a MAC in the ARP table |
GET |
/api/network |
Interfaces and broadcast hints |
GET |
/api/tokens |
List tokens (metadata only) |
POST |
/api/tokens |
Create { name, expiresInDays? }, returns the raw token once |
DELETE |
/api/tokens/:id |
Revoke a token |
# wake the NAS from a cron job
curl -X POST -H "Authorization: Bearer $TOKEN" \
http://localhost:4321/api/machines/<id>/wake
# session login from a script
curl -c cookies.txt -H 'Content-Type: application/json' \
-d '{"username":"admin","password":"…"}' \
http://localhost:4321/api/auth/login
Errors return { "error": "message" } with 400, 401, 403, 404, 409,
429 or 502.
📁 Project structure
woldock/
├── server.js HTTP server, WOL, ping, discovery, routes
├── lib/
│ └── auth.js scrypt, sessions, tokens, rate limiting, proxy mode
├── public/
│ ├── index.html Dashboard markup and templates
│ ├── styles.css Dark theme, cards, dialogs
│ ├── app.js State, rendering, polling, discovery
│ ├── login.html/.css/.js Login and first-run setup
│ ├── manifest.webmanifest
│ ├── sw.js Network-first service worker
│ └── icons/ Generated app icons
├── docs/ Screenshots and the Docker Hub overview
├── data/ machines, auth, sessions, tokens (git-ignored)
├── deploy/
│ ├── nginx.conf Ready-to-edit reverse proxy
│ ├── Caddyfile Minimal alternative
│ ├── portainer-stack.yml Ready-to-paste Portainer stack
│ └── woldock.service Hardened systemd unit
├── tools/wol-listen.js Diagnostic magic packet listener
├── .github/workflows/
│ ├── ci.yml Syntax, auth and container smoke tests
│ ├── docker-publish.yml Multi-arch GHCR + Docker Hub release images
│ ├── dockerhub-overview.yml Syncs the Docker Hub description
│ └── release.yml Creates the GitHub release from a tag
├── Dockerfile
├── docker-entrypoint.sh Drops to node with ambient CAP_NET_RAW
├── .dockerignore
├── docker-compose.yml
├── docker-compose.local.yml Bridge override for Docker Desktop
├── start.cmd
├── SECURITY.md
├── CHANGELOG.md
└── README.md
Roughly 4,700 lines of code, styles and markup.
🛠️ Development
No build step, no bundler, no test runner to install.
node server.js # start with auth as configured
AUTH_MODE=none node server.js # skip login while iterating
LOG_REQUESTS=1 node server.js # log every request
- Backend — CommonJS, Node built-ins only. A PR adding an npm dependency needs a very good reason.
- Frontend — vanilla ES2020+ in a plain
<script>. Cards are updated in place, never re-created, so polling does not animate the grid. - Auth — keep it dependency-free and constant-time. Any change to cookies, hashing or gating deserves a security note in the PR.
- Style — two-space indent, single quotes, comments for the why.
Manual pass before a PR: set a password, sign out, sign in, add/edit/delete a machine, discover, wake, toggle a favorite, search, restart and confirm the session survives.
🔒 Security
The full model is in SECURITY.md. The short version:
- Never expose the raw app port. Terminate TLS at a proxy and prefer a VPN.
TRUST_PROXY=1only behind a proxy you control.- Use a unique password; tokens for automation.
- Login throttling is in-memory, so a restart clears lockouts. Throttled
responses are
429with aRetry-Afterheader. - There is no 2FA and no multi-user role model yet.
Report vulnerabilities privately via GitHub's security advisory feature — not in a public issue.
🤝 Contributing
Contributions are welcome — bug reports, docs fixes, and small focused pull requests especially. See CONTRIBUTING.md.
- Fork and branch:
git checkout -b fix/wake-on-linux - Test by hand (see Development)
- Keep the diff focused; one concern per PR
- Describe what you tested, including your OS and whether a proxy is involved
📄 License
MIT © 2026 Aakash Varma
Use it, fork it, ship it — just keep the copyright notice.
If this saved you a walk to the rack, a ⭐ helps others find it.
Explore related projects
Loading…