How to install Couchpotato on Ubuntu 20.04 LTS Linux

Couchpotato is an open-source platform to install on Linux such as Ubuntu and others to download and view various movies and Tv shows via Usenet and torrents. Here we will learn how to install on Ubuntu 20.04 or 18.04 LTS Linux distros.

This streaming platform allows the users to search various entertainment content directly on its web Graphical User Interface without actually visiting the Torrent websites. This saves you from unwanted ads and pop-up we usually see on Torrent related websites.

Install CouchPotato Server on Ubuntu 20.04 LTS

The below-given steps will also be the same for previous Ubuntu versions such as 18.04 LTS and even on Debian, Linux Mint, Kali, and other similar Linux distros.

1. Install Python 2.7 and Git

Before setting up CouchPotato on Ubuntu or Debian, let’s first download few dependencies required by this open-source platform to get installed properly on the system. Therefore, first, we install Python and Git.

sudo apt-add-repository universe
sudo apt update
sudo apt install python2-minimal
sudo apt install git

Note: Although there is no need to install Python3 on Ubuntu because it would already be there, however, Ubuntu minimal servers would not have it. Moreover, in our test CouchPaotato didn’t work on Python3, thus it needs Python 2.7 which is not there on Ubuntu 20.04. Thus, that’s we installed using the above command.

Set Python 2.7 as default one:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

Check version:

python -V

If you use Python3 for this too, you will get this error:

Traceback (most recent call last):
File "CouchPotato.py", line 20, in <module>
from couchpotato.environment import Env
File "/opt/couch/CouchPotatoServer/couchpotato/__init__.py", line 5, in <module>
from couchpotato.api import api_docs, api_docs_missing, api
File "/opt/couch/CouchPotatoServer/couchpotato/api.py", line 8, in <module>
from couchpotato.core.helpers.request import getParams
File "/opt/couch/CouchPotatoServer/couchpotato/core/helpers/request.py", line 1, in <module>
from urllib import unquote
ImportError: cannot import name 'unquote' from 'urllib' (/usr/lib/python3.8/urllib/__init__.py)

 

2. Switch to opt directory

To copy its installation script from Github that will hold all the files required by the CoucPotato to run properly, we use /opt directory.

cd /opt

 

3. Clone CouchPotato Git Repository

Now, we will copy all files available on the GitHub repository of CouhPotato to set it up on our system. To do that run the following command with sudo rights:

sudo git clone https://github.com/RuudBurger/CouchPotatoServer.git ./couchpotato

Check out all files and enter into the server folder:

ls

 

4.  Make CouchPotato run with Ubuntu boot

Again get back to the Terminal to make sure CouchPotato runs automatically with the system boot, copy the Ubuntu service script present inside init folder of CouchPotato to init.d folder of the system.

Note:  While copying we have changed its name from ubuntu to couchpotato.

cd couchpotato
sudo cp ./init/ubuntu /etc/init.d/couchpotato

 

5.  Use Chmod and make service executable

We already have copied the service script of this platform to our init.d folder of the system, now it’s time to make it executable.

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

 

6. Create CouchPotato Configuration file

Let’s create a configuration file that holds the username, home directory, and data directory. Here we are using nano editor, however, you can use VIM or any other as well.

sudo nano /etc/default/couchpotato

Add the following line in the file:

CP_USER=username
CP_HOME=/opt/couchpotato/CouchPotatoServer
CP_DATA=/home/username/couchpotato

Note: Replace the username with your system user.

Once done, save the file by pressing Ctrl+X, then type Y, and hit the Enter key.

 

7.  Add it to Defaults

After creating the service, we need to add it to the defaults option, update-rc.d will make a link to start the service at runlevels.

sudo update-rc.d couchpotato defaults

 

7. Enable and Start CouchPotato Service

Finally, enable the service and start it

sudo systemctl start couchpotato

sudo systemctl enable couchpotato

8. Run it and create a user

Now,  open your browser. If you are using a Ubuntu server with a command-line interface then open the browser on some other PC and type the IP-address of the server where you have installed CouchPotato server along with port 5050:

http://localhost:5050
or 
http://ip-adress:5050

Note: Replace the IP-address with the system where you have installed the Couchpotato.

Create USER 

Create Couchpotato USer and password

You can also change to save the torrent files.

Set download directory

Once you are down with all setup, scroll to the end and hit the button “I am ready“.

9. Login

Use the Username and Password you have created with CouchPotato and hit the login button

Login

CouchPotato Server installed on Ubuntu 20.04 LTS

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.