Skip to content

MekayelAnik/ispyagentdvr-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iSpy Agent DVR multi-arch image

ispyagentdvr

This is an unofficial multi-aarch docker image of Agent DVR of iSpy created for multiplatform support. iSpy Agent DVR creates a local server for IP cameras to be managed. Official Website: https://www.ispyconnect.com

Docker Pulls

Docker Stars

The architectures supported by this image are:

Architecture Available Tag Status
x86-64 amd64-<version tag> Tested "WORKING"
arm64 arm64v8-<version tag> Tested "WORKING"
armhf arm32v7-<version tag> Tested "WORKING" (4.8.2.0 and newer versions)

🔔🚨📌Important Announcements:📢📢📢

- The following possible BREAKING CHANGES will be present in every future deployment

  • ⚠️⚠️⚠️ 6.3.4.0 and on words has been Directory Structure has been changed. If you are a previous user of ispyagentdvr-docker, Please Update your directory mappings! ⚠️⚠️⚠️
  • FFMPEG version bumped from 7.0.2 to 7.1.1
  • DOTNET version bumped to 9.0
  • Environment Variable WEBUI_PORT is now changed to AGENTDVR_WEBUI_PORT. Those who use Environment Variable to change the Port for Web UI, please use AGENTDVR_WEBUI_PORT from now on.
  • TURN Server Port range is changed from 50000-50010 to 50000-50100. Please set the range in Docker CLI or Docker Compose to 50000-50100

- The Following images: gpu-hwaccel-latest,vlc-hwaccel-latest & vlc-support-latest will be taken down on 1st August 2024. Some images were re-uploaded. The Versions that have been re-uploaded are from 5.3.5.0 to the 5.6.0.0 AgentDVR versions. Only the Default tags were re-uploaded & do incorporate all the features combined that were available on the previously maintained 4 types of images in themselves. Sorry for the inconvenience!This has been done for Rapid Bug detection, complexity reduction, and ease of maintenance

- Alhamdulillah, The ARMHF image has been fixed. Special Thanks To Sean T for fixing the underlying issues. For ARM32-bit/ARMHF devices, please download an image version greater than or equal to 4.8.2.0.

- For GPU HW-Accelerated Encode/Decode please use version 5.3.5.0 or NEWER images

This image provides various versions that are available via tags. Please read the update information carefully and exercise caution when using "older versions" tags as they tend to contain unfixed bugs.

Tag Available Description Status
stable "iSpy Agent DVR" Most Stable image to date Tested "WORKING"
latest "iSpy Agent DVR" Latest releases image Tested "WORKING"
beta ⚠️ "iSpy Agent DVR" BETA releases image ⚠️ LATEST BETA for "BETA TESTING". Backup config before trying!!! Discouraged to use on mission-critical environments!!! ⚠️
6.5.4.0 "iSpy Agent DVR" Static version 6.5.4.0 image Tested "WORKING"
6.4.7.0-beta ⚠️ "iSpy Agent DVR" 6.4.7.0 beta release for testing ⚠️ THOROUGH TESTING REQUIRED. Backup config before trying!!! Discouraged to use on mission-critical envirenments!!! ⚠️

Running Image :

Here are some example snippets to help you get started creating a container.

docker-compose (recommended, click here for more info)

---
services:
  ispyagentdvr:
    image: mekayelanik/ispyagentdvr:latest
    container_name: ispyagentdvr
    environment:
      - PUID=1000
      - PGID=1000
      - AGENTDVR_WEBUI_PORT=8090 
      - TZ=Asia/Dhaka
    volumes:
      - /path/to/config:/home/agentdvr/AgentDVR/Media/XML
      - /path/to/recordings:/home/agentdvr/AgentDVR/Media/WebServerRoot/Media
      - /path/to/commands:/home/agentdvr/AgentDVR/Commands
    ports:
      - 8090:8090
      - 3478:3478/udp
      - 50000-50100:50000-50100/udp
    restart: unless-stopped

Note:

- In the case of Raspberry Pi and other low-power ARM SBCs, please hit the WebUI URL at least 30 seconds after the container deployment. The ARM processors may require a few seconds to kick-start the needed services. Before this time, you may not get a response in the web browser. Also, at first, you may have to refresh the WebUI a couple of times for the UI to load fully.

- Also, if you have a large number of cameras, the boot time will increase accordingly. So please be patient and have a look in the AgentDVR docker container log.

docker run -d \
  --name=ispyagentdvr \
  -e PUID=1000 \
  -e PGID=1000 \
  -e AGENTDVR_WEBUI_PORT=8090
  -e TZ=Asia/Dhaka \
  -p 8090:8090 \
  -p 3478:3478/udp \
  -p 50000-50100:50000-50100/udp \
  -v /path/to/config:/home/agentdvr/AgentDVR/Media/XML \
  -v /path/to/recordings:/home/agentdvr/AgentDVR/Media/WebServerRoot/Media \
  -v /path/to/commands:/home/agentdvr/AgentDVR/Commands \
  --restart unless-stopped \
  mekayelanik/ispyagentdvr:latest

If anyone wishes to give a dedicated Local IP to iSpy Agent DVR container using MACVLAN ( click here for more info)

---
services:
  ispyagentdvr:
    image: mekayelanik/ispyagentdvr:latest
    container_name: ispyagentdvr
    environment:
      - PUID=1000
      - PGID=1000
      - AGENTDVR_WEBUI_PORT=8090 
      - TZ=Asia/Dhaka
    volumes:
      - /path/to/config:/home/agentdvr/AgentDVR/Media/XML
      - /path/to/recordings:/home/agentdvr/AgentDVR/Media/WebServerRoot/Media
      - /path/to/commands:/home/agentdvr/AgentDVR/Commands
    ports:
      - 8090:8090
      - 3478:3478/udp
      - 50000-50100:50000-50100/udp
    restart: unless-stopped
    hostname: ispyagentdvr
    domainname: local
    mac_address: AB-BC-C0-D1-E2-EF
    networks:
      macvlan-1:
        ipv4_address: 192.168.2.12
networks:
  macvlan-1:
    name: macvlan-1
    external: True

To make macvlan work properly, you must map any valid MAC address to mac_address:. Also, you must map any valid IP address in your ip_range to ipv4_address:. This will be your container's IP. Then you must map your Router's Local IP Subnet to subnet: After that you must map your Desired Local IP range within the subnet to ip_range: Finally you must map your Router's LAN IP Address gateway:

In the case of MACVLAN, you must access the WebUI using http://ipv4_address:8090

GPU HW-Acceleration (Tested "WORKING" on images with tag 5.3.5.0 or NEWER)

One must use images from 5.3.5.0 or NEWER images to get the provisioned GPU HW-Acceleration. Older images will not work. If you face any issues, please report this on GitHub of this image. The GitHub link can be found at the bottom of this page.

docker-compose (recommended, click here for more info)

One must be able to pass GPU (Rendering devices) to the container as is instructed below!

---
services:
  ispyagentdvr:
    image: mekayelanik/ispyagentdvr:latest
    container_name: ispyagentdvr
    environment:
      - PUID=1000
      - PGID=1000
      - AGENTDVR_WEBUI_PORT=8090
      - TZ=Asia/Dhaka
    volumes:
      - /path/to/config:/home/agentdvr/AgentDVR/Media/XML
      - /path/to/recordings:/home/agentdvr/AgentDVR/Media/WebServerRoot/Media
      - /path/to/commands:/home/agentdvr/AgentDVR/Commands
    ports:
      - 8090:8090
      - 3478:3478/udp
      - 50000-50100:50000-50100/udp
    restart: unless-stopped
docker run -d \
  --name=ispyagentdvr \
  -e PUID=1000 \
  -e PGID=1000 \
  -e AGENTDVR_WEBUI_PORT=8090 \
  -e TZ=Asia/Dhaka \
  -p 8090:8090 \
  -p 3478:3478/udp \
  -p 50000-50100:50000-50100/udp \
  -v /path/to/config:/home/agentdvr/AgentDVR/Media/XML \
  -v /path/to/recordings:/home/agentdvr/AgentDVR/Media/WebServerRoot/Media \
  -v /path/to/commands:/home/agentdvr/AgentDVR/Commands \
  --restart unless-stopped \
  mekayelanik/ispyagentdvr:latest

For Nvidia GPUs

To get GPU Hardware acceleration from Nvidia, user MUST INSTALL THE "LATEST" Nvidia Drivers & Nvidia Container Toolkit on the Host Machine/Server/VM/LXC provided by Nvidia. Instructions for Nvidia Container Toolkit can be found here:

Nvidia-Container-Toolkit

We added the necessary environment variable that will utilize all the features available on a GPU on the host. Once Nvidia container runtime is installed on your host you will need to re/create the docker container with the nvidia container runtime `--runtime=nvidia` and add an environment variable `-e NVIDIA_VISIBLE_DEVICES=all` (can also be set to a specific gpu's UUID, this can be discovered by running `nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv` ). NVIDIA automatically mounts the GPU and drivers from your host into the AgentDVR docker container.

For INTEL/AMD GPUs & iGPUs

The following have to be added in docker-compose file/docker-cli cm respectively

docker compose

devices:
    - /dev/dri/renderD128:/dev/dri/renderD128
    - /dev/dri/card0:/dev/dri/card0

docker cli

--device /dev/dri/renderD128:/dev/dri/renderD128 --device /dev/dri:/dev/dri/card0

For Rockchip SBC's integrated VPU, use the CLI command below

docker-compose (recommended, click here for more info)

---
services:
  ispyagentdvr:
    image: mekayelanik/ispyagentdvr:latest
    container_name: ispyagentdvr
    environment:
      - PUID=1000
      - PGID=1000
      - AGENTDVR_WEBUI_PORT=8090
      - TZ=Asia/Dhaka
    devices:
      - /dev/dri
      - /dev/dma_heap
      - /dev/mali0
      - /dev/rga
      - /dev/mpp_service
      - /dev/iep
      - /dev/mpp-service
      - /dev/vpu_service
      - /dev/vpu-service
      - /dev/hevc_service
      - /dev/hevc-service
      - /dev/rkvdec
      - /dev/rkvenc
      - /dev/vepu
      - /dev/h265e
    volumes:
      - /path/to/config:/home/agentdvr/AgentDVR/Media/XML
      - /path/to/recordings:/home/agentdvr/AgentDVR/Media/WebServerRoot/Media
      - /path/to/commands:/home/agentdvr/AgentDVR/Commands
    ports:
      - "8090:8090"
      - "3478:3478/udp"
      - "50000-50100:50000-50100/udp"
    restart: unless-stopped
docker run -d \
  --name=ispyagentdvr \
  -e PUID=1000 \
  -e PGID=1000 \
  -e AGENTDVR_WEBUI_PORT=8090 \
  -e TZ=Asia/Dhaka \
  -p 8090:8090 \
  -p 3478:3478/udp \
  -p 50000-50100:50000-50100/udp \
  -v /path/to/config:/home/agentdvr/AgentDVR/Media/XML \
  -v /path/to/recordings:/home/agentdvr/AgentDVR/Media/WebServerRoot/Media \
  -v /path/to/commands:/home/agentdvr/AgentDVR/Commands \
  --restart unless-stopped \
`for dev in dri dma_heap mali0 rga mpp_service \
   iep mpp-service vpu_service vpu-service \
   hevc_service hevc-service rkvdec rkvenc vepu h265e ; do \
  [ -e "/dev/$dev" ] && echo " --device /dev/$dev"; \
 done` 
  mekayelanik/ispyagentdvr:latest

DISCLAIMER: Jellyfin FFMPEG and corresponding ideas were used in this image to enable the HW-Acceleration

Parameters

Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8090:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8090 outside the container.

Parameter Function
-p 8090 Map AgentDVR WebUI Port to HOST
-p 3478/udp Map Main port used for TURN server communication to HOST
-p 50000-50100//udp Map Ports from AgentDVR to HOST, to be used to create connections or WebRTC. These will be used as needed
-e PUID=1000 For UserID - see below for explanation
-e PGID=1000 For GroupID - see below for explanation
-e TZ=Asia/Dhaka Specify a timezone to use, see this list.
-e AGENTDVR_WEBUI_PORT=8090 Specify a Port to Expose AgentDVR WebUI
-v /AgentDVR/Media/XML Contains all relevant configuration files.
-v /AgentDVR/Media/WebServerRoot/Media Location of Surveillance Recordings on disk.
-v /AgentDVR/Commands Location to store desired iSpy Agent DVR Commands.

User / Group Identifiers

When using volumes ( -v flags) permissions issues can arise between the host OS and the container, One can avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id user as below:

$ id username
uid=1000(docker user) gid=1000(docker group) groups=1000(docker group)

For iSpy Agent DVR specific user guide visit:

https://www.ispyconnect.com/userguide-agent-dvr.aspx

Non host network use:

To use a Non-host network, you will need to open up ports for this to properly work, thus the UDP ports listed in the sample runs.

To access WebUI go to the container's http://container's ip:8090 or http://ipv4_address:8090

Updating Info

Below are the instructions for updating containers:

Via Docker Compose (recommended)

  • Update all images: docker compose pull
    • or update a single image: docker compose pull ispyagentdvr
  • Let compose update all containers as necessary: docker compose up -d
    • or update a single container (recommended): docker compose up -d ispyagentdvr
  • To remove the old unused images run: docker image prune

Via Docker Run

  • Update the image: docker pull mekayelanik/ispyagentdvr:latest
  • Stop the running container: docker stop ispyagentdvr
  • Delete the container: docker rm ispyagentdvr
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /AgentDVR/Media/XML folder and settings will be preserved)
  • To remove the old unused images run: docker image prune

Via Watchtower auto-updater (only use if you don't remember the original parameters)

  • Pull the latest image at its tag and replace it with the same env variables in one run:

    docker run --rm \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower\
    --run-once ispyagentdvr
  • To remove the old unused images run: docker image prune

Note: You can use Watchtower as a solution to automated updates of existing Docker containers. However it is discouraged to use automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, it is recommended to use Docker Compose.

Image Update Notifications - Diun (Docker Image Update Notifier)

  • You can also use Diun for update notifications. Other tools that automatically update containers unattended are not encouraged

Migration Notes:

If you had the old format of audio and video volumes please move them to the new media folder before starting the container again.

It would look something like this:

mkdir -p /ispyagentdvr/media/old && \
mv /path/to/recordings/audio /ispyagentdvr/media/old && \
mv /path/to/recordings/video /ispyagentdvr/media/old

NOTES:

- Audio playback on Linux host: If you experiencing sound playback issues on Linux server hosts (Debian/Ubuntu etc.), i.e. Action sound won't play through server's speaker, add these lines to docker-compose.yml:

    group_add:
        - audio
    devices:
        - /dev/snd:/dev/snd

- ARM SBCs: In the case of Raspberry Pi (Only 4 and newer can have GPU acceleration if v4l2 Encode/Decode is enabled, which is Disabled by default in RaspiOS and every trick to enable. Personally I haven't been able to enable this till now). Also, the performance of Encode/Decode on ARM is somewhat not usable. If you have a HIGH END SBC then you may research a way to pass your relative Render device and get VAAPI working. Personally, I don't possess a HIGH END ARM SBC. So I am unable to provide any instruction. If anyone gets success please let me know via GitHub. Rest assured, I will include that instruction and will give you proper credit in the GitHub.

- Things to make sure before Submitting a issue:

  • Update your Docker Engine to the latest available, specially on OSX. After updating the docker engine please check if the issue has been resolved.
  • Inspect the AgentDVR-IP:AGENTDVR_WEBUI_PORT/logs.html for Error list
  • If you intend to run this image on Raspberry Pi 5 then use Ubuntu or Ubuntu Server as your OS. There is a bug in Debian that fatally affects the execution of AgentDVR and many other applications that are written on .Net Core. Other Raspberry Pi doesn't have this issue at the time of writing this.
  • Make sure to have you have access to your Docker Compose File/Docker CLI command which was used to deploy your container and Logs from logs.html include those to your GitHub issue/Reddit post.

- Major Changes

  • 6.5.1.0: - ✅Regular version updated to 6.5.1.0. Full AgentDVR log is now visible in Docker logs.
  • 6.5.0.0: - ✅Regular version updated to 6.5.0.0. Updated Intel GPU driver to Comute Runtime Version: 25.22.33944.8, AMD Mesa Driver Version: 25.0.7-2. ⚠️⚠️⚠️Please Update your directory mappings!⚠️⚠️⚠️
  • 6.3.4.0: - ⚠️⚠️⚠️ Directory Structure has been changed. If you are a previous user of ispyagentdvr-docker, Please Update your directory mappings! ⚠️⚠️⚠️
  • 6.3.4.0: - ✅Regular version updated to 6.3.4.0. Updated Intel GPU driver to Comute Runtime Version: 25.18.33578.6, AMD Mesa Driver Version: 25.0.7-1 and updated jellyfin-ffmpeg to 7.1.1-6
  • 6.1.3.0: - ✅Regular version updated to 6.1.3.0. Using BETA images in a mission-critical environment is STRICTLY DISCOURAGED ⚠️
  • 6.0.9.0: - ⚠️⚠️⚠️ Updated Intel GPU driver and updated jellyfin-ffmpeg to 7.0.2-9 ⚠️⚠️⚠️
  • 6.0.1.0: - ⚠️⚠️⚠️ Added driver support for Intel Battlemage GPUs ⚠️⚠️⚠️
  • 5.8.4.0: - ⚠️⚠️⚠️ Config files file format changed from XML to JSON ⚠️⚠️⚠️
  • 5.8.1.0: - ⚠️ FFMPEG version bumped from 6.0.1 to 7.0.2
  • 5.8.1.0: - ⚠️ DOTNET version bumped to 9.0
  • 5.8.1.0: - ⚠️⚠️⚠️ Environment Variable WEBUI_PORT is now changed to AGENTDVR_WEBUI_PORT. Those who use Environment Variable to change the Port for Web UI, please use AGENTDVR_WEBUI_PORT from now on.
  • 5.8.1.0: - mekayelank/ispyagentdvr image is now fully backword compatible with doitandbedone/ispyagentdvr image. From now on, you don't have to change the directory mapping to switch from doitandbedone/ispyagentdvr to mekayelank/ispyagentdvr
  • 5.8.1.0: - ⚠️⚠️⚠️ TURN Server Port range changed from 50000-50010 to 50000-50100. Please set the range in Docker CLI or Docker Compose to 50000-50100
  • 5.3.5.0: - Fixed HW-Accelerated Encode/Decode for AMD, Nvidia & Intel GPUs (From v5.3.5.0 GPU Accelerated Encode/Decode is Tested WORKING in x86_64 but improvements may be needed. Please submit issues in GitHub, if one faces any.)
  • 5.2.8.0 : - (BETA) Added HW-Acceleration for Nvidia, AMD & Intel GPUs & iGPUs (in x86_64). Also added HW-Acceleration for Raspberry Pi 4 and beyond. Related configs may need to be added to the /boot/config.txt
  • 4.8.2.0: - Fixed ARMHF dependency issues and other improvements.
  • 4.8.0.0: - ⚠️ Major Bug fixes with ONVIF fix
  • 4.7.4.0:
    • Fixed bump FFmpeg 6 version that was crashing on missing GPU drivers
    • Add TURN server option to local server settings.
  • 4.7.3.0: - ⚠️ Bumped FFmpeg version from 5 to 6.
  • 4.1.2.0: - Initial Release.

Issues & Requests

To submit this Docker image specific issues or requests visit this docker image's Github Link: https://www.github.com/MekayelAnik/ispyagentdvr-docker

For iSpy AgentDVR-related issues and requests, please visit: https://www.reddit.com/r/ispyconnect/

About

Multi Aarch image of iSpy's Agent DVR, standalone free-to-use NVR software for IP Camera management

Topics

Resources

License

Stars

Watchers

Forks

Languages