Docker Container for Record Engine

Downloads & Instructions
Post Reply
rikd
Silicondust
Posts: 105
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: 39
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: 105
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: 105
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: 39
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: 105
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: 105
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: 39
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: 105
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 ;)

rikd
Silicondust
Posts: 105
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 Update ***
New version 3.6.0
please update your container from ghcr.io/silicondust/hdhrdvr-docker:3.6.0

Changes
- updated to the diagnostics tab to allow viewing different aspects of the diagnostics
- added to the diagnostics tab and log view the ability to copy to the clipboard
- added a workaround for container deployments on systems where noexec is set on the bound folder
- added additional diagnostics around container deployment and execution

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

Re: Docker Container for Record Engine

Post by CockneyBoy »

Forgot - you need to run the docker commands with sudo on synology
run the following please
Result:

Code: Select all

:/$ sudo docker exec HDHRDVR-1-1 grep dvrdata /proc/mounts
Password:
/dev/vg1/volume_1 /dvrdata btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=257,subvol=/@syno/ContainerData 0 0

:/$ sudo docker exec HDHRDVR-1-1 ls -l /dvrdata/hdhomerun_record
-rwxr-xr-x    1 dvr      users      1656278 Nov  7 22:33 /dvrdata/hdhomerun_record

:/$ grep volume1 /proc/mounts
/dev/vg1/volume_1 /volume1 btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@docker btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@docker/btrfs btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/Basic\040Data btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=259,subvol=/@syno/Basic\040Data 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/ContainerData btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=257,subvol=/@syno/ContainerData 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/docker btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=260,subvol=/@syno/docker 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/HDHomeRunDVR btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=258,subvol=/@syno/HDHomeRunDVR 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/Videos btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=291,subvol=/@syno/Videos 0 0

:/$ sudo docker exec HDHRDVR-1-1 cat /HDHomeRunDVR/VERSION
3.4.0

rikd
Silicondust
Posts: 105
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 1:13 pm
Forgot - you need to run the docker commands with sudo on synology
run the following please
Result:

Code: Select all

:/$ sudo docker exec HDHRDVR-1-1 grep dvrdata /proc/mounts
Password:
/dev/vg1/volume_1 /dvrdata btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=257,subvol=/@syno/ContainerData 0 0

:/$ sudo docker exec HDHRDVR-1-1 ls -l /dvrdata/hdhomerun_record
-rwxr-xr-x    1 dvr      users      1656278 Nov  7 22:33 /dvrdata/hdhomerun_record

:/$ grep volume1 /proc/mounts
/dev/vg1/volume_1 /volume1 btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@docker btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@docker/btrfs btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/Basic\040Data btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=259,subvol=/@syno/Basic\040Data 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/ContainerData btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=257,subvol=/@syno/ContainerData 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/docker btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=260,subvol=/@syno/docker 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/HDHomeRunDVR btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=258,subvol=/@syno/HDHomeRunDVR 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/Videos btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=291,subvol=/@syno/Videos 0 0

:/$ sudo docker exec HDHRDVR-1-1 cat /HDHomeRunDVR/VERSION
3.4.0
hmmm... not sure my fix will work, but it might.
My fix that I put in 3.6.0 is to basically avoid an issue where the /dvrdata gets mounted with the noexec flag.
According to the results above that isn't strictly your issue, but it might be ultimately the problem.
I suspect it comes down to the synoacl option - i.e. your Synology is applying it's own ACLs on top of the share and this is what is preventing the user PUID/PGID indicates from executing on that folder. When you run without those settings the container runs as root so synology ACLs allow it.

My noexec fix might still work
can you try upgrade the container to the latest 3.6.0 with the PUID/PGID set and see
If the engine is still not running with them set - open the UI (yes, please have enabled) and grab the output from the container section and paste here between code tags.

Failing that - you need to examine the ACLs for the /volume1/ContainerData/DVRData
The user you specify with the PUID/PGID should have read,write and 'Traverse folders/Execute files' enabled.
i.e.
in Control Panel -> Shared Folder and select the ContainerData share, click Edit and open the Permissions Tab - make sure the user or the group has Read/Write access
in File Stations go to the ContainerData/DVRData and right click DVRData and choose Properties->Permissions. Here make sure your user (and/or the group it belongs to) doesn't have a Deny entry, and ideally does have a 'Traverse folders/Execute files' entry

When you do move the user we probably need to fix the permissions on the recordings too - make sure has same permissions on the share where the recordings are stored :)

EDIT - have updated the wiki entry for SPK to help in troubleshooting this.

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

Re: Docker Container for Record Engine

Post by CockneyBoy »

I have spent sometime going through everything where permissions are mentioned on shares, files and users.
Quite heavy, I have learnt that it is possible to set permissions alone on a sub-folder!

In some cases I have set individual permissions, even if they inherited them.
I have set the extended permissions, those where Synology say they man only be used when really necessary.
(although this may be because of the strict German data regulations)

No Go.

When I call the UI I get a 502 Bad Gateway nginx.

I have rerun the code you sent maybe it helps

Code: Select all

:/$ sudo docker exec HDHRDVR-1-1 grep dvrdata /proc/mounts
Password:
/dev/vg1/volume_1 /dvrdata btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=257,subvol=/@syno/ContainerData 0 0

:/$ sudo docker exec HDHRDVR-1-1 ls -l /dvrdata/hdhomerun_record
-rwx------    1 dvr      users      1656278 Nov  7 22:33 /dvrdata/hdhomerun_record

:/$ grep volume1 /proc/mounts
/dev/vg1/volume_1 /volume1 btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@docker btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@docker/btrfs btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/Basic\040Data btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=259,subvol=/@syno/Basic\040Data 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/ContainerData btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=257,subvol=/@syno/ContainerData 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/docker btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=260,subvol=/@syno/docker 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/HDHomeRunDVR btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=258,subvol=/@syno/HDHomeRunDVR 0 0
/dev/vg1/volume_1 /volume1/@appdata/ContainerManager/all_shares/Videos btrfs rw,nodev,relatime,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=291,subvol=/@syno/Videos 0 0

:/$ sudo docker exec HDHRDVR-1-1 cat /HDHomeRunDVR/VERSION
3.6.0
Positive is that all my apps Kodo, Android, Windows still work perfect and I can access all recordings.

rikd
Silicondust
Posts: 105
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: Thu Nov 26, 2026 8:52 am Positive is that all my apps Kodo, Android, Windows still work perfect and I can access all recordings.
that is good - I suspect we've fixed the main issue and we're back to the UI one now..
When I call the UI I get a 502 Bad Gateway nginx.
ok - this is likely an old file left over with the bad permissions ;)
to check can you run the following new commands from your SSH session and report back :)

Code: Select all

sudo docker exec <container> tail -n 30 /var/log/nginx/error.log
sudo docker exec <container> grep fastcgi_pass /etc/nginx/modules/nginx-dvrui.conf
sudo docker logs <container> 2>&1 | grep -iE 'php-fpm|ERROR|WARN'
have a Great Thanksgiving!!
And many thanks for all the patience - we will get you a fully working install

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

Re: Docker Container for Record Engine

Post by CockneyBoy »

have a Great Thanksgiving!!
Thanks, pity our Harvest Days and Erntedankfest are not celebrated in the same way!
And many thanks for all the patience
Hey, I'm the guy who has to say thanks - you have retired !

One small matter, may not be associated,
we hardly watch live-tv, but today we did and got a 'all channels in use' (only 1 running)
- I rebooted the HDHR and it worked again.

The results

Code: Select all

:/$ sudo docker exec <container> tail -n 30 /var/log/nginx/error.log
-sh: container: No such file or directory
:/$ sudo docker exec <container> grep fastcgi_pass /etc/nginx/modules/nginx-dvrui.conf
-sh: container: No such file or directory
:/$ sudo docker logs <container> 2>&1 | grep -iE 'php-fpm|ERROR|WARN'
-sh: syntax error near unexpected token `2'
After I read the results
I dug out my old WinSCP in order to see what the logs looked like.

On var/log/nginz
I got
The command “cd “nginx””
failed with return code 1 and the following error message.
-sh: line 48: cd: nginx: Permission denied
Maybe that helps.
Tomorrow is another day.

Post Reply