ROON_DATAROOT - where to set?

Hello. I’m new to Roon. I’ve installed the server via the easy install package on Ubuntu 14.04
I want the data folder to be in a different location. Do I just edit /etc/init.d/roonserver and change the ROON_DATAROOT env var there?

Then do I just restart the server?

Hi, @Allan_Marcus, could you please give this article a read, and if then you have any questions we will be glad to answer them.

Thanks!


Ivan

yes. I read that article. My question still applies.

Edit it in the installation script then run the install.

Ok, thanks. I’ve already run the installer! So now where does it need to be edited.

Would have been nice if the article suggested editing the installer script. there is NOTHING in the article about editing the installer script first! In fact, the suggestion in the article is to set the env var every time before running start.sh.

so, again, thanks for the info, but now that I have already run the installer, where does it need to be edited? Just in init.d, or somewhere else too?

Not sure, it’s been a long time since I’ve looked at it. I recall the script could also be used to uninstall- do that, then edit it and reinstall.

For Ubuntu 16.04 and above (systemd)

The best thing is to modify the roonserver.service file (located at /etc/systemd/system/)

First stop RoonServer by entering:
(ignore sudo if you are already root user)

sudo systemctl stop roonserver
sudo systemctl disable roonserver

Then edit the service file:

sudo nano /etc/systemd/system/roonserver.service

Edit these lines to match your preferred directory:

Environment=ROON_DATAROOT=/var/roon
Environment=ROON_ID_DIR=/var/roon

Save by hitting CTRL+O (not zero) and press enter. Leave the editor by pressing CTRL+X.

The enable and start Roon Server again:

sudo systemctl enable roonserver
sudo systemctl start roonserver

I’d advise against editing the start.sh script, as it might get updated by a Roon update and you have to do the modifications again.

2 Likes

Thanks, but no such file on Ubuntu 14.04
/etc/systemd/system/roonserver.service

You sure you didn’t mean “/etc/init.d/roonserver” ?

Please note that I never suggested editing start.sh

I just need to know if Roon is likely to edit /etc/init.d/roonserver on an update.
I also don’t quite understand why ROON_DATAROOT is hard coded in /etc/init.d/roonserver and not looked for in a config file.

Sorry, I missed Ubuntu 14.04 uses init.d.
But it is quite similar:

For Ubuntu 14.04 (init.d)

Stop RoonServer:
(ignore sudo if you are already root user)

sudo /etc/init.d/roonserver stop

Then edit the init.d file:

sudo nano /etc/init.d/roonserver

Edit these lines to match your preferred directory:

export ROON_DATAROOT=/var/roon
export ROON_ID_DIR=/var/roon

Save by hitting CTRL+O (not zero) and press enter. Leave the editor by pressing CTRL+X.

Then start Roon Server again:

sudo /etc/init.d/roonserver start

I know you did not suggest editing the start.sh script. I added it just for reference, if others are struggling with this as well. :slight_smile:

Start scripts (regardless if init.d or system.d) will not be modified by a Roon update. They are only created by the “Easy Installer” script which won’t be called by Roon itself or by the Roon update mechanism.

Thanks for the help.

On a side note, if you had just read the original post, this would have been a simple one line answer (yes).

Again, I suspect the more detailed post is there to help others that may want to do the same but aren’t possessed of your level of assumed Linux knowledge.

1 Like

Just thought I’d bump this thread and add my thanks. I’ve just done a reinstall of my Linux server and Roon and couldn’t remember how I changed the location of my Roon Database and Logs which kept filling up my small boot disk and root partition when I first started out with Roon many years ago.
Thanks!
Michael

1 Like