Creating 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 the FlexGet configuration file. The configuration file is where we'll store all the instructions for FlexGet. ie. What to download and from where. So type the following command to create the file and to open it:
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
To run the FlexGet script we've just created type the following:
sudo -H -u deluge flexget
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
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 -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 -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
Run FlexGet as a cron job using Webmin
FlexGet will execute your script each time it runs and pull down any new torrent files it finds. It is therefore desirable to run this script regularly and the best way to do this is via the use of a cron job. I use Webmin to administer my server and creating cron jobs using Webmin is an absolute breeze.
So, launch Webmin then click on System and then Scheduled Cron Jobs. Then click Create a new scheduled cron job at the top of the screen that opens.
Click the button next to the Execute cron job as and choose the "deluge" user.
Type the full path of FlexGet into the Command box. So: /usr/local/bin/flexget
In the When to Execute section select Simple Schedule and choose Hourly from the drop down list.
Then click the Create button.
FlexGet will now check every hour for new torrent files and download them for you. Deluge will then take over and start downloading the actual files themselves for you.
Still stuck? Now what you were looking for? Then head over to the Discussion Forum!