So I got me another Raspberry Pi 2, and I’m working on building my main media center on it. Of, course, most of the stuff needed for a media center on a Raspberry Pi is pretty straight forward today, and there are lots of guides on the net which will help building a perfect media center. However, one thing I did not find, and it is installing CouchPotato server on an official build of OpenELEC. This is mainly because OpenELEC is specifically optimized distribution of Linux for media centers. Anyways, after some playing with OpenELEC through SSH (can be enabled in the system settings), I’ve managed to run the latest CouchPotato as a service using systemd. Below are the steps to accomplish the above:
git clone https://github.com/RuudBurger/CouchPotatoServer.git
NOTE: Default password for root is ‘openelec’, pretty hard to change it, but a lot of guides on the web are available on this topic. I use the private key authentication method (no password allowed).
cd ~/CouchPotatoServer
scp -r ./ mich@media-rpi:/storage/CouchPotatoServer
cd ~/.config/system.d/
vi couchpotato.service
[Unit]
Description=CouchPotato application instance
Requires=network-online.service
#After=storage-downloads.mount storage-movies.mount
[Service]
Type=idle
ExecStart=/bin/sh -c "/usr/bin/python /storage/CouchPotatoServer/CouchPotato.py --daemon"
GuessMainPID=no
Type=forking
TimeoutStopSec=1
Restart=always
RestartSec=2
StartLimitInterval=0
[Install]
WantedBy=kodi.target
NOTE: The after= line is optional, I use samba shares that are mounted using services, and I need them mounted before CouchPotato as my library is there.
systemctl enable couchpotato.service
systemctl start couchpotato.service
That’s it! Till next time!