Making NzbDrone Boot with Linux (Ubuntu Tested Only)

Hey there i know the majority of people here are using windows Machines for their Drone setup however a few like myself wanted to try it out on Linux however once installed i noticed there was no way to make it boot as a service like in windows so after a fair bit of trial and error i thought i would post a temporary solution until something better comes along

First obviously make sure NzbDrone is installed you can go here to find out how to do that https://github.com/NzbDrone/NzbDrone/wiki/Installation

Next I created a .sh or batch file to automate the process of type “sudo mono /opt/NzbDrone/NzbDrone.exe”
Here is a link to the batch file so it saves you all from having to do this even though it was easy if you open in a text editor you will see

Batch File: (Just Hit Download to grab it)
http://goo.gl/4c8yWg

Next there are two ways of doing this

Method One:

is using rc.local you do this by opening a terminal windows and typing (without quotes) “sudo nano /etc/rc.local” (or if easier you can use a text editor like gedit, pluma, leafpad whatever you have just replace the nano part with what you want

Once this is open go to the bottom and just above where it says “exit 0” type the following for eg.

/bin/sh /home/server/Desktop/NzbDrone.sh

mine was saved to my desktop on my linux machine you will need to edit this to wherever you put the NzbDrone.sh file you downloaded above but remember to keep the /bin/sh first then a space then the rest

Method Two: (With Screenshots)

Go to your menu and find the application to set startup items this may be called many things mine was called Session And Startup

Once this is open i went to Application AutoStart there i clicked on the add button

Next i added the following which you will notice is the same as the one in Method One “/bin/sh /home/server/Desktop/NzbDrone.sh”

after that i gave it a name and then pressed “Ok” and then “Close” i then did a reboot of the system

on reboot i did notice it took a couple more seconds to login this is because this is setting that command to run at login but once logged in i opened my browser and went to http://localhost:8989 and voila it started

I cannot guarantee this will work but it seems to be working for me i am linux newbie and this took me a while to figure out so hopefully by posting here it will help someone else avoid the trouble i went through

Nice work mate. It may not be the most beautiful solution, but it should work. I would recommend using mono-service instead though, and run it as a daemon. Reduces overhead (although with such a simple script it’s tiny) and allows you to do stuff such as start/stop/pause/restart the program later if needed.

At work right now, and going for a pint or ten right afterwards, but will post an Upstart script with some more features and easier install tomorrow.

Thanks @nosscire I’ll look into mono-service. we would really appreciate feedback from guys like you on how to make nzbdrone feel natural in osx and linux.

also would really appreciate it if you could post your script to http://wiki.nzbdrone.com

@nosscire said:
Nice work mate. It may not be the most beautiful solution, but it should work. I would recommend using mono-service instead though, and run it as a daemon. Reduces overhead (although with such a simple script it’s tiny) and allows you to do stuff such as start/stop/pause/restart the program later if needed.

At work right now, and going for a pint or ten right afterwards, but will post an Upstart script with some more features and easier install tomorrow.

No worries mate and you are right the mono-service would work better i should have thought of that then again it was like 3am when i was doing this so gotta blame no sleepy time :slight_smile:

I am just messing around with linux to learn a bit i am still running Windows Server of my actual server this was more of a test using a VM and running a Ubuntu LTS Derivative called Linux Lite

I wanted to see if i could get it up and running for those who either have or plan to use Linux Full time on their NzbDrone Based Machine

Plus as kayone mentioned above they need people to test out and give feedback so they can make improvements and i am all about helping NzbDrone Project and NzbDrone community become even better

Maybe that is why i have been hanging around for so long (i think i have been using NzbDrone since very early version about 3 Forums ago I think LOL) trying to help but mostly probably annoying Markus101

Lol @ three forums ago. Me and @markus101 were talking about it a few days a go. We have had 4 forums so far. First one lasted only about a day

haha i did not know that wow 1 day that is the new record hopefully the provider you guys are with now is a little bit more reliable :slight_smile:

pretty bad though when you can account for time spent somewhere by not looking at join date but the amount of complete restarts of the forum you have had to go through like counting the rings on a tree to tell how old it is lol :slight_smile:

Haha. The one day one (more like a week) was us deciding the software wasn’t great for our use case. But lesson learned.

Updated Wiki with Upstart script as well. Ended up using mono instead of mono-service myself as well, simply because of Mono’s odd forking behaviour (meaning that mono-service daemons can not be tracked properly).

Just a quick comment: I use a very simple method: cron @reboot run the command as normal user.

It works well enough. :slight_smile: