Docker Container for Record Engine

Downloads & Instructions
Post Reply
rikd
Silicondust
Posts: 100
Joined: Thu Mar 02, 2023 10:48 am
Device ID: 1260AFEF
Location: Portugal
x 8

Re: Docker Container for Record Engine

Post by rikd »

CockneyBoy wrote: Mon Nov 23, 2026 1:42 pm The UI is a nice to have, but I can live without it - as long as everything else works
Using the UI or not, the fact that it can't read the dvr.conf is a problem.
It indicates a setup issue so you could run in to issues later with updates.
Would prefer to help you get that fixed - you can still decide if you want the UI or not after - in fact you can disable now or just take minimal UI with the DVRUI_ENABLE variable.

Anyway, you provided the bindings
/volume1/ContainerData/DVRData:/dvrdata:rw
/volume1/HDHomeRunDVR:/dvrrec:rw
That looks clear. Now the other part..
What about PUID and PGID variables/parameters?
Do they map to a local user?
And then look at the user privileges on the DVRData folder in the ContainerData share - do they allow that user to read/write to the folder?
I suspect one or more of these isn't mapped correctly.

Would be good to see what is in the container log (see https://mariushosting.com/synology-how- ... iner-logs/)
There is likely more info there that would be interesting to see also.

CockneyBoy
Posts: 35
Joined: Tue Oct 01, 2019 2:14 pm
Location: Hamburg, Germany

Re: Docker Container for Record Engine

Post by CockneyBoy »

Using the UI or not, the fact that it can't read the dvr.conf is a problem.
It indicates a setup issue so you could run in to issues later with updates.
That is exactly my worry.

I followed the process I went through last year - (Task Planer for UID and GID existed)
Have created the variables required
59080 for the port and 1026 and 100 for the id's.

I could load the UI but the record engine was gone.
The android app told me "HDHR DVR was not found"

I have adjusted my orignal container UI to none.
I have no UI but everthing works again.

I have 2 html files with the log data for the 2 versions.

BUt how can I send attachments in this forum?

rikd
Silicondust
Posts: 100
Joined: Thu Mar 02, 2023 10:48 am
Device ID: 1260AFEF
Location: Portugal
x 8

Re: Docker Container for Record Engine

Post by rikd »

CockneyBoy wrote: Tue Nov 24, 2026 6:41 am I followed the process I went through last year - (Task Planer for UID and GID existed)
Have created the variables required
59080 for the port and 1026 and 100 for the id's.

I could load the UI but the record engine was gone.
The android app told me "HDHR DVR was not found"
careful if running 2 containers at the same time. If both are reading the save configuration file, they both will try and get the same port - amongst other things and fight for the resources.
particularly of course is the port used by the record engine.
I have 2 html files with the log data for the 2 versions.

BUt how can I send attachments in this forum?
you can paste the contents between code tags - the [</>] button on the bar.

rikd
Silicondust
Posts: 100
Joined: Thu Mar 02, 2023 10:48 am
Device ID: 1260AFEF
Location: Portugal
x 8

Re: Docker Container for Record Engine

Post by rikd »

Container Updated
3.5.0 release notes
Main changes are part of the move to Silicondust
Containers are now hosted on Github - ghcr.io/silicondust/hdhrdvr-docker
Hosting on dockerhub will continue for a while to aid in the transition - but will be removed sometime in the new year.

Highlights:
Added IPv6 and mDNS discovery
A new Settings page (the cog button (diagnostics is now a bug icon)) turns mDNS, IPv6 and cloud discovery on or off. Settings are saved in /dvrdata/dvrui_settings.json, so they survive container updates.
Adding Rule dialog now shows Upcoming episodes
Minor housekeeping changes for the move of the repository.

CockneyBoy
Posts: 35
Joined: Tue Oct 01, 2019 2:14 pm
Location: Hamburg, Germany

Re: Docker Container for Record Engine

Post by CockneyBoy »

careful if running 2 containers at the same time. If both are reading the save configuration file, they both will try and get the same port - amongst other things and fight for the resources.
particularly of course is the port used by the record engine.
That I guessed, I was careful, only one at a time!

Code: Select all

HDHRDVR-1
date	stream	content
2026/11/24 13:43:00	stdout	2026-11-24 12:43:00,302 INFO success: dvr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026/11/24 13:42:59	stdout	DVRMgr: ** Starting the DVR Engine
2026/11/24 13:42:59	stdout	DVRMgr: Engine is ...  20261107
2026/11/24 13:42:59	stdout	DVRMgr: Downloaded engine [20261107] is not newer than [20261107] - not updating
2026/11/24 13:42:59	stdout	DVRMgr: Got Engine [20261107]
2026/11/24 13:42:59	stdout	DVRMgr: Downloading latest Beta release
2026/11/24 13:42:59	stdout	DVRMgr: Got Engine [20261107]
2026/11/24 13:42:58	stdout	DVRMgr: Downloading latest Stable release
2026/11/24 13:42:58	stdout	DVRMgr: ** Current Engine Version is 20261107
2026/11/24 13:42:58	stdout	DVRMgr: ** Installing the HDHomeRunDVR Record Engine
2026/11/24 13:42:58	stdout	DVRMgr: Config File exists and is writable - is record path and port correct
2026/11/24 13:42:58	stdout	DVRMgr: ** Validating the Config File is available and set up correctly
2026/11/24 13:42:58	stdout	hdhomerun.sh
2026/11/24 13:42:58	stdout	**********************
2026/11/24 13:42:58	stdout	2026-11-24 12:42:58,647 INFO spawned: 'dvr' with pid 15
2026/11/24 13:42:57	stdout	2026-11-24 12:42:57,644 INFO supervisord started with pid 14
2026/11/24 13:42:57	stdout	2026-11-24 12:42:57,644 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2026/11/24 13:42:57	stdout	2026-11-24 12:42:57,644 INFO RPC interface 'supervisor' initialized
2026/11/24 13:42:57	stdout	2026-11-24 12:42:57,622 INFO Set uid to user 0 succeeded
2026/11/24 13:42:56	stdout	INFO: Engine control (supervisorctl) group is root
2026/11/24 13:42:56	stdout	INFO: UI disabled - DVRUI_PORT and DVRUI_TZ are not used
2026/11/24 13:42:56	stdout	INFO: DVR recordings Folder linked to correct folder /dvrrec
2026/11/24 13:42:56	stdout	INFO: DVR recordings folder is linked
2026/11/24 13:42:56	stdout	INFO: DVR recordings folder exists already
2026/11/24 13:42:56	stdout	INFO: DVR Folder linked to correct folder /dvrdata
2026/11/24 13:42:56	stdout	INFO: DVR Data folder is linked
2026/11/24 13:42:56	stdout	INFO: DVR data folder exists already
2026/11/24 13:42:56	stdout	INFO: DVRUI_ENABLE is none - the UI and its web server (nginx, php-fpm) are disabled
2026/11/24 13:42:56	stdout	
2026/11/24 13:42:56	stdout	************************************************
2026/11/24 13:42:56	stdout	
2026/11/24 13:42:56	stdout	           VERSION: 3.4.0 [x86_64]
2026/11/24 13:42:56	stdout	           Starting DVR Container
2026/11/24 13:42:56	stdout	
2026/11/24 13:42:56	stdout	************************************************
2026/11/24 13:42:56	stdout	

Code: Select all

HDHRDVR-1-1
date	stream	content
2026/11/24 14:18:26	stdout	192.168.3.250 - - [24/Nov/2026:13:18:26 +0000] "POST / HTTP/1.1" 200 2366 "http://192.168.3.131:59080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:160.0) Gecko/20100101 Firefox/160.0" "-"
2026/11/24 14:18:25	stdout	192.168.3.250 - - [24/Nov/2026:13:18:25 +0000] "GET / HTTP/1.1" 200 3696 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:160.0) Gecko/20100101 Firefox/160.0" "-"
2026/11/24 14:17:31	stdout	2026-11-24 13:17:31,118 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026/11/24 14:17:31	stdout	2026-11-24 13:17:31,118 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026/11/24 14:17:30	stdout	2026-11-24 13:17:30,117 INFO gave up: dvr entered FATAL state, too many start retries too quickly
2026/11/24 14:17:30	stdout	2026-11-24 13:17:30,116 WARN exited: dvr (exit status 126; not expected)
2026/11/24 14:17:30	stdout	ash: /HDHomeRunDVR/data/hdhomerun_record: Permission denied
2026/11/24 14:17:30	stdout	DVRMgr: ** Executing DVR engine with PUID info...
2026/11/24 14:17:30	stdout	DVRMgr: ** PUID user exists - adjusting permissions to dvrdata & dvrrec
2026/11/24 14:17:30	stdout	DVRMgr: ** Checking for PUID
2026/11/24 14:17:30	stdout	DVRMgr: ** Starting the DVR Engine
2026/11/24 14:17:30	stdout	DVRMgr: Engine is ...  20261107
2026/11/24 14:17:30	stdout	[24-Nov-2026 13:17:30] NOTICE: ready to handle connections
2026/11/24 14:17:30	stdout	[24-Nov-2026 13:17:30] NOTICE: fpm is running, pid 50
2026/11/24 14:17:30	stdout	DVRMgr: Downloaded engine [20261107] is not newer than [20261107] - not updating
2026/11/24 14:17:30	stdout	DVRMgr: Got Engine [20261107]
2026/11/24 14:17:29	stdout	DVRMgr: Downloading latest Beta release
2026/11/24 14:17:29	stdout	DVRMgr: Got Engine [20261107]
2026/11/24 14:17:29	stdout	DVRMgr: Downloading latest Stable release
2026/11/24 14:17:29	stdout	DVRMgr: ** Current Engine Version is 20261107
2026/11/24 14:17:29	stdout	DVRMgr: ** Installing the HDHomeRunDVR Record Engine
2026/11/24 14:17:29	stdout	DVRMgr: Config File exists and is writable - is record path and port correct
2026/11/24 14:17:29	stdout	DVRMgr: ** Validating the Config File is available and set up correctly
2026/11/24 14:17:29	stdout	hdhomerun.sh
2026/11/24 14:17:29	stdout	**********************
2026/11/24 14:17:29	stdout	2026-11-24 13:17:29,146 INFO spawned: 'php-fpm' with pid 50
2026/11/24 14:17:29	stdout	2026-11-24 13:17:29,145 INFO spawned: 'nginx' with pid 49
2026/11/24 14:17:29	stdout	2026-11-24 13:17:29,143 INFO spawned: 'dvr' with pid 48
2026/11/24 14:17:28	stdout	2026-11-24 13:17:28,140 INFO supervisord started with pid 47
2026/11/24 14:17:28	stdout	2026-11-24 13:17:28,140 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2026/11/24 14:17:28	stdout	2026-11-24 13:17:28,139 INFO RPC interface 'supervisor' initialized
2026/11/24 14:17:28	stdout	2026-11-24 13:17:28,128 INFO Set uid to user 0 succeeded
2026/11/24 14:17:26	stdout	INFO: Engine control (supervisorctl) group is dvr
2026/11/24 14:17:26	stdout	INFO: Updating the PHP Timezone for UI to Europe/Berlin
2026/11/24 14:17:26	stdout	INFO: Updating the NGINX Port for UI to 59080
2026/11/24 14:17:26	stdout	INFO: Attempting to Fixing Permissions
2026/11/24 14:17:26	stdout	INFO: group with GID [100] exists, updating php config
2026/11/24 14:17:26	stdout	INFO: user with UID [1026] exists, updating php config
2026/11/24 14:17:26	stdout	INFO: Updating PHP User
2026/11/24 14:17:26	stdout	INFO: group with GID [100] exists, updating NGinx config
2026/11/24 14:17:26	stdout	INFO: user with UID [1026] exists, checking GID...
2026/11/24 14:17:26	stdout	INFO: Updating Nginx User
2026/11/24 14:17:26	stdout	INFO: Success
2026/11/24 14:17:25	stdout	INFO: Creating User dvr with UID [1026]
2026/11/24 14:17:25	stdout	INFO: Success
2026/11/24 14:17:25	stdout	INFO: Creating Group dvr with GID [100]
2026/11/24 14:17:25	stdout	INFO: From root:root to 1026:100
2026/11/24 14:17:25	stdout	INFO: Attempting requested User mapping
2026/11/24 14:17:25	stdout	INFO: PHP WWW Server config - refreshing from defaults...
2026/11/24 14:17:25	stdout	INFO: DVR recordings Folder linked to correct folder /dvrrec
2026/11/24 14:17:25	stdout	INFO: DVR recordings folder is linked
2026/11/24 14:17:25	stdout	INFO: DVR recordings folder exists already
2026/11/24 14:17:25	stdout	INFO: DVR Folder linked to correct folder /dvrdata
2026/11/24 14:17:25	stdout	INFO: DVR Data folder is linked
2026/11/24 14:17:25	stdout	INFO: DVR data folder exists already
2026/11/24 14:17:25	stdout	INFO: DVRUI_ENABLE is full - starting the UI
2026/11/24 14:17:25	stdout	
2026/11/24 14:17:25	stdout	************************************************
2026/11/24 14:17:25	stdout	
2026/11/24 14:17:25	stdout	           VERSION: 3.4.0 [x86_64]
2026/11/24 14:17:25	stdout	           Starting DVR Container
2026/11/24 14:17:25	stdout	
2026/11/24 14:17:25	stdout	************************************************
2026/11/24 14:17:25	stdout	
Thanks again for your time and effort

rikd
Silicondust
Posts: 100
Joined: Thu Mar 02, 2023 10:48 am
Device ID: 1260AFEF
Location: Portugal
x 8

Re: Docker Container for Record Engine

Post by rikd »

CockneyBoy wrote: Tue Nov 24, 2026 1:07 pm

Code: Select all

HDHRDVR-1
...
This one runs but it never sets a uid for the DVR user so am guessing you never set the PGID or PUID
That means it runs as root and works, but afair it will cause issues with the UI, also all your recordings will be owned by root on the recordpath which can cause issues if using other apps.

Code: Select all

HDHRDVR-1-1
date	stream	content
2026/11/24 14:18:26	
This is the more interesting one. Time stamp is later.
It sets the PUID and GUID but cannot execute the record engine.
That suggests to me not all is right for user 1026 on the data share. At a min it can't execute, maybe not write? I would check the user 1026 permissions on the share

rikd
Silicondust
Posts: 100
Joined: Thu Mar 02, 2023 10:48 am
Device ID: 1260AFEF
Location: Portugal
x 8

Re: Docker Container for Record Engine

Post by rikd »

ok - I think I've a fix/workaround.
But I'd still like some more info from you if possible
If you could ssh to your synology and execute each of these and post back the results
note - dvr is a guess on the 'name' of the container - please replace dvr and use your name of the container

Code: Select all

docker exec dvr grep dvrdata /proc/mounts
docker exec dvr ls -l /dvrdata/hdhomerun_record
ls -le /volume1/ContainerData/DVRData/hdhomerun_record
This will help me make sure the fix is correct for Synology.
Also which DSM version are you on?
TIA

CockneyBoy
Posts: 35
Joined: Tue Oct 01, 2019 2:14 pm
Location: Hamburg, Germany

Re: Docker Container for Record Engine

Post by CockneyBoy »

Must be 25 yrs since I used putty!, anyway

I have a DS220+
DSM 7.4.1-90080 update 2
it is a dedicated system, used only for HDHR.
admin is deaktivated, only one user with user and admin rights.

results of ssh

:/$ docker exec HDHRDVR-1-1 grep dvrdata /proc/mounts
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/HDHRDVR-1-1/json": dial unix /var/run/docker.sock: connect: permission denied

:/$ docker exec HDHRDVR-1-1 ls -l /dvrdata/hdhomerun_record
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/HDHRDVR-1-1/json": dial unix /var/run/docker.sock: connect: permission denied

:/$ ls -le /volume1/ContainerData/DVRData/hdhomerun_record
-rwxr-xr-x 1 ****** users 1656278 Nov 7 23:33 /volume1/ContainerData/DVRData/hdhomerun_record

I have removed user and system name
***** = user name

I guess this is what you expected.
Which permissions do I need to set?

rikd
Silicondust
Posts: 100
Joined: Thu Mar 02, 2023 10:48 am
Device ID: 1260AFEF
Location: Portugal
x 8

Re: Docker Container for Record Engine

Post by rikd »

CockneyBoy wrote: Wed Nov 25, 2026 6:49 am Must be 25 yrs since I used putty!, anyway

I have a DS220+
DSM 7.4.1-90080 update 2
it is a dedicated system, used only for HDHR.
admin is deaktivated, only one user with user and admin rights.

results of ssh

:/$ docker exec HDHRDVR-1-1 grep dvrdata /proc/mounts
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/HDHRDVR-1-1/json": dial unix /var/run/docker.sock: connect: permission denied

:/$ docker exec HDHRDVR-1-1 ls -l /dvrdata/hdhomerun_record
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/HDHRDVR-1-1/json": dial unix /var/run/docker.sock: connect: permission denied

:/$ ls -le /volume1/ContainerData/DVRData/hdhomerun_record
-rwxr-xr-x 1 ****** users 1656278 Nov 7 23:33 /volume1/ContainerData/DVRData/hdhomerun_record

I have removed user and system name
***** = user name

I guess this is what you expected.
Which permissions do I need to set?
Forgot - you need to run the docker commands with sudo on synology
run the following please

Code: Select all

sudo docker exec HDHRDVR-1-1 grep dvrdata /proc/mounts
sudo docker exec HDHRDVR-1-1 ls -l /dvrdata/hdhomerun_record
grep volume1 /proc/mounts
sudo docker exec HDHRDVR-1-1 cat /HDHomeRunDVR/VERSION
thanks.
No need to change anything yet - am trying to see if my workaround means you don't have to do anything but update the container ;)

Post Reply