Creating and configuring the FlexGet config file on Ubuntu

For details on how to install FlexGet see the How to install FlexGet on Ubuntu guide.

Once we have installed FlexGet we now need to create and configure the FlexGet configuration file. The configuration file is where we’ll store all the instructions for FlexGet. ie. What to download and from where.

A note about the storing of configuration files

If you’re following my advice about storing configuration files separately then issue the following two commands in a Putty session:

sudo touch /media/WD40EFRX/RAIDMain/MyScripts/config.yml

sudo ln -s /media/WD40EFRX/RAIDMain/MyScripts/config.yml /var/lib/deluge/.flexget/config.yml

obviously substituting /media/WD40EFRX/RAIDMain/MyScripts with the location of your script files.

Now type the following command to create/open the file:

sudo -u deluge vim /var/lib/deluge/.flexget/config.yml

Enter the configuration parameters as required. See the FlexGet website for configuration examples.

I’ve included a working example to allow you to test the process is working correctly: Sample config.yml file and explained what the various lines do on this page.

Running FlexGet as the “deluge” user

Firstly switch the working folder:

cd /

To run the FlexGet script we’ve just created type the following:

sudo -H -u deluge flexget execute

Testing your FlexGet config file

You can run through the FlexGet script in “test mode” to execute all parts of the script by specifying the –test parameter as follows:

sudo -H -u deluge flexget --test execute

Displaying verbose output

The -v parameter can be used to display verbose output from the FlexGet script. This can be particularly useful when the feeds are not quite working as you would expect:

sudo -H -u deluge flexget execute -v

You can additionally run the above commands in combination. So, to test the script whilst displaying verbose output you would issue the following command:

sudo -H -u deluge flexget --test execute -v

Checking configuration syntax

When you have made changes to the FlexGet config file you can check the syntax by specifying the –check parameter as follows:

sudo -H -u deluge flexget check

How to wipe the FlexGet database and start over

FlexGet keeps a record of what files it has and has not downloaded in an SQL database. If you ever want to wipe everything and start over then issue the following command:

sudo -u deluge rm /var/lib/deluge/.flexget/db-config.sqlite