My Perfect Roon Core/Bridge

Installing a graphical Roon Core / Roon Bridge


I was looking for the perfect Roon Core / Roon Bridge that would:

  • Output multichannel audio.
  • Use an HDMI output and understand CEC.
  • Be reliable.
  • Be cheap (that is very subjective).
  • Output DSD files throught HDMI (I could not find a solution for this).

I initially planned on using Roon Optimized Core Kit on an Intel NUC.

I eventually changed my mind and decided to install Roon Core “manually” on top on Linux because:

  • ROCK does not provide any ssh access.
  • ROCK does not use the video output (you just get Linux text gibberish). I was planning to use it also as a Roon Bridge, connected to my 5.1 audio/video amplifier so I wanted a nice looking video ouput even though I hardly use it.

TLDR;

This post explains what I did:

  • Bought a NUC with HDMI-CEC Adapter.
  • Installed Ubuntu Server 18.10.
  • Installed openbox as window manager (kiosk-like).
  • Installed qutebrowser to display Roon graphical informations.
  • Installed my custom made Roon CEC Controller Extension.

Get the hardware

I bought an Intel NUC because you can install Roon Optimized Core Kit on them (even though I gave up on ROCK).

I picked the smallest and cheapest one, the NUC7i3BNK.
I added a 120Gb hard drive (Corsair Force MP300 120 Gb) and 8Gb RAM (G.Skill RipJaws Series SO-DIMM 8 Gb DDR4 2133 MHz CL15).
So far it has never failed me.

Then I added an Intel NUC HDMI-CEC Adapter so that the NUC is able to send and receive HDMI-CEC commands.

Before going to the software installation you probably want to update the NUC firmware.

Also I strongly suggest that you get a micro SD card and use it to store Roon Core automatic backups: in the event of hard drive failure, or if you just want to reinstall the Roon Core server and its OS, you will be able to get all your data back very easily. Moreover, this will allow you to get your backups out of the NUC just by ejecting the SD card.

Install Ubuntu server

I chose Ubuntu because I like it. Server because I wanted a minimal installation. I chose 18.10 over 18.04 LTS because it has more packages that I needed already installed by default. And I will probably upgrade it every 6 months but you may want go with the LTS, that is up to you.

You may get Ubuntu Server here.

Install it the usual way.

I recommend that you select “English” as language even if that is not your native language (it’s not mine), because it will be easier to google error messages when you get some.

When you install Ubuntu, pick a nice server name, such as rooncore, and a nice admin user name, such as your own first name.

There is no snap to install, we won’t need any.
SSH server is already installed.

Then you probably need to update the software:

sudo apt-get update
sudo apt-get upgrade

And install your favorite text editor:

sudo apt-get install vim

Install Roon Core

Everything you need to know is here.

Install some mandatory packages:

sudo apt-get install curl ffmpeg cifs-utils

Then install Roon Core:

cd
wget http://download.roonlabs.com/builds/roonserver-installer-linuxx64.sh
chmod a+x roonserver-installer-linuxx64.sh
sudo ./roonserver-installer-linuxx64.sh

If you have a micro SD inserted in the NUC, now is a good time to configure Roon automatic backup to use it. I recommend FAT formating.

Depending on your configuration it could look like this:

sudo mkdir /media/ROONBACK

Get your SD name with this:

sudo fdisk -l

Then add this to /etc/fstab with something like this:

/dev/mmcblk0p1  /media/ROONBACK vfat    user,fmask=0111,dmask=0000   0   0

Create a Roon Kiosk

This part is about automatically launching a web browser showing the Roon display page on boot.

Create a roon user. This user should have no privilege (he should not be a sudoer) as he will automatically log in and launch the web browser with no password asked.

sudo adduser roon

Then install X server, openbox and qutebrowser.
I chose qutebrowser over Chromium or Firefox because you can use it with just a keyboard and no mouse. (And I like VIM.)

sudo apt install --no-install-recommends xorg xserver-xorg-legacy openbox qutebrowser

Then create /opt/roonkiosk.sh:

#!/bin/bash

xset -dpms
xset s off
openbox-session &

qutebrowser

Then

sudo chmod a+x /opt/roonkiosk.sh

Edit /etc/X11/Xwrapper.config:

allowed_users=anybody
needs_root_rights=yes

Create /etc/systemd/system/roonkiosk.service:

[Unit]
Description=RoonKiosk
After=systemd-user-sessions.service
Requires=roonserver.service

[Service]
Type=simple
User=roon
ExecStart=/usr/bin/startx /etc/X11/Xsession /opt/roonkiosk.sh
Restart=always

[Install]
WantedBy=multi-user.target

Then

sudo systemctl daemon-reload
sudo systemctl enable roonkiosk
sudo mkdir -p /home/roon/.config/qutebrowser

Then edit qutebrowser parameters in /home/roon/.config/qutebrowser/config.py with roon user:

# QuteBrowser Config file for Kiosk mode

## Hide the statusbar unless a message is shown.
## Type: Bool
c.statusbar.hide = True

## When to show the tab bar.
## Type: String
## Valid values:
##   - always: Always show the tab bar.
##   - never: Always hide the tab bar.
##   - multiple: Hide the tab bar if only one tab is open.
##   - switching: Show the tab bar when switching tabs.
c.tabs.show = 'multiple'

## Page to open if :open -t/-b/-w is used without URL. Use `about:blank`
## for a blank page.
## Type: FuzzyUrl
c.url.default_page = 'http://127.0.0.1:9100/display'

## Page(s) to open at the start.
## Type: List of FuzzyUrl, or FuzzyUrl
c.url.start_pages = ['http://127.0.0.1:9100/display']

## Always restore open sites when qutebrowser is reopened.
## Type: Bool
c.auto_save.session = False
sudo chown -R roon:roon /home/roon/.config

If you need to close the default tab, press [d]. To switch to fullscreen press [F11].

Enable this display from Roon controller software.

CEC Controller Extension

If you want to control Roon from your amplifier and/or TV set remote control, install Roon CEC Controller Extension.

This should do it:

wget -qO- https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs cec-utils
sudo usermod -a -G dialout nobody
cd
git clone https://github.com/benjaminbellamy/roon-cec-controller-extension.git
cd roon-cec-controller-extension/
npm install
cd ..
sudo mv roon-cec-controller-extension /var/
sudo chown -R roon:roon /var/roon-cec-controller-extension/
sudo cp /var/roon-cec-controller-extension/roon-cec-controller-extension.service /etc/systemd/system/
sudo systemctl start roon-cec-controller-extension.service
sudo systemctl enable roon-cec-controller-extension.service

Enable the extension from Roon controller.

Et voilà !

PS1: If you notice any mistake, please feel free to tell me.

PS2: Of course all this is a perpetual work in progress. Any piece of advice will be welcome.

20 Likes

Great write up Ben… looking forward to seeing the screen shots of what’s showing in the browser and your software extension. It all sounds like fun stuff.

2 Likes

Sorry for sidetracking, but could you point me to the roon sticker on your nuc? I’d love one of those!

1 Like
1 Like

Have you confirmed multichannel audio works?

YES it does work. Both PCM or DSD (converted by Roon to PCM) are played perfectly and gapless.

1 Like

I just made it with my Silhouette Portrait.

1 Like

Benjamin, thanks for confirming. I also am handy with the unix command line and miss SSH’ing into the server. Originally I installed Debian stretch on my NUC but while the Core and 2 channel stereo HDMI output worked, I could never get multi-channel audio working. I have a decent-sized library of multichannel PCM and a couple of DSD albums that I rarely listen to. When I installed ROCK it all worked “out of the box”. Maybe I will try ubuntu and follow your instructions someday.

1 Like

Installing Ubuntu 18.10 and Roon core just takes a few minutes and works right away.
(All the other steps are just here for displaying Roon web page and use CEC.)

it has to be ubuntu server or can be also ubuntu desktop? As i have core somewhere else is Roon Bridge enough?

highly do not recommend ubuntu desktop, go for server.

Indeed.
Ubuntu Server is better because smaller.
And as far as I can recall, Ubuntu Desktop messed up with the audio configuration.

I have been using this NUC as a rooncore/bridge since I installed it without a single glitch. Never rebooted it. I installed the Roon updates (from the Roon client, just by clicking on the “Upgrade” button) without any problem. Even my CEC extension still works.

1 Like

yeah also had that issue with sound, with ubuntu server all is fine. How do u use CEC - to control what and with what controller?

thanks

My NUC computer is connected to my audio amplifier with HDMI cable. (My NUC is Roon Core and Roon Bridge.)
I am using my amplifier remote control to control Roon (Play, Pause, Prev, Next…) thanks to CEC.
It’s been working like a charm for months now.
Being able to pause with the amp remote control is very useful when the phone rings. Pressing “Next” when playing Roon automatic lists/radio is also really nice.
More info on this post: Roon CEC controller extension
And here: https://github.com/benjaminbellamy/roon-cec-controller-extension
roon-cec-controller-extension

2 Likes

Hi @Benjamin_Bellamy,

Very useful tutorial, thanks.

I additionally installed unclutter to make the mouse pointer disappear.

Also, I’ve expanded /opt/roonkiosk.sh a bit:

qutebrowser --override-restore :fullscreen

Thus, qutebrowser is started directly in full screen mode and no tabs have to be closed manually with the keyboard.

2 Likes

Hi @florib!

Thank you very much for your insight!

Best,
Ben.

Thanks, Ben, for the original post and thanks @florib for the additional tricks. I did have an additional issue that qutebrowser always started with its quickstart page, thinking it was always the first time. I checked that the qutebrowser was running as user “roon” and ~/.local/share/qutebrowser had the right permissions but still I never saw a “state” file created there. So, I created one manually and put this in it:

[general]
quickstart-done = 1

and got it all working. No need for an extra chromecast on the TV. Now if I could just get one of my random small displays around the house (Google Hub, Echo Show, etc.) to work as a display…

1 Like

Thanks for a great guide. I am listening to a freshly installed RoonServer on a UbuntuServer 20.04 LTS on a Bhyve VM in a TrueNAS 12.0-BETA2 calling a library on a FreenAS 11.3-U4.1. All installed in an Active Directory joined homelab environment. Worx great so far. I have given it 4 vCPUs of a pair of old Xeon 2620 v1 to crunch with, which it seems to do without sweat. Maybe not so fast as my ROCK on NUC i7 but fast enough. The only thing that caused me probem is the very erratic mapping of share from the Roon GUI. It gives me the creeps everytime trying a thousend combinations and then on 1001 it just decides to map up. I cant even remember if I had a user/pw or not and if I used \host\share or smb://. Do you know any way to get what path and credentials I used?

I assume you are taking about this:


I never encountered any problem with this.

All the network shares are usually stored on Roon server in /var/roon/RoonServer/Database/Registry/Storage, one file per shared folder.

Each file is named something like loc_29c333a035f442c98bed2051bcb8f582 and contains share mapping with encrypted password:

{
    "id": "29c333a0-35f4-42c9-8bed-2051bcb8f582",
    "version": 2,
    "rescandelay": 4,
    "location": {
        "drive": {
            "type": "Share",
            "volume": {
                "cifsconfig": {
                    "network_path": "\\\\Server\\folder",
                    "username": "login",
                    "password": "**encrypted***",
                    "workgroup": "WORKGROUP"
                }
            }
        },
        "isdir": true,
        "path": "\\"
    },
    "ignorepatterns": [
        "/tmp/",
        "/temp/",
        "/.",
        ".pmbmf/"
    ]
}

Hope this helps…
Ben.

It did thank you. I am in an Active Directory so it was:
“network_path”: “\\Server\folder”,
“username”: “login”,
“password”: “encrypted*”,
“workgroup”: “ad”
Just tried so many options I didnt remember which it was that worked. Thanks again!
/Staffan