FreshRSS: A free, self-hostable news feed aggregator

Docker FreshRSS: A free, self-hostable news feed aggregator

Why use RSS news feeds? By selecting the RSS feeds you subscribe to, you control
  • who puts items in your timeline
  • the order in which you view them
  • no adverts inserted by the service provider
By using a RSS aggregator service you can access your feeds from multiple devices and keep them synchronised: added and deleted feeds; read/unread status; favourite articles.

There are a number of online RSS aggregation services that are either free or paid. Some try to curate the feeds and presentation to you, while others allow you greater control. Then there's accessing them using mobile and desktop apps (news readers), and web browser portals.

While I have happily used the FeedBin service for many years, and it's still very good, it is a paid service: the new user price is higher now than when I started, so what would I suggest if a family member wanted to start using RSS? That's why I'm testing FreshRSS (https://freshrss.org).

Before we begin

We're going to setup FreshRSS using DSM's Docker package that is available on DS 'plus' models. So first you need to install Docker from Package Center, if it's not already running.

The next and probably most important decision to make is how the FreshRSS user data will be stored. This data will be held in a database, either: SQLite; PostgreSQL; MySQL. I have tested the first two approaches and if you opt for SQLite then you can skip the part of the tutorial on adding a PostgreSQL container.

Groundwork

We want to store all generated user data and databases on NAS storage, not within the container. This will make updating a container much easier when that time comes. For now we will just create the folders in DSM, later we will assign them to the containers.

I have a DSM shared folder called 'system' that I used for non-user related activities and I'm going to used that here (you can select your own shared folder and follow the instructions).
  1. Using File Station navigate to the 'system' shared folder.
  2. Add a new folder to hold all Docker containers information: mine is called 'docker'.
  3. Within 'docker' create folders for each container:
    • For FreshRSS create 'freshrss' and with it add folders:
      • data
      • extensions
    • For PostgreSQL create 'postgresql'.
That's the DSM setup complete, now proceed to add the PostgreSQL container first (if using it) and then FreshRSS itself.

Add a PostgreSQL container to Docker

Within Docker's Registry tab, search for 'postgresql' and from the results download the official container which is called 'postgres'.

From Docker's Image tab, select the 'postgres' image and click Launch. Next configure the new container instance (if not mentioned then leave a setting as-is):
  • Container Name: give it a useful name, e.g. 'PostgreSQL_RSS'.
  • Click Advanced Settings and Enable auto-restart, then...
  • Volume tab, add folder:
FolderMount path
system > docker > postgresql/var/lib/postgresql/data/pgdata
  • Environment tab, add or update these variables:
PGDATA/var/lib/postgresql/data/pgdata
POSTGRES_DBleave blank the database will be created by FreshRSS
POSTGRES_USERselect a username, e.g. rssdbadmin
POSTGRES_PASSWORDthe password for the user
  • Click Apply to save the Advanced Settings
  • Click Next to progress to the summary view
  • Click Apply to create the new container
The new PostgreSQL container should now be running.

Add the FreshRSS container to Docker

Within Docker's Registry tab, search for 'freshrss' and from the results download the container which is called 'linuxserver/freshrss'.

From Docker's Image tab, select the 'linuxserver/freshrss' image and click Launch. Next configure the new container instance (if not mentioned then leave a setting as-is):
  • Container Name: give it a useful name, e.g. 'FreshRSS'.
  • Click Advanced Settings and Enable auto-restart, then...
  • Volume tab, add folder:
FolderMount path
system > docker > freshrss > data/config/www/freshrss/data
system > docker > freshrss > extensions/config/www/freshrss/extensions
  • Port Settings tab, change the local ports from auto to fixed numbers: fixing this will help to access FreshRSS after a restart. Notes:
    • Docker assigns ports above 32000 so something like 32080 and 32443 could be used
    • If you don't plan to use HTTP you can keep it as auto or even delete its rule.
  • If using PostgreSQL (otherwise ignore)
    • Links tab, click + and select the PostgreSQL_RSS container. Now assign a name, e.g. 'rss_psql_server', that the FreshRSS container will use to directly access the other container.
  • Environment tab, it's optional but no harm adding the timezone:
TZe.g. Europe/London
  • Click Apply to save the Advanced Settings
  • Click Next to progress to the summary view
  • Click Apply to create the new container
The new FreshRSS container should now be running.

Configuring FreshRSS

Start configuring FreshRSS by browsing to 'https://<your NAS IP>:32443' and following the instructions to select language and it will check the installation.

Next comes the point to select which database to use to hold user data.
  • SQLite: there is no further configuration information needed. The database will be saved in the NAS's freshrss / data folder.
  • PostgreSQL: The database will be saved in the NAS's postgresql folder.
Hostrss_psql_server
Database usernameyour <POSTGRES_USER>
Database passwordyour <POSTGRES_PASSWORD>
Databasee.g. freshrss_db
Table prefixe.g. freshrss_

You now need to add the first user, who will become an admin user.

That's the end of the initial set up so login and do one more step: click the 'cog' Settings icon in the top right of the web interface and select Authentication. Enable 'Allow API Access' and then submit.

You can now add additional users and each user can then enable their own mobile app access by setting an Authentication Token in their Profile settings.

A bit of polish

Accessing FreshRSS using 'https://<your NAS IP>:32443' is ok but you can add a Reverse Proxy rule in DSM's Control Panel within the Application Portal area. There's a Tutorial all about Reverse Proxies so have a look at it.

Once that's set up to direct standard HTTPS port 443 to the NAS's port 32443 you can add the subdomain as a Subject Alternate Name to your DSM certificate. Now you can use 'https://feeds.myDSM.com', or whatever you like, and it will be properly signed as secure.

Using RSS apps

With the Authentication Token added for your user you can access FreshRSS using the APIs, i.e. point the RSS app at a suitable URL.

The Mac and iOS Reeder 4 apps can use either of the built-in API's: greader.php or fever.php.

AccountAPIURL
FreshRSSgreader.phphttps://nas_ip:secure_port
will convert to https://nas_ip:secure_port/api/greader.php/
Readergreader.phphttps://nas_ip:secure_port/api/greader.php/
Feverfever.phphttps://nas_ip:secure_port
will convert to https://nas_ip:secure_port/api/fever.php/
*I think the trailing '/' is necessary when calling the .php API directly.

Note: I found Reeder didn't like HTTPS when there was a certificate mis-match, so the best thing is to set up the reverse proxy and adjust your Let's Encrypt certificate to include the new subdomain.

One more thing (a.k.a. addendum)

I added the NAS's freshrss / extensions folder to the mount points because it's easier to add these using File Station, and they will survive a container upgrade.

In the admin account, go to Extensions settings to see a list of extension files that can be added. Download the ones you want and upload the zip archive to the extensions folder. Within File Station you can unzip the files and they will become instantly available with FreshRSS.

When it comes to updating the containers it's an easy process of: stop the container running; download the latest image (just like you did during the tutorial); select the container and apply the Clear action; restart the container. Make sure to browser to the FreshRSS web page and after setting the language it will find the existing data and ask if you want to use it ... of course you do! That's all it takes to update to a new version.
Related resources
Configuring a reverse proxy.



Latest reviews

Can’t beat the attention to detail in this well-written tutorial. Thank you.
Top