Running roon server on ubuntu server

Hi there - I am running ubuntu server, 22.04.2, just installed. I have got roon server up and running and used my backup successfully.

I have a couple of issues I want to solve.

Previously I would enter the device IP, when I was running ROCK and I saw the Roon service page, how do I get to this when I am using roon server?

Secondly, I would like to use something like freefilesynce to periodically update the SSD with my music on from the NAS with the backup. I am not sure of the best way to do this, I can use either a linux machine or windows to sync with roon server. Any tips for a novice welcome!

Thanks

ROCK is a bespoke Linux OS, and the web page is part of this, not Roon Server.

If you’re not comfortable using the terminal and systemctl, you could install Cockpit. IIRC, this also provides a page to stop/start services.

The best option is to use Rsync from Ubuntu server. Something like this:

rsync -av --partial user@remote.host:/path/to/copy /path/to/local/storage

I assume the NAS has SSH. If not, mount a Samba share to your local file system. You can schedule this to run at regular intervals.

You may need to tweak this to handle any folders deleted in the source.

2 Likes

Hi @Martin_Webster, thanks for responding.

As you can probably tell, I am a linux newbie, well, I have been using it for a few years off and on, but that usually involves various guides on the internet.

Check - ok, so won’t look for that then.

I am semi-comfortble, so I can but not terribly profficient! I will look into cockpit!

Actually I don’t normally use SSH with the NAS, normally smb or nfs. I need to look into this more.

1 Like

To install Cockpit, simply type sudo apt update && sudo apt install sudo apt install -t jammy-backports cockpit --yes. Then open in your browser: http://<server-IP>:9090. You can stop/start Roon from the Services menu.

If sshd is already running on the NAS, I’d use this rather than Samba. Otherwise, mount the share to /media/<your-userid> in /etc/fstab, and synchronize that way.

Edit:

Here are a few screenshots:



2 Likes

@Martin_Webster gave you great advice. I’ll fill in a couple of details.

As @Martin_Webster suggests, using ssh for remote access is an essential skill. I also like to install xrdp and then use Microsoft Remote Desktop to access headless Ubuntu servers. You can install xrdp with:

sudo apt install xrdp -y

but I suggest you read up on it before doing so.

I’m not entirely sure you need to run cockpit. If you do your Roon install using Roon’s installation script, Roon will start automatically and you shouldn’t need to play with systemctl.

I use Syncthing for all things related to sync. It’s a complicated thing to learn and set up but it is extremely flexible and capable. If you were motivated to explore it, you could run it on both your NAS and your Roon box and set up a sync relationship that would sync unidirectionally from your NAS to your Roon system. That said, if you have a functioning NAS, you might just start by pointing Roon at a Music share on your NAS and see how that works for you. That’s what I do and it works just fine.

Hope there’s something helpful in there for you!

2 Likes

I said you don’t necessarily need to run Cockpit. I’ve never used it and I thought @Martin_Webster recommended it for it’s ability to start and stop processes. I’ve taken a look at it now - it looks pretty awesome. Does a lot more than I guessed. Thanks for the recommendation!

It’s not something I use, and I just installed it to take another look. It’s come a long way since I last looked. Nonetheless, for my VPS, cloud backup server (BorgBackup), and local Roon server, I’ll probably stick with SSH. I may run it for a while and use the LM Sensors plugin to monitor the NUC’s temperature.

1 Like

I actually use dash. on my NAS and the couple of Ubuntu servers I run (including Roon). I pull dash. widgets into a Homarr-based dashboard.That gets me views like this where each collapsible section is a physical machine.

That’s the advanced class, though :slight_smile:

1 Like

Thanks @Martin_Webster and @gTunes for your helpful comments.

I have got cockpit running and I am just exploring it.

I have not got any syncing working as of yet. To clarify, I want to sync between my NAS and a SSD which is held on Ubuntu server. Currently I have both the NAS music and SSD music folders included in my fstab on Ubuntu sever but no sync task.

In terms of syncing, its usually when I rip a new CD and I want to bring it across to the Roon SSD from the NAS. Traditionally I have done this in windows with freefilesync and I have been able to successfully mirror my NAS music folder to my SSD folder and I have a GUI to help me. I think its this functionality I would like going forwards. I rip my CDs using dBpoweramp, which runs on windows, so it makes senst that the sync happens in windows. I don’t think I need it to happen automatically, and I would like to view changes before they happen.

FreeFileSync should work. In my opinion and experience, the best practice, regardless of what tool you choose, is to consider some instance of your collection to be your primary/master and to consider the others to be replicas/secondaries. Make your changes in one place and use a sync tool that allows you to say “make this secondary look like this primary”.

You want that because while ripping a new CD may be your current use case, over time, you’ll probably end up reorganizing your folder structure, renaming things, playing with embedded album art, modifying metadata tags, etc. Things are just a lot easier if you always sync in one direction.

@Martin_Webster recommended rsync and if you like the idea of being able to preview changes, you can do that with rsync. That’s the purpose of the -n command line option. Do be careful about copying file permissions, though - you probably don’t want that so you’ll want to understand how various command line options do and don’t have that behavior.

One last tip. You will probably find yourself getting comfortable at the command line more quickly than you imagine. Windows 10 and beyond has a feature that can be enabled called “Windows Subsystem for Linux (WSL)”. It’s easy to enable the control panel and it basically gets you an operational Linux command line (and sandbox) within Windows. If you decide to play with rsync, you might want to enable WSL and use the command line that it provides.

Good luck with all of this - I hope you’re having fun learning new stuff!

1 Like

There’s little more to add to @gTunes’s reply.

However, an important consideration is where you do you editing, and if this is your master copy. This may be more relevant if Roon Server (and the NAS) are headless.

To illustrate, my laptop hold my master copy, and this is where I do all my editing. I then sync (push) to my Linux server. Incidentally, both devices are backed-up locally and to the cloud.

I currently mount Roon Server’s library folder using Samba. However, I nay change to SSH as Samba doesn’t play well with certain characters or extraneous white space.

If your server is doing the syncing, it is essentially pulling the changes from your master. In both examples, you need to consider renamed files and folders, and how you handle deleting.

1 Like

I also use Cockpit and Syncthing for my multiple Ubuntu servers. A few notes:

  1. Cockpit’s software update mechanism is incompatible with Ubuntu Server’s default network setup, it requires NetworkManager (which is the default for Ubuntu Desktop).
  2. Accessing Cockpit over your local area network (from a desktop or laptop) requires a bit of additional configuration, and is a bit scary with Chrome or Safari’s warnings against https:
  3. I use Syncthing with 4 Ubuntu servers and a Synology NAS. The NAS just mirrors (one of the) Ubuntu servers, while the servers are sync are read-write as I happen to add music files to any of them depending where I am at the time.
  4. All my servers are on a Tailscale VPN.
2 Likes

@Fernando_Pereira Are you able to use Tailscale to get a device that is outside of your LAN (e.g., and Android device on mobile data or some other network) to act as a Roon endpoint? I do this with ZeroTier but I’m curious about Tailscale given its use of Wireguard.

I go further with Syncthing than what you’ve described. I’m basically full private cloud using Synology. I’ve got it running on everyone’s clients (primarily Macs) and syncing to individual home directories on the NAS. From there, it backs up to Azure. Syncthing has a steep learning curve, particularly for things like exclusion filters. Once you’ve scaled that mountain, it’s phenomenal.

Lots to learn it seems.

I was just having another go from my windows 11 machine using freefilesync syncing from my NAS folder to the interal SSD both mounted in the Server. I was trying to use the sftp functionality using the credentials I created when I set the server up, but I get this message

SSH_FX_PERMISSION_DENIED [libssh2_sftp_mkdir].

I am not sure why I get this error message, possbily as not logged in specifically using root?

Out-of-the-box, I don’t get cross-LAN device discovery for Roon with Tailscale. I suspect there may be some way to configure things to achieve that, but it’s not a need for my use cases.

1 Like

I sincerely recommend opening up a ChatGPT window and using it to consult on everything you do. Be aware that it will make mistakes with confidence. So push back on it if you think it’s wrong :slight_smile:

I don’t know if I captured your issue correctly but I asked:

image

and got:

Whether or not that helps, it should give you a sense of what you can do. And just ask follow up questions if you need to - it maintains context.

Thanks @gTunes. I would not have thought to try that. So I did have a go and after a bit of back and forth, and me asking about root set-up and access ‘we’ determined root was not set-up. So, I did that and set a password…it still didnt work. I then went off on my own, and it turns out I need to enable root across SSH, so I did that, and it worked! I could sync my test album succesfully from my NAS to the SSD installed in the Ubuntu Server.

Right now the root account is still active, so it seems I have a few choices. I can either, set a stronger password for increased security, revert SSH so root can’t be used across it, or disable root entirely. I will need to copy more CDs and so will need to sync fairly regulary. To be on the safe side I have currently reverted the root access over SSH, and also changed the root password to a much longer and complicated one.

1 Like

This isn’t a great idea, and ideally should be avoided, i.e., no remote access for the root account. Preferably, create a user with sudo privileges, disable password logins, and use certificates.

1 Like