Watchdog is a visual website monitoring app. It was created as a self-hosted alternative to commercial solutions such as visualping and sken.io. With Watchdog, you can monitor changes on websites. Two comparison methods are supported.
Watchdog periodically captures a screenshot of any given web page, and looks for any pixel-level changes between the current and previously captured screenshot. If a change is big enough, a notification email will be sent. You can crop the screenshot to focus only on a specific part on the page.
watchdog_demo.mp4
Watchdog can also detect text-based changes on the page. Whenever there is a change, a notification email will be sent. You can use CSS selectors to monitor changes only in a single element. Alternatively, you can define a set of keywords, and Watchdog will notify you whenever those words are either found or not found on the page.
It is recommended to deploy Watchdog using Docker. However, you can also deploy it manually.
Once deployed, create a new admin account with the same username as defined in ADMIN_USERNAME
. Log in, go to Settings and configure the email settings.
Docker
Provide your own values for JWT_SECRET
, and APP_URL
in environment
in the watchdog_api
container in docker-compose.yml
. If needed, adjust port and network values to suit your needs.
Add the REACT_APP_API_PATH
environment variable to the watchdog_frontend
container in docker-compose.yml
. This should be the base URL of the API, i.e. the same value as APP_URL
in watchdog_api
container.
Start the containers with the following command.
docker compose up -d
The frontend should be available at port 3000.
To stop the containers, run
docker compose down
Manual deployment
In order to run the backend server, a .env
file must be placed in the backend
folder. Fill in the following details.
# Database settings
MONGODB_URI="mongodb://127.0.0.1:27017/watchdog"
# JWT settings
JWT_SECRET=<Some long random string>
JWT_EXPIRES_IN=<e.g. "30d">
# Port
PORT=3001
# Base URL
APP_URL=<Base URL of the api, e.g. https.//example-api.com>
# File path
FILES_PATH="./files"
# Admin username
# Account with this name will receive admin rights
ADMIN_USERNAME="admin"
After this, you can start the server. If you want to run it persistently, use forever
or pm2
.
cd backend
npm install
npm install -g pm2@latest
pm2 start index.js
npm install -g forever
forever start index.js
Install and build.
npm install
npm run build
The built site will be in /build
.