Skip to main content

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​

  1. 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.
  2. Back up the site: the database and the clips.
  3. 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​

  1. On the site node, add EDGE_DB_PASSWORD and EDGE_REDIS_PASSWORD to .env, each a different random value, for example from openssl rand -hex 24. See Edge node credentials.
  2. Upgrade the site node. The migrate service creates the database user argus_edge, and Redis creates the user argus-edge, from these values. The built-in edge node uses them automatically.
  3. Upgrade each edge node on another host. Give it only EDGE_DB_PASSWORD, EDGE_REDIS_PASSWORD and LIVE_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 use edge-node/docker-compose.remote.yml, and the site node uses docker-compose.lan.yml with ARGUS_LAN_IP. See Add an edge node on another host.
  4. Restrict the LAN ports 5432, 6379 and 8333 in Docker's DOCKER-USER chain. 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:

  1. On the site node, set new values for S3_ACCESS_KEY and S3_SECRET_KEY in .env, and run docker compose up -d. The clip storage and every site service pick up the new key.
  2. Delete S3_ACCESS_KEY and S3_SECRET_KEY from every edge host's .env.
  3. Set ARGUS_ACCEPT_LEGACY_CLIP_KEYS=false in the site node's .env, and run docker 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​

  1. Set PUBLIC_BASE_URL in .env to the address users open the dashboard at, for example https://argus.example.com, or rely on SITE_DOMAIN. Reset links point there.
  2. 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_PASSWORD or EDGE_REDIS_PASSWORD is not set. In 0.4.0 they still work, with a warning in the log.
  • Old clip uploads. ARGUS_ACCEPT_LEGACY_CLIP_KEYS will default to off, and clips from edge nodes older than 0.4.0 will be refused.

Upgrade the site node​

  1. Stop Argus, so that the schema update has the database to itself. Your data stays in the volumes.

    docker compose down
  2. Replace the release files in the release folder with the new ones. Keep your own files: .env, the certs/ folder if you use your own certificate, and any Compose file you added, such as docker-compose.lan.yml.

  3. Compare .env.example from the new release with your .env, and add any new required settings.

  4. Rebuild and start everything:

    docker compose up -d --build
    docker compose ps

    Before any other service starts, the one-shot migrate service applies the database schema and any new migrations, then exits. You don't run any migration step yourself. If migrate fails, nothing else starts. Check docker compose logs migrate.

  5. 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:

  1. Replace the edge-node/ folder with the one from the new release. Keep .env.

  2. If the host still uses its own docker-compose.yml from an earlier release, switch to the one in the folder: add COMPOSE_FILE=docker-compose.remote.yml to .env, then delete the old docker-compose.yml.

  3. If .env still has the site's POSTGRES_PASSWORD or REDIS_PASSWORD, replace them with the edge node credentials from the site node's .env. Set those on the site node first. Delete S3_ACCESS_KEY and S3_SECRET_KEY: edge nodes no longer need them.

  4. If EDGE_PUBLIC_URL is 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.

  5. Rebuild and restart:

    docker compose up -d --build
  6. Check in Cameras & Edge Nodes that the node shows as online, and that docker compose logs edge-node shows 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:

  1. Stop Argus with docker compose down, and replace the release files.

  2. Rewrite .env from the new .env.example. Carry your values over:

    Older settingCurrent setting
    ARGUS_DB_PASSWORDPOSTGRES_PASSWORD
    ARGUS_SESSION_SECRETSESSION_SECRET
    ARGUS_MINIO_USER, ARGUS_MINIO_PASSWORDKeep them as MINIO_ROOT_USER and MINIO_ROOT_PASSWORD until the clips are copied (step 5).

    Then add the new required settings: LIVE_STREAM_SECRET, REDIS_PASSWORD, S3_ACCESS_KEY and S3_SECRET_KEY. Keep the same COMPOSE_PROJECT_NAME, so that Argus finds your existing volumes. Set COMPOSE_FILE as in the install, without docker-compose.site.yml. The current release takes all settings from .env, so you no longer need that file.

  3. Choose the HTTPS certificate.

  4. If .env sets EDGE_PUBLIC_URL to an http:// address, remove it. Also clear any http:// address pinned for a node in Cameras & Edge Nodes > Edge Nodes after the start. HTTPS dashboards block http:// live video.

  5. Start Argus, then copy the clips from the old MinIO volume into SeaweedFS:

    docker compose up -d --build
    scripts/migrate_minio_to_seaweedfs.sh

    The 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 than argus_miniodata, set MINIO_VOLUME to that name when you run it.

    New clips work straight away. Until the script has run, older alerts show no playable clip.

  6. When older clips play in the dashboard, remove the old volume, and remove MINIO_ROOT_USER and MINIO_ROOT_PASSWORD from .env:

    docker volume rm argus_miniodata
  7. Update bookmarks from http://<site-node>:8000/ to https://<site-node>/. Close the old ports (8000, 8080, 9000, 9001, 5432, 6379 and 11434) in your firewall, and open 443 and 80. If you run edge nodes on other hosts, set them up again as in Add an edge node on another host.

After a restart​

note
  • 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.

  1. Stop Argus:

    docker compose down
  2. Put back the previous release files and the .env that went with them.

  3. 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.

  4. 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.

Was this page helpful?