- add URLs to
data/urls.yaml
(seedata/urls.example.yaml
for two simple examples or take a look at the Jobs section in the urlwatch documentation for all details) - copy
data/urlwatch.template.yaml
todata/urlwatch.yaml
and configure at least one reporter (e.g. SMTP account details) - run urlwatch:
docker-compose up -d
# watch log output
docker-compose logs -f
# stop urlwatch
docker-compose down
If you don't want to use Docker Compose, you can run the container with Docker:
# run once
docker run --rm --interactive --tty \
--volume "$(pwd)/data":/data/urlwatch \
--volume /etc/localtime:/etc/localtime:ro \
ghcr.io/mjaschen/urlwatch
# run in background and restart automatically
docker run --tty --detach --restart unless-stopped \
--name urlwatch \
--volume "$(pwd)/data":/data/urlwatch \
--volume /etc/localtime:/etc/localtime:ro \
ghcr.io/mjaschen/urlwatch
# watch log output
docker logs --follow urlwatch
urlwatch runs once every 15 minutes with the provided default settings. It's possible to adjust that interval by editing the provided crontab
file and mount in into the container.
For running every hour instead of the default 15 minutes, change crontab
as following:
0 * * * * cd /data/urlwatch && urlwatch --verbose --urls urls.yaml --config urlwatch.yaml --hooks hooks.py --cache cache.db
Mount crontab
into the container:
docker-compose run --rm --volume "$(pwd)/crontabfile:/crontabfile:ro" --volume "$(pwd):/data" --volume /etc/localtime:/etc/localtime:ro urlwatch
or add the mount to docker-compose.yml
:
version: "3"
networks:
urlwatch:
services:
urlwatch:
image: ghcr.io/mjaschen/urlwatch
volumes:
- ./crontabfile:/crontabfile:ro
- ./data:/data/urlwatch
- /etc/localtime:/etc/localtime:ro
restart: "unless-stopped"
networks:
- urlwatch
- clone repository:
git clone git@github.com:mjaschen/urlwatch-docker.git
- adjust interval in crontab if needed (urlwatch is started every 15 minutes with the provided default)
- build the image and run urlwatch