{"id":9103,"date":"2018-01-17T19:40:09","date_gmt":"2018-01-17T18:40:09","guid":{"rendered":"https:\/\/nzbusenet.com\/sonarr-installeren-debian-command-line\/"},"modified":"2023-07-22T14:03:23","modified_gmt":"2023-07-22T12:03:23","slug":"sonarr-install-debian-command-line","status":"publish","type":"post","link":"https:\/\/nzbusenet.com\/en\/sonarr-install-debian-command-line\/","title":{"rendered":"Install Sonarr Debian via command line"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In This manual Sonarr install Debian. We will install the program Sonarr via the command line. On a Computer with Debian. Next, we will configure Sonarr. To automatically download your Favorites TV series. From the newsgroups.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"debian-sonarr-installeren\">Install Sonarr Debian<\/h2>\n<div class='code-block code-block-8' style='margin: 8px 0; clear: both; width: 700px; height: 250px;'>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-4833496329174552\"\n     crossorigin=\"anonymous\"><\/script>\n<!-- nzbusenetinberichten2021 -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:700px;height:250px\"\n     data-ad-client=\"ca-pub-4833496329174552\"\n     data-ad-slot=\"6745544931\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/div>\n\n\n<p class=\"wp-block-paragraph\">We need to add the Mono repository of Xamarin. So you know for sure. That you get the latest version of the Mono software.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo apt-key adv &#8211;keyserver hkp:\/\/keyserver.ubuntu.com:80 &#8211;recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF<br \/>echo &#8220;Deb Http:\/\/download.mono-project.com\/repo\/debian wheezy main&#8221; | sudo tee\/etc\/apt\/sources.list.d\/mono-xamarin.list<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">We need to add the &#8220;https&#8221; installation source capability.<\/p>\n<div class='code-block code-block-8' style='margin: 8px 0; clear: both; width: 700px; height: 250px;'>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-4833496329174552\"\n     crossorigin=\"anonymous\"><\/script>\n<!-- nzbusenetinberichten2021 -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:700px;height:250px\"\n     data-ad-client=\"ca-pub-4833496329174552\"\n     data-ad-slot=\"6745544931\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/div>\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo apt-get install apt-transport-https-y<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">Now we go. Add the Sonarr repository.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo apt-key adv&#8211;keyserver keyserver.ubuntu.com&#8211;recv-Keys FDA5DFFC<br \/>echo &#8220;deb https:\/\/apt.sonarr.tv\/ master main&#8221; | sudo tee -a \/etc\/apt\/sources.list<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">We need to do an update now.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo apt-get update<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">Now we are going to download Sonarr. and install.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo apt-get install nzbdrone -y<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">Rights. On the Sonarr folder.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo chown -R username:username \/opt\/NzbDrone<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">We are now starting Sonarr. To see if it works.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">mono \/opt\/NzbDrone\/NzbDrone.exe<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">You have now completed the installation of Sonarr. And you can approach Sonaar via http:\/\/ip.adres:8989<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"sonarr-auto-starten\">Start Sonarr automatically<\/h2>\n\n<p class=\"wp-block-paragraph\">Now we still have to make sure that Sonarr starts, while booting Debian. We will do that in the following way.<\/p>\n\n<p class=\"wp-block-paragraph\">We&#8217;re going now. Create a startup script.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo nano \/etc\/init.d\/nzbdrone<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">Below we paste here. Beware! Change the user name to your own username.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">#! \/bin\/sh<br \/>### BEGIN INIT INFO<br \/># Provides: NzbDrone script<br \/>### END INIT INFO<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">############### Edit me##################<br \/># Path to App<br \/>APP_PATH=\/opt\/NzbDrone<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># User<br \/>RUN_AS=Username<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># Path to Mono bin<br \/>DAEMON=\/usr\/bin\/mono<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># Path to store PID file<br \/>PID_FILE=\/var\/run\/nzbdrone\/nzbdrone.pid<br \/>PID_PATH=$(dirname $PID_FILE)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># script Name<br \/>NAME=nzbdrone<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># app Name<br \/>DESC=NzbDrone<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"># startup Args<br \/>EXENAME=&#8221;NzbDrone.exe&#8221;<br \/>DAEMON_OPTS=&#8221; &#8220;$EXENAME<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">############### End edit me##################<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NZBDRONE_PID=`ps auxf | grep NzbDrone.exe | grep -v grep | awk &#8216;{print $2}&#8217;`<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">test -x $DAEMON || exit 0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">set -e<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">#Look for PID and create if doesn&#8217;t exist<br \/>if [ ! -d $PID_PATH ]; then<br \/>mkdir -p $PID_PATH<br \/>chown $RUN_AS $PID_PATH<br \/>fi<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">if [ ! -d $DATA_DIR ]; then<br \/>mkdir -p $DATA_DIR<br \/>chown $RUN_AS $DATA_DIR<br \/>fi<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">if [ -e $PID_FILE ]; then<br \/>PID=`cat $PID_FILE`<br \/>if ! kill -0 $PID &gt; \/dev\/null 2&gt;&amp;1; then<br \/>echo &#8220;Removing stale $PID_FILE&#8221;<br \/>rm $PID_FILE<br \/>fi<br \/>fi<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">echo $NZBDRONE_PID &gt; $PID_FILE<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">case &#8220;$1&#8221; in<br \/>start)<br \/>if [ -z &#8220;${NZBDRONE_PID}&#8221; ]; then<br \/>echo &#8220;Starting $DESC&#8221;<br \/>rm -rf $PID_PATH || return 1<br \/>install -d &#8211;mode=0755 -o $RUN_AS $PID_PATH || return 1<br \/>start-stop-daemon -d $APP_PATH -c $RUN_AS &#8211;start &#8211;background &#8211;pidfile $PID_FILE &#8211;exec $DAEMON &#8212; $DAEMON_OPTS<br \/>else<br \/>echo &#8220;NzbDrone already running.&#8221;<br \/>fi<br \/>;;<br \/>stop)<br \/>echo &#8220;Stopping $DESC&#8221;<br \/>echo $NZBDRONE_PID &gt; $PID_FILE<br \/>start-stop-daemon &#8211;stop &#8211;pidfile $PID_FILE &#8211;retry 15<br \/>;;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">restart|force-reload)<br \/>echo &#8220;Restarting $DESC&#8221;<br \/>start-stop-daemon &#8211;stop &#8211;pidfile $PID_FILE &#8211;retry 15<br \/>start-stop-daemon -d $APP_PATH -c $RUN_AS &#8211;start &#8211;background &#8211;pidfile $PID_FILE &#8211;exec $DAEMON &#8212; $DAEMON_OPTS<br \/>;;<br \/>status)<br \/># Use LSB function library if it exists<br \/>if [ -f \/lib\/lsb\/init-functions ]; then<br \/>. \/lib\/lsb\/init-functions<br \/>if [ -e $PID_FILE ]; then<br \/>status_of_proc -p $PID_FILE &#8220;$DAEMON&#8221; &#8220;$NAME&#8221; &amp;&amp; exit 0 || exit $?<br \/>else<br \/>log_daemon_msg &#8220;$NAME is not running&#8221;<br \/>exit 3<br \/>fi<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">else<br \/># Use Basic Functions<br \/>if [ -e $PID_FILE ]; then<br \/>PID=`cat $PID_FILE`<br \/>if kill -0 $PID &gt; \/dev\/null 2&gt;&amp;1; then<br \/>echo &#8221; * $NAME is running&#8221;<br \/>exit 0<br \/>fi<br \/>else<br \/>echo &#8221; * $NAME is not running&#8221;<br \/>exit 3<br \/>fi<br \/>fi<br \/>;;<br \/>*)<br \/>N=\/etc\/init.d\/$NAME<br \/>echo &#8220;Usage: $N {start|stop|restart|force-reload|status}&#8221; &gt;&amp;2<br \/>exit 1<br \/>;;<br \/>esac<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">exit 0<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">We now close this file. and save it. Press <strong>CTRL + X<\/strong> key and then <strong>Y<\/strong> key. To confirm this.<\/p>\n\n<p class=\"wp-block-paragraph\">Now we need. To make the script excutable. Make<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo chmod +x \/etc\/init.d\/nzbdrone<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">Now we add it to the start up.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo update-rc.d nzbdrone defaults<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">If, everything went well. Then Seouls the command below. Work now.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo service nzbdrone start<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">You can test this. Of you do a reboot<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">sudo reboot<\/p>\n<\/blockquote>\n\n<p class=\"wp-block-paragraph\">You have now finished the startup script.<\/p>\n\n<p class=\"wp-block-paragraph\"><strong>Debian<\/strong> <strong>Sonarr tutorial<\/strong><\/p>\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/nzbusenet.com\/en\/sonarr-tutorial\/\">Sonarr tutorial<\/a>.<\/li>\n\n\n\n<li><a href=\"https:\/\/nzbusenet.com\/en\/sonarr-install-debian-command-line\/\">Install Sonarr Debian <\/a>.<\/li>\n\n\n\n<li><a href=\"https:\/\/nzbusenet.com\/debian-instellen-sonarr-met-nzbget-voor-de-nieuwsgroepen\/\" target=\"_blank\" rel=\"noopener noreferrer\">setting up<\/a> <a href=\"https:\/\/nzbusenet.com\/en\/debian-setup-sonarr-using-nzbget\/\" target=\"_blank\" rel=\"noreferrer noopener\">Sona<\/a><a href=\"https:\/\/nzbusenet.com\/debian-instellen-sonarr-met-nzbget-voor-de-nieuwsgroepen\/\" target=\"_blank\" rel=\"noopener noreferrer\">rr with NZBGet Debian.<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>In This manual Sonarr install Debian. We will install the program Sonarr via the command line. On a Computer with Debian. Next, we will configure Sonarr. To automatically download your Favorites TV series. From the <a class=\"mh-excerpt-more\" href=\"https:\/\/nzbusenet.com\/en\/sonarr-install-debian-command-line\/\" title=\"Install Sonarr Debian via command line\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":12223,"featured_media":49516,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[729],"tags":[],"class_list":["post-9103","post","type-post","status-publish","format-standard","has-post-thumbnail","category-sonarr-tutorial"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/nzbusenet.com\/wp-content\/uploads\/2018\/01\/Sonarr-installeren-Debian.gif","_links":{"self":[{"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/posts\/9103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/users\/12223"}],"replies":[{"embeddable":true,"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/comments?post=9103"}],"version-history":[{"count":0,"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/posts\/9103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/media\/49516"}],"wp:attachment":[{"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/media?parent=9103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/categories?post=9103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nzbusenet.com\/en\/wp-json\/wp\/v2\/tags?post=9103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}