Goal
Run ChangeDetection for websites that require JavaScript rendering (SPA apps, modern e-shops, dynamic content sites) using TrueNAS Apps (Docker backend).
Why WebDriver is Needed
Default ChangeDetection fetches raw HTML only.
Many modern websites:
-
render content client-side
-
return incomplete HTML to non-browser clients
-
rely on JavaScript execution
Solution: use Selenium Chrome as an external rendering engine.
Architecture
ChangeDetection connects to a dedicated Selenium Chrome container via WebDriver API.
ChangeDetection → WebDriver URL → Selenium Chrome → Rendered Page Content
This keeps browser runtime isolated from the main monitoring application.
Chrome WebDriver App (Custom App)
Image:
selenium/standalone-chrome:latest
Port:
4444 TCP (host → container)
Recommended environment variables:
SE_NODE_MAX_SESSIONS=2
SE_NODE_OVERRIDE_MAX_SESSIONS=true
Recommended resources:
Minimum: 2 GB RAM, 1 CPU
Recommended: 4 GB RAM, 2 CPU
Health check:
http://NAS_IP:4444/wd/hub/status
Should return JSON status.
ChangeDetection Configuration
Environment variable:
WEBDRIVER_URL=http://NAS_IP:4444/wd/hub
In UI:
Fetch Method → WebDriver Chrome / Javascript
Wait before extracting:
2–5 seconds recommended.
Why Separate Containers
Stability:
If Chrome crashes, ChangeDetection keeps running.
Resource isolation:
Chrome is memory heavy and should be isolated.
Update safety:
No need to modify ChangeDetection container.
Debugging:
Separate logs and easier troubleshooting.
Performance Notes (CPU-only NAS)
Works without GPU acceleration.
Expect slower rendering and higher RAM usage.
This is normal for headless browser workloads.
When to Use WebDriver
Use for:
-
E-commerce
-
SPA apps
-
Dynamic listings
-
Government portals
Avoid for:
-
Static HTML sites
-
RSS feeds
-
Simple pages
WebDriver adds latency and memory overhead.
Common Problems
Tab crashed:
Increase RAM or reduce session count.
Timeout:
Increase wait time or check interval.
High memory usage:
Restart Chrome container periodically.
Real World Use Cases
Price monitoring
Public announcements
Real estate listings
Stock availability
Dynamic dashboards
Summary
Running Selenium Chrome as a separate TrueNAS App provides stable JavaScript rendering for ChangeDetection while keeping the monitoring stack isolated and maintainable.