Updating

Pull the newest image and recreate the container; the data volume is untouched. Take a backup first if you like (Settings → Backup & restore → Download backup).

  • Added to your own docker-compose.yml: docker compose pull netlens && docker compose up -d netlens
  • Separate file: docker compose -f docker-compose.simple.yml pull && docker compose -f docker-compose.simple.yml up -d
  • Clone of this repository (docker-compose.yml): docker compose pull && docker compose up -d
  • Portainer: open the stack, press Update the stack with Re-pull image on. A single container: Duplicate/Edit, switch Always pull the image on, and Deploy. Portainer copies the environment variables of the old container into the new form, including ones the old image set itself; since 0.4.137 Netlens ignores a copied NETLENS_VERSION (the System log says so), and you can delete that line.
  • Synology: Project → netlens → Action → Build (it pulls the newest image), then start it again.

Netlens shows an Update available badge when a newer image exists. It only tells you; it cannot update itself from the inside: the container runs with a read-only file system and without extra rights (that is part of its security), and the application is part of the image. So an update always means pulling the newest image and recreating the container; your data, settings and plugins live in the data volume and stay as they are, and the database upgrades itself on start. The exception is plugins, which you update under Settings → Plugin store without a new image. A tool such as Watchtower can pull and restart the container on a schedule, but I would not use it here: the database is upgraded when a new version starts, so a faulty release would be applied to your data without you looking. The same steps are shown under Settings → About → Updates. To check: docker compose ps should show healthy, and curl http://<docker-host>:8080/api/health answers {"status":"ok"}. Old images can be removed afterwards with docker image prune -f.

If you build from source (the build override): pull the new code with git pull (a specific release: git fetch --tags && git checkout <tag>), set NETLENS_VERSION as shown under Advanced and run docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build.

If you moved from the old DOCKERDIR files: the compose files no longer use DOCKERDIR. To keep using your existing data folder, add NETLENS_DATA=<your DOCKERDIR>/appdata/netlens to your .env (or use that path as the volume in your own compose file) before the next docker compose up; otherwise Netlens starts empty in a new Docker volume (your old folder is not touched).