Ubuntu Roon server install tips

I’ve just placed an order for an i7 Nuc10 with additional storage that will be positioned in a cupboard and ran headless.

I was intending to install Ubuntu and Roon Server, but some of the above looks terrifying and I’m wondering if I should just amend the order and have it come with Windows10 pre-installed.

I’ve read Windows 10 isn’t great for leavening running as a headless - but I’m more worried I’ll make a hash of installing Roon Server on Ubuntu than about that now I’ve read some of this

Do plan on headless server install? If so, I can provide the steps and commands.

Hi Marin,
That’s very kind.
Yes I plan on running it headless.

The Nuc won’t arrive for about a week, so have time to make a change to my plan if I’ve misunderstood something though my various steps of research.

  • I decided to go with Ubuntu or Windows (rather than ROCK) as I want the music files which will be on the 2.5" SSD to be part of a Dropbox folder (only that folder will be selectively synced), and that way I can drag and drop new files into that folder on my day-to-day MacBook and they will appear in that folder on the Nuc. I then want the full Nuc to auto-backup to my Google Backup & Sync every day.
    It’s my understanding I couldn’t do that on ROCK.

  • I then decided with Ubuntu over Windows 10 as read it wasn’t a good idea to have Windows 10 sat running as Roon Server doesn’t sit as a ‘service’ on Windows.

Open to being told I’m wrong on all counts as I may have got the total wrong end of the stick.

If I’m correct then the steps and commands would be fantastic.
I’ve read/watched several tutorials on flashing Ubuntu and installing it on the Nuc and it seems manageable, but then reading this Roon installation thread seems quite daunting to someone who’s never used Linux.

Side bar - should I be installing Ubuntu and Roon on the 250GB M.2 rather than on the 2.5" SSD, and if so, how do I specify that?

Thanks in advance for your advice

Setting up Ubuntu Server is straightforward and quick. I’ll digest what you’ve said and post over the weekend.

1 Like

Many thanks, Martin. Very neighbourly of you.
I’d have been dead in the water many times without the input of the Community

1 Like

Okay, here’s a start …

Basic tutorial to install Roon Server on Ubuntu Server 20.04 LTS.

Install Base System

Using the mini.iso (Mininimal Install CD) or standard Ubuntu Server image, install base system over network connection. You’ll need to hook the PC to a keyboard and monitor for the installation and make sure it’s connected to a wired network connection.

Download ISO to Windows or Mac and use BalenaEtcher to create bootable USB pendrive.

  1. Boot PC and select Install

VirtualBox_Ubuntu Server_28_08_2020_17_50_08

  1. Select language and location

  1. Configure keyboard

  1. Configure the network

Wait for the network to autoconfigure using DHCP, then enter the hostname.

  1. Choose a mirror

Select mirror closest to your location.

  1. Set up users and passwords

  1. Confirm time zone

  1. Partitioning

This is up to you! My preference is to use LVM (so I can take snapshots and backup without taking the machine down) plus separate \ (root) and \home partitions.

In this example, I’m keeping it simple.

  1. Wait for the base system to install

This will take a few minutes depending on your Internet connection.

  1. Configure automatic security updates

  1. Select software

Keep things simple and don’t install anything now!

  1. Install the boot loader

Install GRUB boot loader to master boot record.

  1. Set clock to UTC

  1. Finish the installation

Make sure you remove the installation media when prompted!

The base system is now installed!

Finishing up

The following steps provide the following features:

  1. ssh remote access
  2. Dropbox
  3. Roon Server
  4. Web GUI

Other options, e.g. Samba, automatic updates etc., can follow.

ssh

Allow ssh access without password (certificate-only) for non-root user. This guide is for Mac users. Windows will require PuTTy.

sudo apt update && sudo apt upgrade -y
sudo apt install openssh-server

From the Mac edit known_hosts and remove any previous entries for the server, then copy the key across. You’ll need to replace userid and hostname.

nano ~/.ssh/known_hosts
ssh-copy-id -i ~/.ssh/id_rsa.pub martin@ubuntu.home
ssh ubuntu.home

From the Ubuntu server, harden ssh by disabling access using a password. This is optional.

sudo nano /etc/ssh/sshd_config

Replace #PasswordAuthentication yes with PasswordAuthentication no . Likewise, ensure the following.

PermitEmptyPasswords no
HostbasedAuthentication no

Save the file using <Ctrl>-X . Now restart the ssh server.

sudo systemctl restart sshd

Install Dropbox

cd ~ && wget -O - “https://www.dropbox.com/download?plat=lnx.x86_64” | tar xzf -
~/.dropbox-dist/dropboxd

Install Roon Server

sudo apt install curl ffmpeg libasound2 cifs-utils
curl -O http://download.roonlabs.com/builds/roonserver-installer-linuxx64.sh
chmod +x roonserver-installer-linuxx64.sh
sudo ./roonserver-installer-linuxx64.sh
sudo systemctl status roonserver

Web GUI

If you’d like a web GUI then install Cockpit.

sudo apt install cockpit

That’s all folks!

4 Likes

Thanks so much, Martin.

NUC arrives in the next week so quite excited to get going!

1 Like

My NUC is scheduled to arrive in the next hours and I’m excited to start getting my teeth into this and getting it set up.

One thing I’m still a bit unsure about is if/how I specify which disc/drive Ubuntu Server, and Roon Server install themselves on.

My NUC will have a 250GB M.2 drive, and a 2.5" SSD…

I know my music files should be stored on the 2.5" SSD, but unsure about where the Ubuntu and Roon should sit.

It may all just work using the above instructions, but as it’s something I don’t understand thought better to ask than not.

Any advice appreciated.

The OS and Roon will be installed on the 250GB M.2 drive. The SSD will be solely for data and can be mounted to /media or any other valid path, e.g. ~/Music (where ~ is your home folder.)

I suggest you install the SSD after the basic install is complete (after a sudo shutdown -h now.) This will make the install so much easier for you.

I’ll provide you with the steps to format and mount the drive afterward. I also expect you will want to share the drive using Samba so you can copy new files across your network.

1 Like

Once more - thank you very much Martin.

The NUC will be coming ready built, so I assume the SSD will already physically be in there - but not sure if it will be installed or not (?)

If it is already installed leave it that way. You’ll just have to be alert at step 8. Partitioning when you select the disk. In the second image two drives will be listed, so make sure you select the 250GB one!

@Martin_Webster (or anyone else with some thoughts) Great info here but I’m kinda stuck and could use some words of encouragement on this, lol. I created this thread a few days ago for ref.

So I have 20.04.2 LTS server installed, core installed etc. However, this has been a bit long in the tooth to be honest. I’m basically building this up as a dry run / get it working and sort of planned on doing it all over again - I like to learn this stuff and don’t want to give up, but it is really time-consuming googling every command since I keep hitting road blocks. Which is how you learn I get it, but….

I threw in a second disk as I wait for my new one to be delivered. I wanted to mimic the steps I would need to perform a format, partition, mount, edit the fstab file and put in the unique ID to auto mount etc…and eventually copy all the data from my NAS to this drive. I’m kinda stuck on this secondary drive setup and how to access it and share it. Best I can surmise is that in this enviro, ubuntu creates a pointer to the drive via a folder you specify in the fstab file (Unlike Win where you access the drive directly). I created a folder called music in my “/mnt$” profile. .

So I ran through numerous exercises to create a partition + format. This is what I have and the "/dev/sda” is the drive in question (temporary/test until new one arrives), assuming everything else is as it should. I took the defaults during install for LV, maybe one partition for the system drive would be better for me? Anyway, I can rebuild all of this again, so it doesn’t matter if I hack it up.

I did install using Martin’s excellent detailed steps initially, but the system would never get past the bios, and just hung there. I read somewhere that it may be due to UEFI. Anyway, I then just reinstalled using ubuntu server following the roon linux setup.

ubuntu disk2

Hello @Swisstrips! From the screenshot it would seem that you have decided to mount the new drive to /mnt/music.

This is probably the way to go although I’d mount the drive to /media. [My setup uses LVM for the system drive (SSD) which has partitioned for /boot, /boot/efi, / (root) etc. and ZFS for my data volumes (spinning disk.)] For my CCTV I added a separate drive as follows.

First step is to correctly identify the drive.

sudo lshw -C disk

Warning: The consequences of misidentifying the drive may be catastophic and result in data loss!

Partition the drive.

sudo fdisk /dev/sda

Enter p to display the partition table. Use d to delete existing partitions and c to create a new partition, e.g.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Just go with the defaults for whole disk. Press w to write the changes.

Now assuming your drive is currenlty identified as /dev/sda go ahead and format it.

sudo mkfs -t ext4 /dev/sda1

Now create mount point.

sudo mkdir /media/music

Now you want to ensure the drive is mounted at boot. So let’s list the drives by UUID:

ls -Flai /dev/disk/by-uuid/

For /dev/sda1 copy the disk ID. Now edit /etc/fstab and add the following line (replacing the ID with your one.)

sudo nano /etc/fstab

# SATA drive for music
# /media/music was on /dev/sda1
UUID=4b8be667-e62f-4754-85d7-7c80a282dce5 /media/music ext4 nosuid,nodev,nofail 0 0

Finally, mount the drive.

sudo mount -a

That’s all.

2 Likes

Hi @Martin_Webster, thank you for taking the time to respond, appreciated.

I follow most of what you suggested. One last :slight_smile: question about sharing, so I can access this new drive (music folder) from Win, NAS. CIFS and SMB are installed but any tips, suggestions on getting that music root share and permissions applied?

Regards

1 Like

Yes, you can share the drive. Do you have Samba installed already?

Yep, both CIFS and Samba, I assume sharing this is the proper thing to do for a number of reasons.

Okay, so all you need to do is create the share. But first, you’ll need to think about file permissions and who can access the ‘music’ drive.

You’ll probably want to own the filesystem, so type the following.

sudo chown swisstrips:swisstrips /media/music or sudo chown -R swisstrips:swisstrips /media/music if you’ve already added some files/ .folders.

Now if you want to create a share for your sole use then this should work; you’ll need to add your login/ password to your PC/ Mac keychain.

[music]
  path = /media/music
  valid users = @swisstrips
  browsable = yes
  read only = yes
  guest ok = no

If you want to provide guest acces then this will probably do it.

[music]
  path = /media/music
  browseable = yes
  read only = yes
  guest ok = yes

And if you want read/ write access then use writable = yes and read only = no in the blocks.

Finally, restart Samba.

sudo systemctl restart smbd && sudo systemctl restart nmbd

Thank you.

1 Like

Just for clarification, will running the apt-get update / apt-get upgrade commands on Ubuntu server update the Roon core package build or is this only done from the GUI controller side of things (e.g. in settings > about > build update)?

No… Roon is not installed or updated by the Ubuntu package manager.

This is the way I have always done it for my server running on Ubuntu.