Upgrade Argus
An upgrade replaces the release files and rebuilds the images. The database schema is brought up to date automatically when Argus starts. Your data stays in the Docker volumes.
Before you upgrade
- If the new release comes with upgrade notes, read them first. They list any extra steps. For 0.4.0, see Upgrading to 0.4.0.
- Back up the site: the database and the clips.
- Plan a short maintenance window. Cameras are not watched while the edge nodes restart.
Upgrading signs every user out once. Users sign in again afterwards.
Upgrading to 0.4.0
Argus 0.4.0 adds Reports, ONVIF camera discovery, password reset by email and user management in the dashboard, and gives edge nodes their own, limited credentials. Upgrade in this order.
1. Give edge nodes their own credentials
- On the site node, add
EDGE_DB_PASSWORDandEDGE_REDIS_PASSWORDto.env, each a different random value, for example fromopenssl rand -hex 24. See Edge node credentials. - Upgrade the site node. The
migrateservice creates the database userargus_edge, and Redis creates the userargus-edge, from these values. The built-in edge node uses them automatically. - Upgrade each edge node on another host. Give it only
EDGE_DB_PASSWORD,EDGE_REDIS_PASSWORDandLIVE_STREAM_SECRET. Edge nodes no longer use any clip storage credentials: the site sends an upload link with each clip request. Remote edge hosts now useedge-node/docker-compose.remote.yml, and the site node usesdocker-compose.lan.ymlwithARGUS_LAN_IP. See Add an edge node on another host. - Restrict the LAN ports
5432,6379and8333in Docker'sDOCKER-USERchain. Ports published by Docker bypass ufw and firewalld. See Firewall.
2. Rotate the clip storage key
Edge nodes set up before 0.4.0 hold the site's clip storage key, S3_ACCESS_KEY and S3_SECRET_KEY. Once every edge node runs 0.4.0, change that key:
- On the site node, set new values for
S3_ACCESS_KEYandS3_SECRET_KEYin.env, and rundocker compose up -d. The clip storage and every site service pick up the new key. - Delete
S3_ACCESS_KEYandS3_SECRET_KEYfrom every edge host's.env. - Set
ARGUS_ACCEPT_LEGACY_CLIP_KEYS=falsein the site node's.env, and rundocker compose up -d. The site then refuses clips from edge nodes that don't use upload links.
3. Check edge node live video addresses
An EDGE_PUBLIC_URL other than /edge/<node-name>, and any full address that a node registered for itself, no longer gives a live view. Pin such addresses as an admin in Cameras & Edge Nodes > Edge Nodes.
4. Database access rights
migrate takes the CONNECT and TEMPORARY rights away from PUBLIC on the Argus database, so only its owner and argus_edge can connect. It also blocks creating and writing large objects there. Other databases on the same PostgreSQL server are not changed. If the server hosts anything else, revoke CONNECT on those databases yourself.
5. Set up password reset email
- Set
PUBLIC_BASE_URLin.envto the address users open the dashboard at, for examplehttps://argus.example.com, or rely onSITE_DOMAIN. Reset links point there. - Choose how the site sends mail: an email channel under Settings > Notifications > Account Emails, or the
SMTP_*settings in.env.
Without mail transport, users who forget their password are asked to contact an administrator. See Set up password reset email.
Admins now manage roles, password resets and deactivation in Settings > Team Access. The last active admin can no longer be made an operator, deactivated or deleted. See Manage users.
6. Turn on camera discovery (optional)
ONVIF discovery is off on Docker's default network (ONVIF_DISCOVERY=off). To scan a camera network, add docker-compose.onvif-macvlan.yml (recommended) or docker-compose.onvif-host.yml. EDGE_API_UPSTREAMS tells the site how to reach each edge node for a scan; it defaults to CADDY_EDGE_UPSTREAMS. See Camera discovery (ONVIF).
Removed in the next release
- Edge nodes that use the site's own PostgreSQL and Redis passwords because
EDGE_DB_PASSWORDorEDGE_REDIS_PASSWORDis not set. In 0.4.0 they still work, with a warning in the log. - Old clip uploads.
ARGUS_ACCEPT_LEGACY_CLIP_KEYSwill default to off, and clips from edge nodes older than 0.4.0 will be refused.
Upgrade the site node
-
Stop Argus, so that the schema update has the database to itself. Your data stays in the volumes.
docker compose down -
Replace the release files in the release folder with the new ones. Keep your own files:
.env, thecerts/folder if you use your own certificate, and any Compose file you added, such asdocker-compose.lan.yml. -
Compare
.env.examplefrom the new release with your.env, and add any new required settings. -
Rebuild and start everything:
docker compose up -d --build
docker compose psBefore any other service starts, the one-shot
migrateservice applies the database schema and any new migrations, then exits. You don't run any migration step yourself. Ifmigratefails, nothing else starts. Checkdocker compose logs migrate. -
Check the site: open the dashboard, and check in Cameras & Edge Nodes that every edge node shows as online.
SeaweedFS, Caddy and Ollama are pinned to fixed versions in docker-compose.yml. A new release brings any version changes with it.
Upgrade the models
The Ollama models stay in their volume through an upgrade. If the upgrade notes name a new model, or a newer version of the same one, pull it:
docker compose exec ollama ollama pull <model>
The YOLO weights are built into the edge node image.
For an offline site, prepare the new images and models on a connected machine, as in Offline sites.
Upgrade edge nodes on other hosts
Run the same Argus release on the site node and on every edge node. On each edge host:
-
Replace the
edge-node/folder with the one from the new release. Keep.env. -
If the host still uses its own
docker-compose.ymlfrom an earlier release, switch to the one in the folder: addCOMPOSE_FILE=docker-compose.remote.ymlto.env, then delete the olddocker-compose.yml. -
If
.envstill has the site'sPOSTGRES_PASSWORDorREDIS_PASSWORD, replace them with the edge node credentials from the site node's.env. Set those on the site node first. DeleteS3_ACCESS_KEYandS3_SECRET_KEY: edge nodes no longer need them. -
If
EDGE_PUBLIC_URLis set to anything other than/edge/<node-name>, the node no longer registers it. Pin that address for the node in Cameras & Edge Nodes > Edge Nodes instead. -
Rebuild and restart:
docker compose up -d --build -
Check in Cameras & Edge Nodes that the node shows as online, and that
docker compose logs edge-nodeshows no warning about site-wide credentials.
An edge node that still has the site's own passwords keeps working for one more release, and logs a warning.
When every edge node runs 0.4.0, rotate the clip storage key.
Upgrade from a release with MinIO and plain HTTP
Releases before HTTPS by default stored clips in MinIO and served the dashboard over plain HTTP on port 8000. The current release uses SeaweedFS for clips and Caddy for HTTPS. To move a site across:
-
Stop Argus with
docker compose down, and replace the release files. -
Rewrite
.envfrom the new.env.example. Carry your values over:Older setting Current setting ARGUS_DB_PASSWORDPOSTGRES_PASSWORDARGUS_SESSION_SECRETSESSION_SECRETARGUS_MINIO_USER,ARGUS_MINIO_PASSWORDKeep them as MINIO_ROOT_USERandMINIO_ROOT_PASSWORDuntil the clips are copied (step 5).Then add the new required settings:
LIVE_STREAM_SECRET,REDIS_PASSWORD,S3_ACCESS_KEYandS3_SECRET_KEY. Keep the sameCOMPOSE_PROJECT_NAME, so that Argus finds your existing volumes. SetCOMPOSE_FILEas in the install, withoutdocker-compose.site.yml. The current release takes all settings from.env, so you no longer need that file. -
Choose the HTTPS certificate.
-
If
.envsetsEDGE_PUBLIC_URLto anhttp://address, remove it. Also clear anyhttp://address pinned for a node in Cameras & Edge Nodes > Edge Nodes after the start. HTTPS dashboards blockhttp://live video. -
Start Argus, then copy the clips from the old MinIO volume into SeaweedFS:
docker compose up -d --build
scripts/migrate_minio_to_seaweedfs.shThe script runs the old MinIO image on the old volume, copies the clip bucket into SeaweedFS, and checks that the object count and size match. It publishes nothing on the host, and you can run it again safely. Run it from the release folder, so that it reads
.env. If the old volume has a name other thanargus_miniodata, setMINIO_VOLUMEto that name when you run it.New clips work straight away. Until the script has run, older alerts show no playable clip.
-
When older clips play in the dashboard, remove the old volume, and remove
MINIO_ROOT_USERandMINIO_ROOT_PASSWORDfrom.env:docker volume rm argus_miniodata -
Update bookmarks from
http://<site-node>:8000/tohttps://<site-node>/. Close the old ports (8000,8080,9000,9001,5432,6379and11434) in your firewall, and open443and80. If you run edge nodes on other hosts, set them up again as in Add an edge node on another host.
After a restart
- The rule engine remembers which alerts it has already raised only while it runs. After a restart, a person or vehicle that is still in view can raise its alert again.
- An edge node only cuts clips for alerts raised while it runs. Alerts raised while it restarts can have no clip.
Roll back
If an upgrade fails, go back to the previous release and the backup you took before you started.
-
Stop Argus:
docker compose down -
Put back the previous release files and the
.envthat went with them. -
If the new release changed the database, restore the database and the clips from your backup. See Restore a site. Restore both from the same backup, so that clips and events match.
-
Rebuild and start Argus, and check it:
docker compose up -d --build
docker compose ps
Roll back edge nodes on other hosts the same way: put back the previous edge-node/ folder, then run docker compose up -d --build.