How to install CouchPotato and SickChill on Raspberry Pi

Good morning , in settings CouchPotato , General tab (indicating "Show Advanced Settings " ) under the option "Folder CHMOD " where you can indicate that permissions to create folders ( also is "File CHMOD " that applies is shown to file permissions ) . You tried to change this setting ?, I think default is 0755 .

2 Likes

Yes! Thank you very much. I think this should be work.

thanks for the great scripts hopefully you will keep it updated, is there something like sickrage for music?

Youre welcome :slightly_smiling: yes, it is. The program name is Headphones. You can find guides with google, but startup script must be created with systemctl otherwise won’t start at reboot.

I created an account just to thank you for this guide. :grinning: I got my media centre up and running with ease. This is now the go to guide to my friends too! :sunglasses:

1 Like

You’re welcome and thank you for nice words. I’m glad that it was useful and easy :smile:

can you do a guide for Headphones as well?:slight_smile: then we get a complete HTCP :stuck_out_tongue:

My personal notes
Headphones
Install Headphones Raspberry Pi for Usenet Torrent Music •

sudo git clone https://github.com/rembo10/headphones.git /opt/headphones

sudo chown -R osmc:osmc /opt/headphones
test
python /opt/headphones/Headphones.py
CTRL+Z

edit config.py
'HTTP_HOST': (str, 'General', 'localhost'),
to
    'HTTP_HOST': (str, 'General', '0.0.0.0'),
ip:8181



sudo nano /etc/default/headphones
HP_USER=osmc
HP_HOME=/opt/headphones
HP_PORT=8181

save
sudo cp /opt/headphones/init-scripts/init.ubuntu /etc/init.d/headphones
sudo chmod +x /etc/init.d/headphones
sudo update-rc.d headphones defaults
sudo service headphones start

yes i seen that guide before but i’m having some trouble
20-Jan-2016 19:49:27 - INFO :: MainThread : Checking to see if the database has all tables…
20-Jan-2016 19:49:27 - INFO :: MainThread : Retrieving latest version information from GitHub
20-Jan-2016 19:49:33 - ERROR :: MainThread : Unable to connect to remote host. Check if the remote host is up and running.
20-Jan-2016 19:49:33 - WARNING :: MainThread : Could not get the latest version from GitHub. Are you running a local development version?
20-Jan-2016 19:49:33 - INFO :: MainThread : Starting Headphones web server on http://localhost:8181/
20-Jan-2016 19:49:33 - INFO :: MainThread : Scheduled background task: Search for Wanted
20-Jan-2016 19:49:33 - INFO :: MainThread : Scheduled background task: Download Scan
20-Jan-2016 19:49:33 - INFO :: MainThread : Scheduled background task: Library Scan
20-Jan-2016 19:49:33 - INFO :: MainThread : Scheduled background task: MusicBrainz Update
20-Jan-2016 19:49:33 - INFO :: MainThread : Scheduled background task: Check GitHub for updates
20-Jan-2016 19:49:33 - INFO :: MainThread : Scheduled background task: Torrent removal check

and it gets stuck there, when i check with my ip:8181 theres nothing, connexion times out

Did you do:
edit config.py

osmc@homershtcp:~$ edit config.py
Error: no “edit” mailcap rules found for type “text/x-python”

Sorry my bad (quick notes to self) :slightly_smiling:
edit = of course edit that file, not a command :slightly_smiling:

Here is my config.py located

sudo nano /opt/headphones/headphones/config.py

hehe yea i figured afterwards, yet when i do start service , going to the browser doesnt give me anything…should i python /opt/headphones/Headphones.py after that?

I just used a isntall without headphones, doing these steps it works

Copy from git & set owner
sudo git clone GitHub - rembo10/headphones: Automatic music downloader for SABnzbd /opt/headphones
sudo chown -R osmc:osmc /opt/headphones

test:
python /opt/headphones/Headphones.py
stop with:
CTRL+Z

sudo nano /opt/headphones/headphones/config.py
change
‘HTTP_HOST’: (str, ‘General’, ‘localhost’),
to
‘HTTP_HOST’: (str, ‘General’, ‘0.0.0.0’),

save:
CTRL+X
Y
ENTER

Create file & put some lines:
sudo nano /etc/default/headphones
HP_USER=osmc
HP_HOME=/opt/headphones
HP_PORT=8181

save:
CTRL+X
Y
ENTER

sudo cp /opt/headphones/init-scripts/init.ubuntu /etc/init.d/headphones

sudo chmod +x /etc/init.d/headphones

sudo update-rc.d headphones defaults

sudo service headphones start

Open a browser:
http:\\osmc:8181

dunno i may need to start from scratch, how can i purge this whole headphones setup?

hej, you should try to download new version of osmc easyscripts :wink:

1 Like

I have some questions and small things I noticed:

  • In the sickrage howto you mixed sysvinit and systemd:

→ sudo systemctl stop sickrage

  • Concerning ownership and permissions:

Now this is still a difficult issue for me but I guess I understood the basics.
Setting everything up myself on my current system, I created a new group called dlgrp and added all important users to it. You take osmc, ok. I think kodi also should be member of group osmc because there may be files created that aren’t readable for others (i.ex. kodi user). Btw.: is kodi service called mediacenter on osmc? Can someone confirm that? So are there also the user mediacenter and group?

I also changed the program’s .serivce file:
…
Group=osmc
…
This way, if a program creates a folder or a file it’s always created with osmc as group.
Moving on to the file and folder permissions: I think it’s already stated somewhere in the comments of this thread that you can change the permissions of the files and folders created by sickrage, couchpotato in their settings somewhere (I don’t recall exact location, I think in sickrage it’s in the general settings tab) I would suggest to set them so created files and folders are read and writeable to all members of group osmc. I think right number is 775…

  • Installing unrar:

Can you explain, why you took a unrar package for bananapi? At least the weburl suggests so:

sudo wget Download unrar_5.2.6-1_armhf.deb (Banana Pi)

Doesn’t just sudo apt-get install unrar do the trick? - The reason I ask is because it would be nice to keep your howto and scripts as universal as possible. Brings me to the next small thing: At the end of installation script echo echo “webgui raspberry_ip:8081” maybe write your_ip:8081.

Ok, these are just suggestions -of course. Based on my personal experience being a linux noob. So if especially the suggestions about permissions and ownership are questionable or simply wrong I ask anyone reading this and being more experienced than me to correct me.
@nenad maybe you could change your howto and scripts accordingly.

PS: If you would add installation and configuration of nzbget and nzbtomedia this would be the ultimate script of all time :smile:

Did you read the topic of this tutorial? Thank you for noticing. I changed name of Topic, beacuse now should everybody know it’s for Raspberry Pi. I writed for raspberry pi and not for other devices, beacuse I’m not sure if will works there. This answers your two questons :wink: I used this unrar, beacuse I alredy tested it and I never had problems. I should say, that I’m not expert at linux. So I am like you, a noob :smile: about nzbtomedia and nzbget. I don’t use them, so I won’t write scripts for those programs. And for sudo service sickrage stop, I use it, beacuse it works too. Why should now strictly use only sudo systemctl stop sickrage? About groups, I wouldn’t recommend to play with permissions and groups. To find about how to check your groups you could use google and find that if you type groups, you see all groups that alredy exists. It should only take you a 15sec to find that command. So why you didn’t use google for this? :smile: One thing about groups, do you know that one user can be added to more than one groups? So why should you create dlgrp? You can just add it to second or third group. That is for example one user in three groups and not only in one. Or you can create dlgroup and add all of users to this group. About creating and adding permissions to group, please use google :slightly_smiling:

PS: if someone write scripts for nzbget and nzbtomedia, I would happily add them to this collections of my scripts :slightly_smiling:

Sorry, I didn’t state that I’m currently waiting for the vero2. My i.mx6 device isn’t supported by osmc so I can’t run it on this device and see myself.
True, it’s stated in the first line of the post that its for raspberry pi, but not in the title of the tread - my bad.
Ok, maybe you didn’t encounter these permission/ownership problems because you don’t use nzbget and nzbtomedia. Nzbget is a download manager and nzbtomedia a script for postprocessing with sickrage,couchpotato, etc.
For example: nzbget dl’s a file with nzbget:nzbget. Nzbtomedia sends request to sickrage for postprocessing. Now sickrage can’t post process it because group of dl file is nzbget. And giving write permissions to all others isn’t a good idea…as i already learned =)

Maybe you can try do add nzbget to other group and for the sickrage the same. I will give you example for couchpotato:
sudo usermod -a -G osmc couchpotato

In my scenario osmc group has privileges like root. So if I don’t give couchpotato in that group, there will be problems with permissions for write and read. And with that command I give user couchpotato the same permission that has user osmc.

So for your case maybe you should find which groups you have and which one is like for my case is osmc. You can check with command: groups

Or look at some instrucitons here:

Maybe you can try this…
In your scenario, maybe you should choose to run as nzbget and not as sickrage. Maybe that will fix permissions becasue sickrage and nzbget runs with same user and same group.
I my case I choosed couchpotato in startup file:
sudo nano /etc/systemd/system/couchpotato.service

And this looks like:

[Unit]
Description=CouchPotato application instance
After=network.target

[Service]
ExecStart=/opt/CouchPotatoServer/CouchPotato.py --daemon
GuessMainPID=no
Type=forking
User=couchpotato
Group=couchpotato

[Install]
WantedBy=multi-user.target

1 Like