How to: Install Roon Extension Manager on QNAP

Background
QNAP have their own custom ROM and the OS Linux is non-standard, which leads to issues when trying to install software outside of the .qkpg environment - including things such as Roon Extension Manager (REM).

Fortunately, recent QNAPs ship with a package called Container Station. This allows creation and editing of “Docker Containers”. For the layperson such as myself, you can think of them as very flexible and lightweight virtual machines that can run individual apps alongside but outside of your core OS.

Unfortunately, I don’t know how to create and publish Docker containers. Somebody may well come along and optimise this, but I’ll give you a guide to downloading a “vanilla” container and the steps to configure it and install REM.

The How To:

  1. If you haven’t already, go ahead and install Container Station from QNAP’s AppCenter.
  2. Open Container Station and on the left hand side in the Management tab, click Create
  3. In the search box, type “ubuntu” and you’ll see this

    Make sure it’s this one. Don’t go for any other version, for example the LXC version.
  4. Click Create.
  5. Now we’ll get a pop-up where we need to do our first bit of config. Click on Advanced Settings and navigate to the Network tab.
  6. Change the Network Mode dropdown to Host. That’s all the config we need to do here so go ahead and click Create again. After you have done that we’ll have a Docker container running a vanilla and very stripped down Linux ready to go!

After a few seconds a background task will complete and your container is now running. Head back to the Container Station Overview tab and you’ll see the Container running - denoted by the green cube under Status.

Now, if you created the container as above you’ll see that the container name “ubuntu-1” is clickable. Go ahead and click this and you’ll see the following:

  1. Click on the expand arrows next to the word Console. This will open a new browser tab with a black screen and not much else. Don’t panic! Press Enter and you should get a Linux command prompt, something like root@[hostname]:/#

Now we need to start installing the pre-requisites for the extension manager:

  1. Run each of the following commands (some of these will take a long time to complete as a lot of dependencies must also be downloaded and installed on this very cut-down Linux) :
    apt-get update
    apt-get -y install sudo
    apt-get -y install curl
    apt-get -y install git
    curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
    sudo apt-get install -y nodejs

Then it’s on to the remainder of the config as provided by @Jan_Koudijs

  1. Run the following commands:
    mkdir ~/.RoonExtensions
    npm config set prefix '~/.RoonExtensions'
    npm install -g https://github.com/TheAppgineer/roon-extension-manager.git

  2. And the final 2 commands to start the REM:
    cd ~/.RoonExtensions/lib/node_modules/roon-extension-manager
    node start.js

That’s it! The REM should now be visible in Roon. To close the console, simply close the browser tab.

Note, if you restart your QNAP or your Container you will need to run the last two commands again, either throiugh the terminal or console as described above. I haven’t yet worked out how to get these two commands to run automatically when the container restarts.

3 Likes

Mark why would anyone need to install REM? What specifically does it add or do? I run Roon core on my QNAP. What would I get if I installed this?

Well, you can browse around in this subforum for a few of the extensions that are under development. I specifically wanted random album play, but there are others.

There’s also a wiki, explaining the project

1 Like

Thanks. ________________________________

Thanks for sharing these instructions @anon55914447

I updated the project Wiki with a link to this how to.

1 Like

I’m working on a Docker image for the Roon Extension Manager.

2 Likes

The Docker image for the Roon Extension Manager is now available:

Hi, thx to Jan for the detailed instructions. I would like to add the extension to randomly choose a complete album to play. I’m a total novice when it comes to programming and need help completing the process. I followed Jan’s instructions at the top (thank you!) and everything worked until the end. I received an error message. I’ve copied the console from the end of the last successfully executed command to the end. What am I doing wrong and how can I correct it? Thx in advance for your assistance.

root@Aurelic:/# sudo apt-get install -y nodejs

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following additional packages will be installed:

libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python2.7 python2.7-minimal

Suggested packages:

python-doc python-tk python2.7-doc binutils binfmt-support

The following NEW packages will be installed:

libpython-stdlib libpython2.7-minimal libpython2.7-stdlib nodejs python python-minimal python2.7 python2.7-minimal

0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.

Need to get 16.7 MB of archives.

After this operation, 79.0 MB of additional disk space will be used.

Get:1 https://deb.nodesource.com/node_9.x xenial/main amd64 nodejs amd64 9.11.2-1nodesource1 [12.8 MB]

Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.4 [339 kB]

Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.4 [1261 kB]

Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-minimal amd64 2.7.12-1~16.04 [28.1 kB]

Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.4 [1880 kB]

Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.4 [224 kB]

Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-stdlib amd64 2.7.12-1~16.04 [7768 B]

Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python amd64 2.7.12-1~16.04 [137 kB]

Fetched 16.7 MB in 2s (6354 kB/s)

debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpython2.7-minimal:amd64.

(Reading database … 9598 files and directories currently installed.)

Preparing to unpack …/libpython2.7-minimal_2.7.12-1ubuntu0~16.04.4_amd64.deb …

Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.4) …

Selecting previously unselected package python2.7-minimal.

Preparing to unpack …/python2.7-minimal_2.7.12-1ubuntu0~16.04.4_amd64.deb …

Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.4) …

Selecting previously unselected package python-minimal.

Preparing to unpack …/python-minimal_2.7.12-1~16.04_amd64.deb …

Unpacking python-minimal (2.7.12-1~16.04) …

Selecting previously unselected package libpython2.7-stdlib:amd64.

Preparing to unpack …/libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.4_amd64.deb …

Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.4) …
Unpacking python (2.7.12-1~16.04) …

Selecting previously unselected package nodejs.

Preparing to unpack …/nodejs_9.11.2-1nodesource1_amd64.deb …

Unpacking nodejs (9.11.2-1nodesource1) …

Setting up libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.4) …

Setting up python2.7 (2.7.12-1ubuntu0~16.04.4) …

Setting up libpython-stdlib:amd64 (2.7.12-1~16.04) …

Setting up python (2.7.12-1~16.04) …

Setting up nodejs (9.11.2-1nodesource1) …

root@Aurelic:/# mkdir ~/.RoonExtensions

root@Aurelic:/# npm config set prefix ‘~/.RoonExtensions’

root@Aurelic:/# npm install -g https://github.com/TheAppgineer/roon-extension-manager.git

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

  • roon-extension-manager@0.8.1

added 20 packages in 6.001s

root@Aurelic:/# cd ~/.RoonExtensions/lib/node_modules/roon-extension-manager

root@Aurelic:~/.RoonExtensions/lib/node_modules/roon-extension-manager# node start.js

internal/modules/cjs/loader.js:550

throw err;                                                                                                                                                                                                

^

Error: Cannot find module ‘/root/.RoonExtensions/lib/node_modules/roon-extension-manager/start.js’

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)                                                                                                                               

at Function.Module._load (internal/modules/cjs/loader.js:475:25)                                                                                                                                          

at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)                                                                                                                                        

at startup (internal/bootstrap/node.js:201:19)

Hi @Pacoinmass,

The instructions in this thread are outdated.

I suggest that you use the Roon Extension Manager image instead of the generic Ubuntu image that is used here. My post just above yours has a link to the applicable thread. By using the Roon Extension Manager image you only have to follow the first 6 steps described above and set the options that are described on the image page on Docker Hub (link is in the other thread).

If anything is unclear, just ask.

Jan,

Thank you for the the quick reply. I didn’t try that approach because I’m not familiar with Docker and relationship to the image and Dockerfile. While I’m pretty good with computers, networks, NAS I’m not comfortable with the concept of Docker and making Terminal-level changes to my MBP.

I was hoping that I could simply install Docker, get the image and point it to the Roon Core on my NAS. This manual approach to adding extensions is more complicated than I thought.

When you followed the instructions provided by Mark, did you use the QNAP Container Station to create the Ubuntu container (steps 1-4)?

If so, then you should search for theappgineer/roon-extension-manager instead of ubuntu in step 3.

If you executed this command on a Linux machine and not in a container, then it might be better to use the Linux install script.

Jan,

Thx for walking me through this. Yes, I’m used the QNAP Container Station to create the container (steps 1-4).

I did as you suggested, found “theappgineer/roon-extension-manager” and created it following steps 4-6 in Mark’s post. Unfortunately instead of a Linux command prompt I kept getting a blank black screen after pressing Enter. I even tried running the first command in step 8 “apt-get update” but only got the cursor with a blank screen and no command prompt.

It’s interesting because when I followed the original instructions, I got the Linux command prompt. What am I not doing correctly?

I even stopped the container, removed it, and created a new one but got the same result: no Linux command prompt. Thx for your patience.

You don’t need the command prompt or any of the manual install commands, everything is already included in the container. After the container is created you should move over to your Roon Remote and go to Settings→Extensions where the Extension Manager should appear.

Jan,

Thank you! It works great. Found the random track/album play extension and am now very excited. I really don’t like listening to random tracks b/c of the nature of my content (lots of classic rock, live ablums, etc.) and prefer to listen to albums all the way through. I’ll now have the ability to “mindlessly” listen to albums. Thx again for the time and patience.

1 Like

You’re welcome. Enjoy!

Jan,

Sorry to come back. At some point the container stopped running on the NAS. I went away but had left Roon running on my MBP (Roon Core is on my NAS) but stopped playing any music. When I returned, there was nothing in the queue and couldn’t find the the extension in Settings. I went to the NAS and saw that the container had stopped running with a message of “404: Not Found” in the console. Everything started working again after I started the container manually. Is this normal behavior? Thx in advance for your continued help.

Hi Pacoinmass,

I think the restart option for Docker is missing. ContainerStation doesn’t offer a way to set this option in the GUI. Please use SSH or Docker compose to install the extension on a QNAP-NAS like I described in this post:

BlackJack,

Thx for the reply. I’m very new and unfamiliar/uncomfortable with console operations so pls forgive my questions.

I created a Docker station through the ContainerStation on my QNAP. I then searched for the roon-extention-manager-1 image and created a new container. I didn’t use the Docker commands. I’ve also updated the extension manually through Roon.

Should I also be typing in the “docker compose configuration” you showed? If so, can I copy it directly in the Docker console on the QNAP (through ContainerStore overview tab)? Or do I have to customize the configuration based on my network name, host name, etc.?

Finally, I found an option for automatic restart. Does that mean my issue will now be resolved?

Thanks for your help and patience.

@BlackJack is right, you have to configure the restart policy of the container. It should be possible to change the restart policy on an already created/running container.

First step is to get console access on the QNAP. I don’t have one myself so I don’t know if this can be done via the web interface, but it surely can be done via ssh. These instructions might help to get connected.

Next you can set the restart policy by running the following command in the console:

docker update --restart unless-stopped <name of container>

Replace <name of container> with the name that you gave or was given to the Extension Manager container.

Jan and BlackJack,

Thank you. Here’s what I’ve done:

and this is what it looks like in the QNAP GUI:

I’ve closed both tabs. I hope this works! :slightly_smiling_face: I’m just an audiophile and wasn’t expecting to learn about containers, docker, etc! Always enjoy the learning part of our hobby however.