Install FlexGet on Arch Linux

Install FlexGet on Arch Linux

FlexGet is a download manager similar to NZBGet or uTorrent Server except that it is Command Line only and has no Graphical interface. It can handle torrents as well as nzb’s and can be configured to download content from many sources including rss. Since it has no graphical interface it can be quite complicated to configure. On the other hand it is not limited to downloading specific media types like movies so it is very powerful in how it can be configured. If couchpotato, sonarr and headphones just isn’t enough, Flexget can fill in the gaps.

 

Setup Credentials

Create a system account and group.

sudo useradd -r -s /bin/false flexget

 

Optionally add the user to secondary groups.

sudo usermod -a -G nzbget,utserver flexget

 

Install FlexGet

FlexGet can be installed with flexget or flexget-git package from AUR. It requires a large number of pre-requisites and 2 of those are broken and currently not maintained. As an alternative FlexGet can be installed with python package manager.

 

Install python 2.

sudo pacman -S python2

 

Install python package packager.

sudo pacman -S python2-pip

 

Install the package with pip.

sudo pip2 install flexget

 

Configure FlexGet

Create the configuration directory.

sudo mkdir /var/lib/flexget

 

Create the configuration file.

sudo nano/var/lib/flexget/config.yml

 

Copy a basic test configuration and save the file.

tasks:
  test task:
    rss: http://dominicm.com/wp-rss.php/

Refer to flexget.com for information on how to configure FlexGet.

 

Set ownership on the configuration directory.

sudo chown flexget:flexget -R /var/lib/flexget

 

Create the download directory.

sudo mkdir /mnt/downloads/flexget

 

Set the ownership on the download directory.

sudo chown flexget:flexget /mnt/downloads/flexget

 

Set the permissions on the download directory.

sudo chmod 775 /mnt/downloads/flexget

 

Test the configuration file.

sudo flexget -c /var/lib/flexget/config.yml --test execute

 

Run FlexGet

Create a new systemd service.

sudo nano /usr/lib/systemd/system/flexget.service

 

Copy the script and save the systemd service.

[Unit]
Description=Flexget Daemon
After=network.target

[Service]
Type=simple
User=flexget
Group=flexget
UMask=000
WorkingDirectory=/var/lib/flexget
ExecStart=/usr/bin/flexget daemon start
ExecStop=/usr/bin/flexget daemon stop
ExecReload=/usr/bin/flexget daemon reload

[Install]
WantedBy=multi-user.target

 

Start the systemd service.

sudo systemctl start flexget

 

Enable systemd service to run on boot.

sudo systemctl enable flexget