Linux
Checks every file you downloaded, and says OK for each.
curl -fsSLO https://camerarisk.com/agent/camerarisk-agent.mjs
curl -fsSLO https://camerarisk.com/agent/SHA256SUMS.txt
sha256sum --check --ignore-missing SHA256SUMS.txtVersion 1.0.0
One file of JavaScript, no dependencies, for Node.js 18 or later or Docker. It checks the cameras you add on your own network and reports only whether each one answered. Read it before you run it.
$ node camerarisk-agent.mjs test"Front door" (K7Q2M9XDPA): answers (12 ms). Stream: video track found."Driveway" (P4W8N2RTHE): answers (9 ms). Stream: the stream refused the user name and password."Garage" (Q3J6V1XKMB): did not answer: no answer within 2 seconds.Nothing was sent to CameraRisk.01Verify
The SHA-256 of each file. A match proves the download is complete and unchanged since it left this site; it cannot protect against a compromised site, so read the file too.
| File | SHA-256 |
|---|---|
| camerarisk-agent.mjs | 50ae7d4d14061d8958d3db20be0800c1db898c70894dd36805fe392ae7097e44 |
| camerarisk-agent.Dockerfile | c082666b9dd7fac47fc024183b670e6d287b03a9149efb7ac824f5a68d13bdac |
| compose.yaml | 74827a39ee1370d2328e7b5b5ad9519c5fc5c900114c9ac909c6cd10525cc4d1 |
Checks every file you downloaded, and says OK for each.
curl -fsSLO https://camerarisk.com/agent/camerarisk-agent.mjs
curl -fsSLO https://camerarisk.com/agent/SHA256SUMS.txt
sha256sum --check --ignore-missing SHA256SUMS.txtCompare the result with the line for the file above.
shasum -a 256 camerarisk-agent.mjsCompare the result with the line for the file above.
Get-FileHash camerarisk-agent.mjs -Algorithm SHA25602Set up
Get a pairing code on your monitoring page first. It works once, for 15 minutes.
Live monitoring is not open yet. The monitor’s test command already works on your own network, and we can email you once, when Live Watch opens. Ask for that email.
Pair
node camerarisk-agent.mjs pair ABCD-EFGH --name "Home monitor"Add a camera
In a terminal it asks for the name, the camera’s address on your network, the stream path and port from its manual, and the sign-in (the password is not shown as you type). Or use flags, with the password on standard input:
node camerarisk-agent.mjs add
printf %s "$CAMERA_PASSWORD" | node camerarisk-agent.mjs add --name "Front door" \
--host 192.168.1.20 --port 554 --path /stream1 --username viewer --password-stdinTest, without sending anything
node camerarisk-agent.mjs testRun
node camerarisk-agent.mjs run03Keep it running
With camerarisk-agent.mjs in your home folder, paired and with cameras added as your own user. Logs: journalctl -u camerarisk-agent -f
sudo tee /etc/systemd/system/camerarisk-agent.service >/dev/null <<EOF
[Unit]
Description=CameraRisk monitor
Wants=network-online.target
After=network-online.target
[Service]
User=$USER
ExecStart=$(command -v node) $HOME/camerarisk-agent.mjs run
Restart=always
RestartSec=30
NoNewPrivileges=yes
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now camerarisk-agentThe image runs as the unprivileged node user; the config stays in the named volume. Cameras with .local names: use their IP addresses, or add --network host, because mDNS does not reach Docker’s default network.
docker build -f camerarisk-agent.Dockerfile -t camerarisk-agent .
docker run --rm -it -v camerarisk-agent:/config camerarisk-agent pair ABCD-EFGH
docker run --rm -it -v camerarisk-agent:/config camerarisk-agent add
docker run -d --name camerarisk-agent --restart unless-stopped \
-v camerarisk-agent:/config camerarisk-agentDocker Desktop works as above. Without Docker, leave it running in a terminal, or start it at login with your system’s scheduler. A computer that sleeps stops reporting, and you get a “monitor stopped reporting” email.
node camerarisk-agent.mjs run04Configuration
| Code | Meaning |
|---|---|
| timeout | No answer within 2 seconds (5 for the stream) |
| refused | Connection refused: nothing answers on that port |
| unreachable | No route to the camera from the monitor |
| name_not_resolved | Its .local name did not resolve |
| not_private | Its name resolved outside your network, so it was not contacted |
| network_error | A network error on the monitor’s computer |
| not_rtsp | That port did not answer as an RTSP stream |
| bad_response | An answer the monitor could not read |
| redirect | The stream pointed elsewhere; the monitor does not follow it |
| auth_required | The stream needs a user name and password |
| auth_failed | The stream refused the user name and password |
| no_video | The stream described no video track |
| rtsp_error | The stream answered with an error |
05Update or remove
Download the new file, check it against the new SHA256SUMS.txt, replace the old one, and restart the monitor. The config stays.
sudo systemctl restart camerarisk-agentStop it, then delete the config: it holds your camera passwords. Then remove the monitor on your monitoring page: its key stops working and its cameras’ history is deleted.
sudo systemctl disable --now camerarisk-agent
sudo rm /etc/systemd/system/camerarisk-agent.service
rm -r ~/.camerarisk camerarisk-agent.mjs
# or, with Docker
docker rm -f camerarisk-agent
docker volume rm camerarisk-agent