Skip to content

Install SickGear [7] Debian

SickGear edited this page Feb 25, 2023 · 2 revisions

SickGear Wiki: Home | Reporting Issues | Frequently Answered Questions | > Install Guides <

Debian : SickGear Install Guide


Method 1: Install

Confirmed with Jessie.

Clone the repository to where you want to install it, in this case /opt/sickgear
Run the commands with the user you wish to run SickGear as.
In this case it's going to be user1.

sudo mkdir -p /opt/sickgear/data
sudo chown user1 -R /opt/sickgear
git clone https://github.com/SickGear/SickGear.git /opt/sickgear/app
Expand (To build Python using Pyenv)

First, follow suggested Pyenv build environment

then...

git clone https://github.com/yyuu/pyenv /opt/sickgear/.pyenv

Install the desired Python version, (for example, 3.11.3 from pyenv v2.3.18)

PYENV_ROOT=/opt/sickgear/.pyenv /opt/sickgear/.pyenv/bin/pyenv install 3.11.3

Note: a systemd file must be edited with the path to the pyenv Python
^^^^^

Install SickGear dependencies

cd /opt/sickgear/app
/opt/sickgear/.pyenv/versions/3.11.3/bin/pip install --upgrade pip  
/opt/sickgear/.pyenv/versions/3.11.3/bin/pip install --upgrade pyopenssl ndg-httpsclient virtualenv lxml  
/opt/sickgear/.pyenv/versions/3.11.3/bin/pip install -r requirements.txt  
/opt/sickgear/.pyenv/versions/3.11.3/bin/pip install -r recommended.txt  

To start SickGear at boot, here is the systemd approach...

sudo cp /opt/sickgear/app/init-scripts/init.systemd /etc/systemd/system/[email protected]

Edit the copied /etc/systemd/system/[email protected] file

  • replace user=sickgear and group=sickgear to fit your set up (e.g. user1)
  • replace the entire line ExecStart=/usr/bin/python with the following pyenv line...
ExecStart=/opt/sickgear/.pyenv/versions/3.11.3/bin/python /opt/sickgear/app/sickgear.py --systemd --datadir=/opt/sickgear/data --port=%I

(Note: the <path_to>/python3 must be explicitly specified to run SickGear)

Enable the unit file and define the port that you want sg to run with...

sudo systemctl enable sickgear@8081

Expect output similar to...

Created symlink from /etc/systemd/system/multi-user.target.wants/[email protected] to /etc/systemd/system/[email protected].

Let's go...

sudo systemctl daemon-reload
sudo systemctl start sickgear@8081
sudo systemctl status sickgear@8081

Alternatively, to start SickGear without systemd...

/opt/sickgear/.pyenv/versions/3.11.3/bin/python /opt/sickgear/app/sickgear.py --datadir=/opt/sickgear/data

(Note: the <path_to>/python3 must be explicitly specified to run SickGear)

With either approach... you can access SickGear at http://localhost:8081 (http://server:8081)


Method 1: Install using Snap

Available for Debian 9 (Stretch), otherwise Install manually

  1. Install Snap...

    • sudo apt update
    • sudo apt install snapd
  2. Install and run SickGear (you must sudo)...

    • sudo snap install sickgear
    • sudo /snap/bin/sickgear (use which sickgear to find path, e.g. /snap/bin/sickgear)

SickGear will exit with a data directory write permission fail message if you do not use sudo

All done, you can access SickGear at http://localhost:8081


Clone this wiki locally