How to Install CouchPotato on Ubuntu 16.04/17.04 with Deluge
This tutorial will show you how to install CouchPotato on Ubuntu 16.04/17.04. CouchPotato is a free and open-source (GPL3) tool to download upcoming movies automatically. It periodically searches for movies on Usenet and torrent sites, and once they are available, it automatically downloads them with your chosen Usenet client or torrent client. We will use the Deluge torrent client as an example. I assume you followed the previous Deluge tutorial.
CouchPotato features:
- An intuitive web interface
- Allows you to choose movie quality
- The ability to rename download movies
- download subtitles
- A browser extension to easily add movies via imdb.com
- Supports many public and private trackers (RARBG, ThePirateBay, SceneTime, TorrentBytes etc.)
- Supports transmission, qBittorrent, rTorrent, Deluge, uTorrent.
- Supports many Usenet indexers and Usenet clients (Sabnzbd, NZBGet)
Now let’s see the installation process.
How to Install CouchPotato on Ubuntu 16.04/17.04 Server and Desktop
First, open up a terminal window and install Python and LXML.
sudo apt install python python-lxml
Then install the latest version of pyOpenSSL.
sudo apt install python-pip sudo pip install --upgrade pyopenssl
Change directory to /var/www/
.
cd /var/www/
Install Git and clone CouchPotato repo on Github.
sudo apt install git-core sudo git clone https://github.com/CouchPotato/CouchPotatoServer.git
Now CouchPotato is downloaded to the directory /var/www/CouchPotatoServer
. To start CouchPotato server, run the following command. The & symbol will make it run in the background, so you can use terminal.
python /var/www/CouchPotatoServer/CouchPotato.py &
If you are installing CouchPotato on a local Ubuntu 16.04 computer, then the setup wizard will automatically open in your browser after running the above command. If it’s installed on an Ubuntu 16.04 server, then you can access the setup wizard via the following URL.
http://your-server-ip:5050/wizard/
In the setup wizard, you can set a username and password to secure the CouchPotato web interface. You also have the option to enable dark theme.
Next, you need to select the download application.
If you want to download movies on Usenet, then you need to select an Usenet client like Sabnzbd. And if you like to download movie from torrent sites, then you need to select a torrent client. In this tutorial, I choose the Deluge torrent client.
By default, Deluge client daemon listens on port 58846, so enter localhost:58846
in the Host field. Then you need to edit the Deluge auth file.
sudo nano /var/lib/deluge/.config/deluge/auth
The default username is localclient
. Number 10 indicates this account is used for administration. We can create a new account for CouchPotato like below. Number 5 indicates this account has read and write access.
couchpotato:password:5
Save and close the file. Then restart deluge daemon.
sudo systemctl restart deluged
Next, enter the new username and password in CouchPotato wizard and specify the downloads directory.
After that, you need to choose your torrent sites or Usenet indexer. Most of these torrent sites are private and require registration, but you can choose public torrent sites like RARBG and ThePirateBay.
Once you fill needed details in the setup wizard, click the big orange button at the bottom. Now you can login with your username and password.
You can now search and add new movie to your wanted list in CouchPotato web interface. Please note that in order for Deluge to automatically download added movies, you need to go to settings and disable black hole.
If it’s enabled, then you will need to set up a watched folder in Deluge for new .torrent files.
It’s also a good idea to go to settings
> Downloaders
and test connection to Deluge.
If you followed the previous Deluge install tutorial, then make sure that deluge
user has read and write permissions on the downloads folder. For example, if the downloads folder is ~/Downloads/
. Then you can run the following command to give read and write permission to deluge
user.
sudo apt install acl sudo setfacl -R -m "u:deluge:rwx" ~/Downloads/
Warning: Your online activity can be easily tracked. Be sure to use VPN when downloading torrents. See how to connect to VPN from Linux command line.
Once everything is set up correctly, you will see movies are being downloaded in Deluge.
To install CouchPotato browser extension, go to settings
> Automation
and click on the Install extension
button.
How to Enable Auto Start
To let CouchPotato automatically start at boot time, we need to copy the systemd service file.
sudo cp /var/www/CouchPotatoServer/init/couchpotato.service /etc/systemd/system/couchpotato.service
Then edit the file.
sudo nano /etc/systemd/system/couchpotato.service
Find the following line:
ExecStart=/var/lib/CouchPotatoServer/CouchPotato.py
Change it to:
ExecStart=/var/www/CouchPotatoServer/CouchPotato.py
Also change the value of User
and Group
from couchpotato to your own username and group like below.
User=linuxbabe Group=linuxbabe
Save and close the file. And enable auto start.
sudo systemctl enable couchpotato.service
That’s it! I hope this tutorial helped you install CouchPotato on Ubuntu 16.04 with Deluge. As always, if you found this post useful, then subscribe to our free newsletter to get new tutorials.