Repository navigation
Description
Pre-submission checklist
- I searched existing issues and believe this is not a duplicate.
- Closest existing report: aw-server randomly crashes on start up (WinError 10013) #571 (aw-server silently exits with
WinError 10013; closed as answered with the winnat workaround). This issue is the follow-up design proposal. - Doesn't open, using port but saying it's blocked, Linux Mint #1202 (port appears blocked on Linux Mint) is a different cause but the same symptom class.
- Closest existing report: aw-server randomly crashes on start up (WinError 10013) #571 (aw-server silently exits with
- I searched the ActivityWatch documentation and did not find an answer.
- The docs do not cover Windows port reservations; the manual workaround only exists in aw-server randomly crashes on start up (WinError 10013) #571's comments.
Note: this repo routes feature requests to the forum (https://forum.activitywatch.net/c/features). I opened this as an issue because it is a cross-repo design question tied to two ready PRs; happy to move it to the forum if maintainers prefer.
Issue
Summary
On Windows, Hyper-V/WSL (WinNAT) can reserve ranges of TCP ports from the dynamic pool. If the range includes 5600, ActivityWatch dies silently: aw-server exits while binding (WinError 10013, see #571), watchers keep queueing, the dashboard is unreachable, and the tray only says "crashed". The manual workaround is to stop winnat, reserve 5600 as an administered exclusion, and restart winnat.
Two diagnostics PRs make that failure visible:
- fix: log actionable error when the server cannot bind its port aw-server#243 — log the bind failure, including the Windows
netshhint - fix(tray): report unavailable server ports instead of restart loops aw-qt#164 — dedicated dialog instead of the restart loop
Proposal
A coordinated fallback (prompted or opt-in), orchestrated by aw-qt because it is the only component that knows all the modules:
- Detect that the configured server port is unavailable (before start, or on first crash).
- Ask the user: keep the current setup (with the OS-level fix) or switch to another port.
- On "switch": update the server config (
aw-server.toml/ aw-server-rustconfig.toml) and the sharedaw-client.toml, restart the server and watchers, and point the dashboard at the new port. - Document the implications for external integrations.
Why not let aw-server pick a random free port?
The port is part of a cross-component contract: aw-client-based watchers read aw-client.toml, aw-qt's health check uses the configured port, and the browser watcher's manifest only allows http://127.0.0.1:5600/api/*. A server-only fallback would keep running with nothing sending data — a silent failure that is worse than the current loud one.
Open questions
- Default behavior: prompt, an opt-in setting, or always keep 5600 and show the OS-level fix?
- Should aw-watcher-web support a configurable port (manifest + settings) before this is viable?
- Where should the Windows
netshworkaround be documented (docs repo)?
Activity
github-actions commentedon Dec 2, 2026
Hi there!
As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct.
Thanks a bunch for opening your first issue! 🙏