frontail is a modern fork of the original
mthenw/frontailproject, extended with a modernised UI, richer features, container log streaming, advanced filtering, automatic log colorization, and an updated Docker base image.
frontail is a Node.js application that streams log files to the browser โ tail -F with a UI. Point it at any file (or stdin) and watch lines appear in real time.
๐ Try the live demoโ โ fake logs streaming continuously across every format frontail auto-colorizes, including Apache2/Nginx, Tomcat, Log4j/Logback, syslog, and ANSI-colored sources.
npm i -g @hbenali/frontail
frontail /var/log/syslog
# open http://127.0.0.1:9001
docker run -d -p 9001:9001 -v /var/log:/log hbenali/frontail /log/syslog
| Area | Change |
|---|---|
| UI | Full sidebar/main two-pane layout, JetBrains Mono log font |
| Containers | Stream logs from Docker or Podman containers alongside files |
| Source selector | Sidebar pills to filter by source โ click a container or file to isolate its logs |
| Themes | Dark, Light, Solarized โ switched at runtime with correct per-theme button colours |
| Persistence | Theme, word wrap, timestamps, filter, sidebar state, and source selection saved in localStorage |
| Filter | Regex mode, case-sensitive toggle, invert-filter, inline match highlighting |
| Highlight | Up to 5 colour-coded keyword highlighters, applied to all existing and new lines |
| Stats | Live counters for total / visible / error / warn lines |
| Line numbers | Gutter line numbers on every entry |
| Timestamps | Per-line HH:MM:SS.ms toggle |
| Mobile | Full-screen sidebar sheet, no horizontal scroll, word-wrap forced, safe-area aware |
| Keyboard | Ctrl/Cmd+K focus filter ยท Space pause ยท Shift+G jump to bottom ยท Esc clear |
| Docker | Multi-stage build, Node 24 LTS on Debian Bookworm Slim, non-root user |
Real-time log streaming over WebSocket
Docker/Podman container log streaming โ --container flag, any engine
Source selector โ sidebar pills to filter logs by source
Container log download โ download full container history via browser
Log rotation support on Linux/macOS
Auto-scroll with scroll-to-bottom FAB and +N new-line counter
Pause/resume stream with skip counter
Unread-line count in browser favicon
Three built-in themes: Dark, Light, and Solarized
Persistent UI settings across sessions
Advanced filtering:
Keyword highlighting with up to 5 configurable keywords
ANSI colour code rendering
Automatic log colorizing for common log formats
JSON log line colorizing for structured logs
ANSI-source indicator showing whether a source already contains ANSI colours
Sanitized downloads with ANSI escape sequences removed
Level quick-filter chips for Error, Warn, Info, and Debug
Saved filter presets
Filtered downloads of exactly the currently visible lines
Richer topbar showing the current source and filter state
Update-available notification when the server is redeployed
Click any line to select/deselect it
Word-wrap toggle
Per-line timestamps toggle
Live statistics: total / visible / errors / warnings
Tailing multiple files and stdin
Basic authentication
HTTPS support
Running behind a path prefix
Customizable log highlighting presets
Customizable log colorization rules
npm i -g @hbenali/frontail
docker run -d \
-p 9001:9001 \
-v /var/log:/log \
hbenali/frontail /log/syslog
Standalone binaries are available for:
macOS binaries are unsigned. Gatekeeper may block the first launch. If required, remove the quarantine attribute or use the system's Open action to allow the application.
frontail [options] [file ...]
-V, --version output the version number
-h, --host <host> listening host (default: 0.0.0.0)
-p, --port <port> listening port (default: 9001)
-n, --number <number> starting lines number (default: 10)
-l, --lines <lines> lines stored in browser (default: 2000)
-t, --theme <theme> name of the theme (default, dark)
-d, --daemonize run as daemon
-U, --user <username> Basic Auth username (requires -P)
-P, --password <password> Basic Auth password (requires -U)
-k, --key <key.pem> Private key for HTTPS (requires -c)
-c, --certificate <cert.pem> Certificate for HTTPS (requires -k)
-C, --container <container> container name or id
--container-engine <engine> container engine (docker, podman)
(default: docker)
--pid-path <path> daemon PID file
(default: /var/run/frontail.pid)
--log-path <path> daemon log file
(default: /dev/null)
--url-path <path> URL path for browser app (default: /)
--ui-hide-topbar hide topbar
--ui-no-indent don't indent log lines
--ui-highlight enable word/line highlighting
--ui-highlight-preset <path> custom highlight preset JSON
--ui-no-colors disable log colorizing
--ui-colors-preset <path> extra log colorizing rules JSON
--path <path> prefix path (default: /)
--disable-usage-stats disable anonymous usage statistics
--help output usage information
Web interface:
http://[host]:[port]
| Key | Action |
|---|---|
Ctrl/Cmd + K | Focus filter input |
Space | Pause / resume stream |
Shift + G | Scroll to bottom |
Esc | Clear filter |
Beyond the standard text filter, the sidebar provides additional filtering controls:
A small indicator next to the topbar title appears whenever a filter is actively narrowing the displayed logs.
On small screens, the sidebar becomes a full-screen overlay panel.
Tap the โฐ icon to open it and the โ button to return to the log view.
Logs automatically wrap to the available window width without horizontal scrolling.
Multiple files and shell glob patterns are supported.
Each file appears as a separate source in the sidebar.
frontail /var/log/nginx/access.log /var/log/nginx/error.log
frontail /var/log/*.log
Files and containers can be tailed simultaneously.
Each source appears separately in the sidebar.
frontail /var/log/syslog --container nginx -C postgres
Use - to stream from standard input:
./server | frontail -
Stream logs from one or more containers:
frontail --container my-container
frontail -C c1 -C c2
Specify the container engine:
frontail \
--container my-container \
--container-engine podman
Select a container source in the sidebar and press Download to retrieve its complete log history as a .log file.
To stream container logs from the frontail Docker image, mount the Docker socket:
services:
frontail:
image: hbenali/frontail:latest
command: --container myapp /logs/syslog
volumes:
- /var/log:/logs:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
The container entrypoint automatically adds the frontail user to the Docker socket's group at startup.
Enable log highlighting with:
frontail --ui-highlight /var/log/syslog
The default preset is:
./preset/default.json
Example:
{
"words": {
"err": "color: red;"
},
"lines": {
"err": "font-weight: bold;"
}
}
Available presets include:
defaultnpmlogpythonAutomatic log colorization is enabled by default.
Use:
frontail --ui-no-colors /var/log/syslog
to disable it server-wide.
Each viewer can also toggle Colors from the sidebar. This per-browser setting is persisted locally.
When a line already contains ANSI escape codes, frontail renders those colours directly and skips format autodetection for that line.
The interface displays an indicator for ANSI-colored sources and provides a Sanitized download option that removes ANSI escape sequences.
For regular text logs, frontail automatically recognizes and colorizes relevant fields such as:
Recognized formats include:
If no known format matches, a generic fallback detects:
Structured JSON logs are rendered as readable, colorized key=value pairs instead of raw escaped JSON.
This works with formats such as:
Fields such as level, time, status, and IP-related keys are automatically recognized where possible.
The UI supports dedicated colorization for several common formats:
| Format | Screenshot |
|---|---|
| Nginx error log | docs/screenshots/nginx-error.png |
| Apache2 error log | docs/screenshots/apache-error.png |
| Tomcat/Catalina | docs/screenshots/catalina.png |
| Log4j/Logback | docs/screenshots/log4j-logback.png |
| Generic syslog | docs/screenshots/syslog.png |
| Generic fallback | docs/screenshots/generic-fallback.png |
When ANSI codes are detected, the sidebar provides a Sanitized download button next to the normal download option.
The sanitized version removes ANSI escape sequences before downloading the log, making it convenient for:
Custom rules can be supplied with:
frontail \
--ui-colors-preset ./preset/my-colors.json \
/var/log/syslog
Example:
{
"name": "log4j-pipe",
"regex": "^(\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}[.,]\\d{3})\\s*\\|\\s*(\\w+)\\s*\\|\\s*",
"template": "{1:time} | {2:level} | "
}
regex โ JavaScript regular-expression source.flags โ optional regular-expression flags such as i.template โ replacement template for matched text.Capture groups can be styled using:
{1:time}
{1:ip}
{1:method}
{1:logger}
{1:status}
{1:level}
HTTP status codes are automatically colored according to their first digit.
Log levels are automatically styled according to severity.
Inline CSS colors are also supported:
{1:#c084fc}
Example configuration:
events {
worker_connections 1024;
}
http {
server {
listen 8080;
location /frontail {
proxy_pass http://127.0.0.1:9001/frontail;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}
Start frontail with:
frontail --url-path /frontail
The WebSocket upgrade headers are required for real-time log streaming.
Published images are available from Docker Hub.
docker pull hbenali/frontail:latest
docker build -t hbenali/frontail .
docker buildx build \
--platform linux/amd64,linux/arm64 \
--build-arg FRONTAIL_VERSION=$(node -p "require('./package.json').version") \
--build-arg FRONTAIL_REVISION=$(git rev-parse HEAD) \
-t hbenali/frontail:latest \
--push .
docker run -d \
-p 9001:9001 \
-v /var/log:/log \
hbenali/frontail /log/syslog
docker run -d \
-p 9001:9001 \
-v /var/log:/log:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
hbenali/frontail /log/syslog \
--container myapp
docker run -d \
-p 9001:9001 \
-v /var/log:/log:ro \
-v ./my-colors.json:/frontail/preset/my-colors.json:ro \
hbenali/frontail /log/syslog \
--ui-colors-preset /frontail/preset/my-colors.json
The Docker image uses:
frontail userThe project includes deployment examples covering several configurations, including:
Author: Houssem Ben Ali Website: https://frontail.hbenali.ovh/โ Contact: [email protected]โ
frontail is based on the original frontail project created by Maciej Winnicki.
This fork is maintained by Houssem Ben Ali.
MIT
Content type
Image
Digest
sha256:f97086a5fโฆ
Size
74.7 MB
Last updated
3 days ago
docker pull hbenali/frontail