Skip to content

Updating from the QNAP QPKG to Container

Rik Dunphy edited this page Aug 6, 2022 · 5 revisions

Welcome to the Guide for those wishing to move from the now end of life QPKGs I used to create for the HDHomeRun DVR engine to the docker container on a QNAP System. The guide was developed on my TS-651 running firmware 5.0.0.2055 (2022/05/31) Note - please use the Container 0.2.1 or newer to ensure you can use the default GID for QNAP of 100.

Preparing the QNAP NAS

  1. if the QPKG is currently installed remove it.. don't worry your recordings are safe
  2. install the qnap container station app from the app center
  3. Open the Container Station and let it create the Container Share
  4. Create a share for storing the configuration information for this DVR container. Create a new share, e.g. DVRData or ContainerData

Getting the necessary Information

  1. If you wish to have a unique user for the DVR - Create it now through the Control Panel -> Privilege -> Users

Imgur

  1. Add the user to share where your recordings are stored or to be stored via Control Panel -> Privilege -> Shared Folders and clicking Edit Shared Folder Permissions button over on the left

Imgur Imgur

  1. If the user isn't listed click Add

Imgur

  1. Make sure the user you want to use has the RW entry checked.
  2. Once done hit Apply then Close
  3. Now is a good time to also make sure your user has Read/Write or RW access to the Container data folder you created in Step 4 of Preparing the QNAP NAS
  4. Now SSH to the NAS and login as an admin user and execute id <user> where <user> is the user you wish to use for the DVR. The command should return a response similar to uid=1000(dvr) gid=100(everyone) groups=100(everyone) keep the uid and the gid number close - we will need them later.

Installing the Container

  1. Once ready with the info open Container Station and select Create
  2. Search for demonrik to find the demonrik/hdhrdvr-docker container and select install
  3. Select latest for Image version - the default
  4. You'll have to click ok for a disclaimer
  5. On next dialog change the Name to something more meaningful for you, e.g. MyDVR - DO NOT select Create just yet

Imgur

  1. Scroll down the dialog and you will find the nicely hidden Advanced Settings >> menu - click on this

Imgur

  1. Under Environment need to create 3 new variables by selecting Add (Dialog won't let you create 3 blanks, you have to do one by one)
  • DVRUI_PORT: the port that the UI will be available on. If not sure - good tip is to pick something between 32000 and 65535
  • PUID : the UID of the user you found above in Step 7 of Getting the necessary Information
  • PGID : the GID of the user you found above in Step 7 of Getting the necessary Information

Imgur

  1. For Network -> Network Mode we need to select Host

Imgur

  1. And finally for Shared Folders we need to mount the folders we created
  • first delete the 'NewVolume | Mount Point` mappings at the top for /dvrdata and /dvrrec by selecting the trashcan to the right. This is for creating disk images, which you don't need since we have created Shared Folders
  • next we add 2 Volume from host to Mount Point mappings (again has to be done one by one). When you select the entry under volume from host a dialog will prompt you to select the folder.. Select your Record Path shared Folder and map that to the Mount Point /dvrrec' and for the second select your container data shared folder from Step 4 of Preparing the QNAP NASand map to/dvrdata`
  1. select create

Verifying it worked

Wait a few minutes for everything to complete - the little blue icon on the task list should dissapear Now select the Container menu from the sidebar It should have your new dvr container and it should be running

Imgur

if it's not running hit the play icon Select the name URL provided to open the monitor for the container. If you scroll up the log in the 'Console' you will see the version. Check with DockerHub/Github to make sure it's correct

Imgur

Scrolling through the log make sure you don't see any ERROR or WARN messages.