I will be installing CD using pip
- no Docker - on Debian 12
Install pip3
apt install python3.11-venv
Create a new installation directory and venv
mkdir /opt/change-detection
python3.11 -m venv /opt/change-detection/
Move into the installation directory and activate the venv
cd /opt/change-detection/
source bin/activate
Use pip
to install changedetection.io
pip3 install changedetection.io
Create a data directory for CD to store application data
mkdir data
Confirm CD works - start the app and navigate to the web GUI using port 5000/tcp
changedetection.io -d /opt/change-detection/data -p 5000
You can now deactivate
out of the venv
deactivate
Create a new Unix user to run the CD app
adduser --disabled-password --disabled-login --no-create-home changedetection
NOTE: Notice systemd
will start CD to only listen on localhost
. I setup a NGINX reverse proxy the server to better secure the CD application.
Change the ownership of the CD's installation directory to the new user
chown changedetection:changedetection -R /opt/change-detection/
Create a new systemd service file
bash -c "cat > /etc/systemd/system/change-detection.service" <<'EOF'
[Unit]
Description=ChangeDetection.io App
Documentation=https://github.com/dgtlmoon/changedetection.io
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=changedetection
Group=changedetection
WorkingDirectory=/opt/change-detection
ExecStart=/opt/change-detection/bin/changedetection.io -d /opt/change-detection/data -h 127.0.0.1 -p 5000 -l INFO
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
EOF
Reload systemd, enable and start the new service
systemctl daemon-reload
systemctl enable change-detection.service --now
systemctl status change-detection.service