Docker Compose (existing file)

If you already keep your containers in one docker-compose.yml, paste this service under services: and add netlens-data: under the volumes: list at the bottom of the same file (create a volumes: list if there is none). Nothing else is needed: no extra variables, no folders.

  netlens:
    image: ghcr.io/gatlarf/netlens:latest
    container_name: netlens
    restart: unless-stopped
    network_mode: host          # required to see the devices on your network (ARP, mDNS, SSDP)
    cap_drop:
      - ALL
    cap_add:
      - NET_RAW
      - NET_ADMIN
    read_only: true
    tmpfs:
      - /tmp
    volumes:
      - netlens-data:/data
    environment:
      - TZ=Europe/Brussels      # your time zone
volumes:
  netlens-data:

Then run docker compose up -d netlens and open http://<this-device>:8080. To update later: docker compose pull netlens && docker compose up -d netlens. Your own data folder instead of a Docker volume: replace netlens-data:/data with /path/to/netlens:/data and run sudo chown 10001:10001 /path/to/netlens once.