VPSFolio

2026-12-02 · docker · monitoring · self-hosted · devtools

Self-Host changedetection.io with Docker: Visual Diff Monitoring

Run changedetection.io in Docker to monitor web pages, track price/restock changes, and get alerts via Discord, Slack, or webhooks — with HTTPS and

Bench run · 2026-12-02 Verified
dgtlmoon/changedetection.io
Total RAM
104.6 MB
Startup
125.0 s
Port
5000
HTTP
200
ghcr.io/dgtlmoon/changedetection.io:latest · 1 container · dgtlmoon/changedetection.io

What changedetection.io does and what it needs

changedetection.io watches web pages and tells you when they change. It stores a snapshot of each watch, re-fetches on a schedule, and produces a word/line/character diff. Notifications go out through Apprise, which covers Discord, Slack, Telegram, email, generic webhooks, and dozens more. There’s also a dedicated restock/price mode that pulls product metadata (price, availability) out of the page and graphs it over time.

The container is a single Python/Flask app. It keeps everything under /datastore: the watch list, snapshots, diffs, screenshots, and the url-watches.json state file. That one volume is the whole backup surface. No external database, no Redis, no message broker.

Optional extras you can wire in later: a Playwright/sockpuppet Chrome sidecar for JavaScript-heavy sites and visual selectors, and an LLM provider (OpenAI, Gemini, Anthropic, or a local Ollama endpoint) for plain-language change summaries. Neither is required to boot.

The upstream project does not publish a minimum memory figure. Practical usage scales with watch count and fetch concurrency: an idle instance with a handful of plain-HTTP watches sits comfortably in a small container, while FETCH_WORKERS at the default of 10 against JS-heavy pages (or enabling the Chrome sidecar) pushes memory and CPU up noticeably. Size for your watch count, not for a number on a spec sheet.

Prerequisites, ports, and volume constraints

  • Docker Engine 24+ with the Compose v2 plugin (docker compose, not docker-compose).
  • A hostname with an A/AAAA record pointing at the VPS if you want HTTPS. You can test on 127.0.0.1:5000 without one.
  • Port 5000 is the app’s default listener inside the container. We bind it to 127.0.0.1:5000 on the host so Caddy or Nginx terminates TLS in front of it.
  • One named volume, changedetection-data, mounted at /datastore. Do not point this at a bind mount on a network filesystem — SQLite-style file writes and the snapshot tree expect a normal local filesystem.
  • Timezone matters. Watch schedules are evaluated in the container’s timezone, so set TZ explicitly or your “check at 09:00” watches fire at the wrong hour.

If you want to poke at the UI before DNS is ready, either SSH-tunnel (ssh -L 5000:127.0.0.1:5000 user@vps) or temporarily change the port mapping to 0.0.0.0:5000:5000 — and change it back. Leaving it public means an unencrypted login form on your IP.

Production Docker Compose setup

Create the project directory and the compose file:

mkdir -p /opt/changedetection && cd /opt/changedetection
cat <<'EOF' > compose.yml
services:
  changedetection:
    image: ghcr.io/dgtlmoon/changedetection.io:latest
    container_name: changedetection
    hostname: changedetection
    restart: unless-stopped
    ports:
      - "127.0.0.1:5000:5000"
    volumes:
      - changedetection-data:/datastore
    environment:
      TZ: ${TZ:-UTC}
      BASE_URL: ${BASE_URL:-http://localhost:5000}
      LOGGER_LEVEL: ${LOGGER_LEVEL:-INFO}
      FETCH_WORKERS: ${FETCH_WORKERS:-10}
      MINIMUM_SECONDS_RECHECK_TIME: ${MINIMUM_SECONDS_RECHECK_TIME:-3}
      USE_X_SETTINGS: ${USE_X_SETTINGS:-1}
      USE_X_SETTINGS_TRUSTED_PROXIES: ${USE_X_SETTINGS_TRUSTED_PROXIES:-127.0.0.1,::1}
      HIDE_REFERER: ${HIDE_REFERER:-true}
      DISABLE_VERSION_CHECK: ${DISABLE_VERSION_CHECK:-false}

volumes:
  changedetection-data:
EOF

Now the environment file. BASE_URL is the one value you must get right — it’s embedded in notification links, so a wrong value sends your alerts to a dead URL.

cat <<'EOF' > .env
# Public URL of this install, used in notification links
BASE_URL=https://watch.example.com

# Scheduling timezone (see the tz database list)
TZ=UTC

# Log verbosity: TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL
LOGGER_LEVEL=INFO

# Parallel fetchers — raise with care, each one is a live HTTP/browser session
FETCH_WORKERS=10

# Floor on re-check interval in seconds; 0 disables the floor
MINIMUM_SECONDS_RECHECK_TIME=3

# Trust X-Forwarded-* only from the local reverse proxy
USE_X_SETTINGS=1
USE_X_SETTINGS_TRUSTED_PROXIES=127.0.0.1,::1

# Don't leak your hostname to monitored sites
HIDE_REFERER=true

# Set true to skip the upstream version-check call
DISABLE_VERSION_CHECK=false
EOF

Start it:

docker compose up -d
docker compose logs -f changedetection

You should see the Flask server bind on 0.0.0.0:5000 inside the container. From the host, curl -I http://127.0.0.1:5000 returns a redirect to the login page.

A note on USE_X_SETTINGS_TRUSTED_PROXIES: with USE_X_SETTINGS=1 and no trusted-proxy list, any client can spoof X-Forwarded-For and X-Forwarded-Proto. Keep the list tight. If your reverse proxy runs in a Docker network rather than on the host, replace 127.0.0.1 with that network’s CIDR (for example 172.18.0.0/16).

Reverse proxy, HTTPS, and first-run hardening

changedetection.io is a normal HTTP app behind a proxy, but two things bite people: WebSocket upgrades (the UI uses them for live diff updates) and upload size (screenshots and imported .xlsx watch lists).

Caddy handles both with almost no config:

watch.example.com {
    encode zstd gzip
    request_body {
        max_size 25MB
    }
    reverse_proxy 127.0.0.1:5000 {
        header_up X-Forwarded-Proto {scheme}
        header_up X-Forwarded-For {remote_host}
    }
}

Caddy upgrades WebSockets automatically. If you’re on Nginx instead, the location / block needs proxy_http_version 1.1, proxy_set_header Upgrade $http_upgrade, proxy_set_header Connection "upgrade", plus client_max_body_size 25m; and proxy_set_header X-Forwarded-Proto $scheme;.

After the proxy is live, update .env so BASE_URL matches the public HTTPS URL and restart:

docker compose up -d

First-run hardening checklist:

  1. Open https://watch.example.com and set the admin password immediately. The app has no default credentials, but the first visitor to a fresh instance claims it.
  2. If you’re not ready to expose it, keep the 127.0.0.1 binding and use an SSH tunnel until the password is set.
  3. Set MINIMUM_SECONDS_RECHECK_TIME to something sane (3s is the floor; 60s is kinder to the sites you monitor).
  4. If you enable LLM summaries, remember that page diffs leave your server and go to the provider you configure. Use a local Ollama endpoint if that’s a problem, and set LLM_FEATURES_DISABLED=true if you want the feature off entirely.
  5. Leave ALLOW_FILE_URI unset. Enabling it lets watches read local files inside the container.

Updating, backups, and common pitfalls

Update by pulling the new image and recreating the container. The :latest tag tracks stable releases; :dev is the bleeding-edge branch and not what you want in production.

cd /opt/changedetection
cp .env .env.bak
docker compose pull
docker compose up -d
docker compose logs --tail=50 changedetection

Backups are a single volume. Stop the container first so the JSON state file and snapshot tree are consistent, then tar the volume:

docker compose stop changedetection
docker run --rm \
  -v changedetection-data:/data \
  -v "$(pwd)/backups:/backup" \
  alpine tar czf /backup/changedetection-$(date +%F).tar.gz -C /data .
docker compose start changedetection

Restore is the reverse: stop the container, extract the tarball into a fresh volume, start it. Test the restore on a scratch host before you need it for real.

Two pitfalls worth knowing before they bite:

Schedules run in the container’s timezone. If TZ is left at UTC but you configured a watch for “business hours” in your local time, it fires at the wrong time — often silently, because the watch still works, just not when you expected. Set TZ in .env and restart.

BASE_URL is baked into notification payloads. Change your domain, forget to update BASE_URL, and every Discord/Slack alert links to the old host. The fix is a one-line .env edit plus docker compose up -d, but only if you remember it exists. Keep it in sync with your proxy config.

A third, quieter one: FETCH_WORKERS at 10 means up to 10 concurrent outbound fetches. On a small VPS with many JS-heavy watches, that saturates CPU and makes checks queue. Lower it to 3–5 and watch the logs before scaling up.


Measured in our sandbox run: total memory 104.6 MB (sum of per-container peaks over a 30s idle window after startup) across 1 container; largest container 104.6 MB; published port(s) 5000; HTTP probe returned 200. The run took 125.0s including the image download.


Verification: we ran this docker-compose stack in a disposable Docker environment and recorded the measurements above. They describe that run, not a guarantee for your host.