Couch Potato Server – Linux – Debian – Ubuntu.

Couch Potato Server.

“Download movies automatically, easily and in the best quality as soon as they are available”



1. Install some needed dependencies..

sudo apt-get install python-dev git-core python-virtualenv php5-sqlite python


2. Create User and Group for Couch Potato Server – couchpotato.

Create user couchpotato:

  • home – /opt/couchpotato,
  • no password,
  • no login.
sudo useradd -d /opt/couchpotato -m couchpotato
sudo adduser www-data couchpotato


3. Download and install Couch Potato Server from GIT.

Download and install newer version of Couch Potato Server to /opt folder.

sudo git clone /opt/couchpotato
sudo mkdir /opt/couchpotato/logs
sudo chown couchpotato:couchpotato /opt/couchpotato -R



4. Autostart init script.

sudo cp /opt/couchpotato/init/ubuntu /etc/init.d/couchpotato
sudo cp /opt/couchpotato/init/ubuntu.default /etc/default/couchpotato
sudo chmod +x /etc/init.d/couchpotato
sudo update-rc.d couchpotato defaults


5. Edit startup config file.

sudo nano /etc/default/couchpotato

Add credentials:



Usage: /etc/init.d/couchpotato {start|stop|restart|force-reload|status}


6. Configure Apache2 server as Proxy with SSL.

Install Apache2 server using this tutorial:

Create 2 virtualhosts:

Configure virtualhost to listen on port 80 and redirect to port 443 (SSL).

Create config file /etc/apache2/sites-available/couchpotato and add the following records ect.

sudo nano /etc/apache2/sites-available/couchpotato
# - PORT 80
<VirtualHost *:80>
ServerAlias *
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
RewriteCond %{SERVER_PORT} !^443$
RedirectMatch ^/$


# - PORT 443
<VirtualHost *:443>
ServerAlias *
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log common
SSLEngine On 
SSLCertificateKeyFile ssl/apache.pem 
SSLCertificateFile ssl/apache.pem
<Proxy *>
Order deny,allow
Allow from all
ProxyRequests Off
ProxyPass / http://localhost:5050/
ProxyPassReverse / http://couchpotato/


sudo ln -s /etc/apache2/sites-available/couchpotato /etc/apache2/sites-enabled/couchpotato
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo /etc/init.d/apache2 restart


7. Acces to Couch Potato Server (SSL).