FileDB on Windows: tray and autostart
Since v2.43 the Windows distribution of FileDB is not just a console filedb.exe but a full desktop setup — still with zero external runtime dependencies.
What's in the box
build-windows.sh builds a single dist/filedb-windows-<arch>/ folder with:
filedb.exe— the server (console, with the branded icon embedded);filedbtray.exe— the system-tray app (built with-H=windowsgui, no console window);icon.icoandWINDOWS.md— the manual.
The tray icon
Right-click the icon for the menu: status (● running / ○ stopped), “Open in browser” (the port is read from settings.json), ▶ Start / ⏹ Stop / ⟳ Restart, 📁 pick the databases folder via a native dialog, 📂 open the folder in Explorer, ⚙ open settings.json, 🚀 an autostart toggle, ✕ Quit.
Stopping is graceful, not a kill: the tray sends the child process a console event that the Go runtime turns into SIGTERM — the server exits through the regular http.Server.Shutdown(), flushing the WAL; a hard kill happens only if the process doesn't respond within 10 seconds.
Autostart — four ways
WINDOWS.md documents four options:
- the “🚀 Autostart” toggle right in the tray menu;
- a shortcut in
shell:startup, manually; - Task Scheduler — for a headless server, with automatic restart on failure;
- the
HKCU...Runregistry key — for scripted/GPO deployment.
Plus a troubleshooting section for common issues.