How to monitor changes on a website

 
 
  • Gérald Barré

ChangeDetection.io is a service that monitors websites and notifies you when changes occur. In an ideal world, every website would provide an RSS feed to subscribe to, but that is rarely the case. Detecting changes is useful for tracking new product releases or restocks. You can subscribe to <changedetection.io> for about $8/month, or self-host the Docker containers. I chose the latter since I already have the infrastructure. Here is how to set it up.

First, you need to create a docker-compose.yml file. This file will configure 2 services:

  • changedetection is the main service that will monitor the website
  • playwright-chrome is a service that will be used by changedetection to access websites and execute JavaScript if needed
docker-compose.yml (YAML)
version: '3.2'
services:
    changedetection:
      image: ghcr.io/dgtlmoon/changedetection.io
      container_name: changedetection
      hostname: changedetection
      volumes:
        - ./changedetection-data:/datastore
      environment:
        - PLAYWRIGHT_DRIVER_URL=ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true
        - BASE_URL=http://localhost:5000 # Replace with your public URL
        - HIDE_REFERER=true
      ports:
        - 5000:5000 # Replace with your public port (e.g. 80:5000)
      restart: unless-stopped
      depends_on:
        playwright-chrome:
            condition: service_started

    playwright-chrome:
        hostname: playwright-chrome
        image: browserless/chrome
        restart: unless-stopped
        environment:
            - SCREEN_WIDTH=1920
            - SCREEN_HEIGHT=1024
            - SCREEN_DEPTH=16
            - ENABLE_DEBUGGER=false
            - PREBOOT_CHROME=true
            - CONNECTION_TIMEOUT=300000
            - MAX_CONCURRENT_SESSIONS=10
            - CHROME_REFRESH_TIME=600000
            - DEFAULT_BLOCK_ADS=true
            - DEFAULT_STEALTH=true
            - DEFAULT_IGNORE_HTTPS_ERRORS=true

Then, you can use docker-compose up to start the service:

Shell
docker-compose up

Once running, open http://localhost:5000 and start creating your rules. For notifications, navigate to http://changedetection:5000/settings#notifications. More than 70 notification services are supported: you can send an email, send an HTTP request (which can be integrated with Power Automate, IFTTT, Zapier, etc.), or send a message to applications such as Slack or Telegram. Documentation is available directly on the settings page. For example, you can use your Gmail account: mailto://meziantou:app_password@gmail.com?to=me+notification@gmail.com. Gmail users must use an app password.

Do you have a question or a suggestion about this post? Contact me!

Follow me:
Enjoy this blog?