OpenHab Log Viewer
A live web view for the openHAB logs: filter by source, level and text, streaming via Server-Sent Events, with every log line staying visible as its own row.

Overview
The OpenHab Log Viewer makes the two most important openHAB logs readable in a browser, without connecting to the machine over SSH. It follows events.log and openhab.log at the same time, loads the most recent lines when opened and then appends new lines live.
New lines reach the browser through Server-Sent Events rather than repeated polling. Client and server both use bounded ring buffers, so the view stays responsive even under heavy logging. The server is bundled into a single file, which means the target host needs nothing but Node.js, no package install.
In the rendering, every physical line of the file stays its own row in the interface. Continuation lines, for instance from stack traces, keep their own rows while visibly belonging to the timestamped entry above them. The state of each watched file is shown, so a missing file or a permissions problem is immediately visible instead of appearing as an empty view.
The application ships no authentication of its own and relies on the browser’s same-origin policy. Because DNS rebinding can bypass that, ALLOWED_HOSTS lets you declare the host names the viewer may be reached under; anything else is rejected with 403. For real access control, put an authenticating reverse proxy in front of it.
Features
Installation
npm install
npm run build
npm run startThe application then runs at http://localhost:9001/. A systemd unit for permanent operation is included in the repository; the target host only needs Node.js because the server is bundled.
Releases
v2.5.1 · 06/09/2026
Dependencies updated
v2.5.0 · 16/08/2026
- build(deps): bump body-parser from 2.2.2 to 2.3.0
- build(deps): bump actions/checkout from 7.0.0 to 7.0.1 in the actions group
- perf(sseHub): batch live log lines into chunked SSE writes
- build(deps): bump express-rate-limit from 8.6.0 to 8.6.1
- build(deps-dev): bump jsdom from 29.1.1 to 30.0.1
- build(deps-dev): bump @types/node from 26.1.1 to 26.1.2 in the types group across 1 directory
- build(deps): bump ip-address from 10.2.0 to 10.4.0
- build(deps): bump express-rate-limit from 8.6.1 to 8.6.2
- build(deps-dev): bump tsx from 4.23.1 to 4.23.8
- build(deps-dev): bump tsx from 4.23.8 to 4.23.12
- build(deps-dev): bump esbuild from 0.28.1 to 0.28.2
- build(deps-dev): bump the types group across 1 directory with 2 updates
v2.4.1 · 19/07/2026
- build(deps): bump the actions group with 3 updates
- build(deps-dev): bump tsx from 4.23.0 to 4.23.1
- build(deps): bump express-rate-limit from 8.5.2 to 8.6.0
- Codex: add skills for issue fixing, PR publishing, and PR reviewing
- Build releases with Node.js 22 for broadest compatibility
v2.4.0 · 12/07/2026
- Add MIT license
- Document pull request guidelines for AI-generated content
- build(deps-dev): bump tsx from 4.22.4 to 4.23.0
- build(deps-dev): bump @types/node from 26.0.0 to 26.1.0 in the types group
- build(deps-dev): bump @types/node from 26.1.0 to 26.1.1 in the types group
- build(deps-dev): bump typescript from 6.0.3 to 7.0.2
- Handle I/O errors in LogTailer sync and startup paths (#129)
- Recover from server-restart line-id reset in /api/resync (#130)
- Handle async FSWatcher error events without crashing the process (#131)
- Time out the resync fetch and cap the live-line queue (#133)
- Add opt-in Host-header validation (ALLOWED_HOSTS) against DNS rebinding
- perf(routes): avoid materializing the buffer before applying the resync limit
v2.3.1 · 02/07/2026
- build(deps): bump the actions group with 3 updates
- build(deps-dev): bump @types/node from 25.9.3 to 26.0.0 in the types group
- Code review fixes: UTF-8 decoding, startup ordering, health endpoint hardening
![[ e-networld.de ]](/img/logo.png)