[GUIDE] install CouchPotato V2

I didn’t see any tutorial here about installing CouchPotato, so for convenience sake I decided to add this here.

THIS IS NOT MY WORK, I copied everything from nfodiz’ tutorial for the My Book Live found in this  thread. Please give him kudos for his good work! I’m just a linux noob who tried his instructions (slightly altered) and found that they worked!!

Don’t know anything about warranty, but it’s best to assume that YOUR WARRANTY IS NOW VOID.

First of all, open an SSH connection

Change dir

cd /usr/share/

 Download CouchPotato

wget http://github.com/RuudBurger/CouchPotatoServer/tarball/master

 Rename

mv master couch.tar.gz

 Extract

tar -xzvf couch.tar.gz

 Remove download

rm -f couch.tar.gz

 Rename directory

mv RuudBurger* CouchPotato

 Start CouchPotato

/usr/bin/python2.7 /usr/share/CouchPotato/CouchPotato.py

In my install Putty froze in this step (don’t know why). After a while, I just exited and restarted the application to resume the steps from here on. (The couchpotato service was allready running at that point at MyCloud IP:5050

Let it run for a minute or so and a menu will come up

 Hit q to quit and when asked if you are sure hit y

 Hit Control and c to get back to the command line

  Now we need to create the startup script

nano /etc/init.d/couchpotato

 Paste this

#! /bin/sh### BEGIN INIT INFO# Provides:          couchpotato# Required-Start:    $local_fs $network $remote_fs# Required-Stop:     $local_fs $network $remote_fs# Should-Start:      $NetworkManager# Should-Stop:       $NetworkManager# Default-Start:     2 3 4 5# Default-Stop:      0 1 6# Short-Description: starts instance of CouchPotato# Description:       starts instance of CouchPotato using start-stop-daemon### END INIT INFO# Check for existance of defaults file# and utilze if availableif [-f /etc/default/couchpotato]; then    . /etc/default/couchpotatoelse    echo "/etc/default/couchpotato not found using default settings.";fi# Script nameNAME=couchpotato# App nameDESC=CouchPotato# Path to app rootCP_APP_PATH=${APP_PATH-/usr/share/CouchPotato}# User to run CP asCP_RUN_AS=${RUN_AS-root}# Path to python binCP_DAEMON=${DAEMON_PATH-/usr/bin/python2.7}# Path to store PID fileCP_PID_FILE=${PID_FILE-/var/run/couchpotato.pid}# Other startup argsCP_DAEMON_OPTS=" CouchPotato.py --daemon --pid_file=${CP_PID_FILE}"test -x $CP_DAEMON || exit 0set -ecase "$1" in  start)        echo "Starting $DESC"        rm -rf $CP_PID_FILE || return 1        touch $CP_PID_FILE        chown $CP_RUN_AS $CP_PID_FILE        start-stop-daemon -d $CP_APP_PATH -c $CP_RUN_AS --start --background --pidfile $CP_PID_FILE --exec $CP_DAEMON -- $CP_DAEMON_OPTS        ;;  stop)        echo "Stopping $DESC"        start-stop-daemon --stop --pidfile $CP_PID_FILE --retry 15        ;;  restart|force-reload)        echo "Restarting $DESC"        start-stop-daemon --stop --pidfile $CP_PID_FILE --retry 15        start-stop-daemon -d $CP_APP_PATH -c $CP_RUN_AS --start --background --pidfile $CP_PID_FILE --exec $CP_DAEMON -- $CP_DAEMON_OPTS        ;;  *)        N=/etc/init.d/$NAME        echo "Usage: $N {start|stop|restart|force-reload}" >&2        exit 1        ;;esacexit 0

Hit control and o

Hit enter

Hit control and x

This will save the edited file

 Now let’s set couchpotato to start on a MyCloud reboot

chmod 755 /etc/init.d/couchpotato
update-rc.d couchpotato defaults

 Now start the server

/etc/init.d/couchpotato start

 Give the server a minute or 2 to start

Now open a web browser and login to  MyCloud IP:5050

 

 

PS: If any more experienced linux users have suggestions, I’ll be glad to add them.

2 Likes

WD-Fan wrote:

Although it is a very interesting idea, I currently would not dare to install any additional software in MyCloud.

 

 

 

Bricking the device is always a possibility. At the moment I have installed nzbget, transmission, couchpotato, sickbeard, BT sync and webmin and they’re all running great (although I did have 1 problem: clogging up my root partition. But that was probably just a stupid mistake on my side)

Thanks  joskevermeulen, putty also crashed at the same place for me too so I guess you could say your instructions worked perfectly.  CouchPotato is now up and running :smiley:

I’m picking up my My Cloud tonight, was planning to install Transmission and Flexget. Do you guys think Couch Potato is a safer/better option for downloading movies using Transmission on the MyCloud than Flexget? Sorry if this is a bit off topic.

Hi,

I followed the guide to the piece, but can’t access the console via wdmycloud IP:5050.

The browser tries to access something, but nothing really comes up.


WDMyCloud:/# /etc/init.d/couchpotato start  
/etc/default/couchpotato not found using default settings.  
Starting CouchPotato

netstat -a|grep 5050 doesn’t give any reply either.

ps -e also doesn’t seem to show any process running.

Any idea what to look at?

joskevermeulen How did you resolve the clogged root partition? I’m at 100% capacity on root with just transmission + flexget and not sure what the cause is or what I can do to free up some space

jconn wrote:

joskevermeulen How did you resolve the clogged root partition? I’m at 100% capacity on root with just transmission + flexget and not sure what the cause is or what I can do to free up some space

Well I followed TonyPh12345’s advice in post 10 of this  thread. After comparing folder sizes I came to the conclusion that were was a 1GB download folder in my root folder. I deleted it and was back at 40% capactiy. 

In my case the problem was in my nzbget settings: I had put a " ~"  in front of my download path which caused the download folder to be created in my root partition

 error :the certificate of github.com’ is not trusted.

??

karuso01 wrote:

 error :the certificate of github.com’ is not trusted.

 

??

 

That’s strange, it’s working for me…

Then use the following line instead:

wget --no-check-certificate http://github.com/RuudBurger/CouchPotatoServer/tarball/master

I shall try this now.

Currently have Sabznbd, sickbeard and tranmission. Bricking the device is only too easy. I managed it 1 week after having it. Thankfully you can restore it by taking the drive out the shell and using linux. Was a scary half a day though when all it would do was flash white.

thanks for the guide!!! It works!! My putty froze as well…

Hi,

Just to say when putty freezes it’s because you’re starting the couchpotato program and not running it in the background. This means that your terminal wont drop you back to the prompt as it’s waiting to display messages from couchpotato and probably the developers didnt add command line messages to display.

In order to stop couchpotato once you started it you can select CTRL+Z at the same time. This will stop whatever program is running in the foreground (in this case couchpotato) and allow you to carry on in the terminal.

Morice wrote:

Hi,

 

Just to say when putty freezes it’s because you’re starting the couchpotato program and not running it in the background. This means that your terminal wont drop you back to the prompt as it’s waiting to display messages from couchpotato and probably the developers didnt add command line messages to display.

In order to stop couchpotato once you started it you can select CTRL+Z at the same time. This will stop whatever program is running in the foreground (in this case couchpotato) and allow you to carry on in the terminal.

 

 

Thanks! That always kept bugging me…

Can I execute the program straight away in the background?

yes you can run a program in the background by appending a space and then the & sign at the end of the line when you start the program. So on the line where you start couchpotato you should do:

/usr/bin/python2.7 /usr/share/CouchPotato/CouchPotato.py &

Is there anyway to run CouchPotato on the new firmware? Thank you!

Probably as couch potato is basically all python, and python is already installed.

It does require additional libraries which attempt to compile/build native lib versions of themselves and they fail. But thats ok as as they use the .py version which albeit slower, work just fine.

Is there a way to completely remove couch potato?

It worked fine but then auto updated itself and now I cannot get it to run. I’ve tried removing the .couchpotato directory and any other related files and then reinstalling but it still will not load anymore.

To remove the initial files use:

update-rc.d -f couchpotato remove

rm -rf /usr/share/CouchPotato

rm -f /etc/init.d/couchpotato

I’m not using couchpotato anymore, so I can’t search for extra folders that might have been created afterwards. But to search for every file and folder for couchpotato use

find / -iname \*couchpotato\*

 Then delete everything you find, if any.

1 Like

cheers.

Dunno if you still know but I cannot open anything couchpotato snatches. I have permissions set at 0777 for both couchpotato and sabnzb. sab is downloading it sucessfully and the couchpotato is moving it to the set folder but I am unable to open the files unless I manaully ssh in as root and give the file 0777 permissons

That is most likely an issue with sabnzb. Perform a test by manually adding a nzb to sabnzb, so without using couchpotato at all.

If you still have permission errors, then you know sabnzb is to blame. Otherwise couchpotato is the culprit.