Giter Club home page Giter Club logo

nxwitness's Introduction

thehomerepot

Based on the amazing work by LinuxServer.io, TheHomeRepot aims to provide additional quality, reliable containers.

thehomerepot/nxwitness

NX Witness VMS is a free to view VMS that adds recording capability with the purchase of camera licenses.

NX Witness VMS

Usage

docker run -d \
--name=nxwitness \
--restart=unless-stopped \
--net=host \
-e PUID=<UID> -e PGID=<GID> \
-e TZ=<timezone> \
-v </path/to/config>:/config \
-v </path/to/recordings>:/archive \
thehomerepot/nxwitness

Parameters

The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container. So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.

  • --net=host - Shares host networking with container, required prior to version 3.1.x.
  • -v /config - Configuration files
  • -v /archive - Recordings will be landed here.
  • -e PGID= for for GroupID - see below for explanation
  • -e PUID= for for UserID - see below for explanation
  • -e TZ - for timezone information eg Europe/London, etc

User / Group Identifiers

Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify. DO NOT USE ROOT

In this instance PUID=1001 and PGID=1001. To find yours use id user as below:

  $ id <dockeruser>
    uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)

Setting up the application

You will need to install and run the NX Witness Desktop Client and connect to your docker host using port 7001. You will be prompted within the client to configure the new server instance.

Licensing

In order to record from your security cameras, you will need to purchase licenses. These are purchased PER actively recording camera and can be moved between cameras.

However, the licenses are tied to a uniqely generated HWID (hardware ID) and cannot easily be moved. This may change in v3.1.X but currently you must log a support request to have licenses moved to a new server. For this reason be mindful of where you install licenses. I would not currently do so inside a docker container

Info

  • Shell access whilst the container is running: docker exec -it nxwitness /bin/bash
  • To monitor the logs of the container in realtime: docker logs -f nxwitness

Versions

  • 2019.08.17: Updated for v4 changes
  • 2017.09.21: Initial creation

nxwitness's People

Contributors

mykter avatar thehomerepot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nxwitness's Issues

/archive is not being detected

Hi,

It seems that I'm having an issue where the docker uses the /config/HD Witness Media directory to store recordings.

My understanding is that it should be saving the files in /archive.

Under storage Locations, it only displays the /config/HD Witness Media directory as a storage location.

/config/HD Witness Media Info
 Server 

 Type 

 Server
 local
State
 Status 

 Issues (24h) 

 Online
 _
Activity
 Read Rate 

 Write Rate 

 Transactions/s 

 0 Mbit/s
 0 Mbit/s
 0 Tr/s
Space
 Total 

 VMS Media(%) 

 VMS Media 

 21991 GB
 0 %
 0 GB

/archive location isn't showing

Hi,
I have setup the docker container successfully however it is only seeing the /config location available for writing.
I have both /config and /archive configured. startup log shows the .archive location as ok.

Docker compose is below:

nxwitness:
    image: thehomerepot/nxwitness
    container_name: nxwitness
    hostname: nxwitness
    restart: unless-stopped
    network_mode: host
    volumes:
      - ${DATA}/nxwitness:/archive/HD Witness Media
      - ${CONFIG}/nxwitness:/config
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}

I've also included the docker inspect output.

[
    {
        "Id": "e8b8812d88b3b5d66b17013c503b05e6e689086866e3904cb0445560e9d6ec5a",
        "Created": "2020-07-15T02:17:07.731675062Z",
        "Path": "/init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 22932,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2020-07-15T02:23:06.748328102Z",
            "FinishedAt": "2020-07-15T02:21:05.307936362Z"
        },
        "Image": "sha256:6345b447b9d90112524495deb0c7ac79ec8a603126500c15e8d52ef5419d7094",
        "ResolvConfPath": "/var/lib/docker/containers/e8b8812d88b3b5d66b17013c503b05e6e689086866e3904cb0445560e9d6ec5a/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/e8b8812d88b3b5d66b17013c503b05e6e689086866e3904cb0445560e9d6ec5a/hostname",
        "HostsPath": "/var/lib/docker/containers/e8b8812d88b3b5d66b17013c503b05e6e689086866e3904cb0445560e9d6ec5a/hosts",
        "LogPath": "/var/lib/docker/containers/e8b8812d88b3b5d66b17013c503b05e6e689086866e3904cb0445560e9d6ec5a/e8b8812d88b3b5d66b17013c503b05e6e689086866e3904cb0445560e9d6ec5a-json.log",
        "Name": "/nxwitness",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/mnt/storage/nxwitness:/archive/HD Witness Media:rw",
                "/opt/appdata/nxwitness:/config:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "host",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [],
            "CapAdd": null,
            "CapDrop": null,
            "Capabilities": null,
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/c79290011e116b3c379ae76c544c899f87d6d75bd29f8f87a17a92406b2b45b8-init/diff:/var/lib/docker/overlay2/bb02adbebbfac91079a309f783283bb1b0ac59c402fbd1671acde13a0d8cef80/diff:/var/lib/docker/overlay2/5d9f24c3049dd4dc3c43cecfc7c637ce15178f0c0ac1afc44f6d9776f1b619e0/diff:/var/lib/docker/overlay2/8bafba385846fffc3ab57b09eb237ab653e7184fbbe86d9a62e499a1af7c5251/diff:/var/lib/docker/overlay2/686ed15bbd4f343313672e41604dd27927252a3953262681d443a116ef29b727/diff:/var/lib/docker/overlay2/fe01a9394862111f40a3efe3730c836755eb57693896c1ff60b60863c29ab01d/diff:/var/lib/docker/overlay2/d97ff317f9d6e7d8bff288751fbe8598cf4f15c2497e79f2c9e4cc60380e638d/diff",
                "MergedDir": "/var/lib/docker/overlay2/c79290011e116b3c379ae76c544c899f87d6d75bd29f8f87a17a92406b2b45b8/merged",
                "UpperDir": "/var/lib/docker/overlay2/c79290011e116b3c379ae76c544c899f87d6d75bd29f8f87a17a92406b2b45b8/diff",
                "WorkDir": "/var/lib/docker/overlay2/c79290011e116b3c379ae76c544c899f87d6d75bd29f8f87a17a92406b2b45b8/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/mnt/storage/nxwitness",
                "Destination": "/archive/HD Witness Media",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/opt/appdata/nxwitness",
                "Destination": "/config",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "volume",
                "Name": "b69cb181728cc8ffc19ebe4595728f10aaaf8c5caaf3e6c6d62a0586dd6ad6df",
                "Source": "/var/lib/docker/volumes/b69cb181728cc8ffc19ebe4595728f10aaaf8c5caaf3e6c6d62a0586dd6ad6df/_data",
                "Destination": "/archive",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "nxwitness",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "7001/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PUID=1001",
                "PGID=100",
                "TZ=Australia/Brisbane",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "HOME=/root",
                "LANGUAGE=en_US.UTF-8",
                "LANG=en_US.UTF-8",
                "TERM=xterm",
                "DEBIAN_FRONTEND=noninteractive",
                "COMPANY_NAME=networkoptix",
                "SOFTWARE_URL=https://updates.networkoptix.com/default/31274/linux/nxwitness-server-4.0.0.31274-linux64.deb"
            ],
            "Cmd": null,
            "Image": "thehomerepot/nxwitness",
            "Volumes": {
                "/archive": {},
                "/archive/HD Witness Media": {},
                "/config": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "/init"
            ],
            "OnBuild": null,
            "Labels": {
                "build_version": "Linuxserver.io version:- 80ec6960-ls44 Build-date:- 2020-07-01T18:15:11+02:00",
                "com.docker.compose.config-hash": "07bbd8b592fc47560fb1513d51e24a85f0e8edf5c67925b203b777ace409d654",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "opt",
                "com.docker.compose.service": "nxwitness",
                "com.docker.compose.version": "1.23.2",
                "maintainer": "TheLamer"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "5e7e4780ba7ffaae861a224276cd4fe4f41146d5a4352e00ac1873bda10f053e",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/default",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "host": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "be2f10df05f86e5ca5b99df89938c3c6cba2d17410c62f705b8ae1918c99b8ae",
                    "EndpointID": "3103a93fd55ff81262e35ef72f722ec605587503d811099ab7105fcb3c86da84",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]

trial licensing

I'm trying out Nx Witness for the first time, and am hoping to get it running on Docker with your build- thank you !

I've tried two different versions (4.0.x and 4.1.x) but each time I try and activate a trial license it gives me 0000-0000-0000-0005, which expired in March 2020.

I presume it's somehow tied to the docker image ?

I can't contact support because it says the license key is invalid - so it won't let me submit the form !!

Any other ideas ?

Empty continuation line in RUN command

When building:

[WARNING]: Empty continuation line found in:
    RUN  apt-get update &&  apt-get install -y ...
[WARNING]: Empty continuation lines will become errors in a future release.

Not sure whether to fix by removing the 'sections', or splitting into multiple RUN commands.

/archive volume not showing up as storage device

When following the readme the container starts and everything works fine except that the storage device /archive is not listed, and external NAS connections do not work.

If I manually mount a CIFS share to /mnt/ it shows up in the management UI.

During build: networkoptix-mediaserver: unrecognized service

This is a minor thing, as ultimately the build succeeds, but I wondered if it had hung as it took a few minutes (on a slow machine) to make progress after this warning appeared:

Selecting previously unselected package networkoptix-mediaserver.
(Reading database ... 22182 files and directories currently installed.)
Preparing to unpack networkoptix.deb ...
mediaserver-eula license has already been accepted
Unpacking networkoptix-mediaserver (3.2.0) ...
Setting up networkoptix-mediaserver (3.2.0) ...
networkoptix-mediaserver: unrecognized service

One "fix" might be to add an echo prior to the install "the warning about an unrecognized service can be safely ignored"

No local storage

I've tried a lot of combinations. Latest one is a container with folowing volumes:
v /var/storage/vms/config:/config:rw -v /var/storage/vms/media:/media:rw -v /var/storage/vms/recordings:/recordings:rw -v /var/storage/vms/archive:/archive:rw -v /var/storage/vms/data:/opt/networkoptix/mediaserver/var:rw

Nx Witness does not complain with error message "No local storage", but still, there is no recordings. I am totally new to NX Witness and just started experimenting today. Trial license says I can record, using 1 time based license, NX Wintess says that I am recording, but nothing happens. Also I have a log where it says "Recording started (INFO QnRecordingManager(0x7f4aac08eae0): Recording started for camera uuid_75670747-a9e0-f80d-cf69-076a45e2a9e0) and so on. When I open local WebAdmin interface, o Monitoring, Storage tab there is no volume at all. I am not sure if this is a container or a Nx Witness problem. Maybe you have any tips?

Storage configuration

Hi, putting this here as could not find any other place to put it.

Context: Running OMV 5 (5.6.4-1) with portainer/docker (5:20.10.63-0debian-buster)
Have 4 HDD's as a pool of storage (~11TB) with shared folders within (e.g. /archive)
Have 1 SSD for OS and storage for docker apps config folders (e.g. /config)

When I use the nxwitness docker image exactly as stated only the /config storage location shows up within nxwitness. Thats my problem. I have the following 2 volume mappings

Mounts
0
Destination: /archive
Mode:
Propagation: rprivate
RW: true
Source: /srv/a0d1a4bd-3a11-40fd-beb5-a50188789a30/Storage/CCTV
Type: bind
1
Destination /config
Mode
Propagation rprivate
RW true
Source /srv/dev-disk-by-label-AppData/AppData/nxwitness
Type bind

Is there a workaround for this issue?

Full rebuild help...

Hi, I've had this docker image up and running for quite a while ...
then I naffed up my docker containers...

I started from scratch and cleared out all the old shared folder/files for NX and re-deployed this docker container...

Can't log in...what credentials does one use?
After docker up and running open the desktop client...searching servers in your local network...nada
Machine running client on is 10.10.10.100
Machine running docker on is 10.10.10.110 even when browse to 10.10.10.110:7001 I get nothing

I even changed from host to bridge and explicitly put in 7001:7001...no joy

Any assistance I would be very grateful...I've spent the last two days solid fixing my OMV NAS mess

unable to start /opt/networkoptix/mediaserver/bin/mediaserver-bin (Invalid argument)

I am unable to get the nxwitness or digitalwatchdog aps to run in the container.

DWSpectrum:

--- Starting: /opt/digitalwatchdog/mediaserver/bin/mediaserver-bin -e --crash-directory=/opt/digitalwatchdog/mediaserver/var/crash
start-stop-daemon: unable to start /opt/digitalwatchdog/mediaserver/bin/mediaserver-bin (Invalid argument)

NxWitness:

--- Starting: /opt/networkoptix/mediaserver/bin/mediaserver-bin -e --crash-directory=/opt/networkoptix/mediaserver/var/crash
start-stop-daemon: unable to start /opt/networkoptix/mediaserver/bin/mediaserver-bin (Invalid argument)

I am playing around with LSIO, and learning about systemd, and I used your modifications here and the NxWitness systemd version here

Neither my LSIO version nor your version seem to run?
The systemd version does run, but only if run as root, I can't get it to run using --user.

I am using this compose, and I am building on Ubuntu Server LTS, using VSCode over SSH:

version: "3.7"

services:
  dwspectrum:
    image: nxwitness
    container_name: nxwitness-test-container
    hostname: nxwitness-test-host
    domainname: foo.bar
    environment:
      #- PUID=1000
      #- PGID=1000
      - TZ=Americas/Los_Angeles
    build: .
    volumes:
      - ./.mount/media:/archive
      - ./.mount/config:/config
    #restart: unless-stopped
    network_mode: host
    ports:
      - 7001:7001

Any ideas?

Unable to see storage

Have mapped /archive path to share, setup UID an GID etc.
/config directory is working fine, has permissions etc.

Container console shows permissions OK on /archive

No storage locations present in client, cannot add external storage.

Is there something I'm missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.