Skip to content

Miniflux

Miniflux is a lightweight RSS reader, developed by Frédéric Guillot. (Who also happens to be the developer of the favorite Open Source Kanban app, Kanboard)

Miniflux Screenshot

I've reviewed Miniflux in detail on my blog, but features (among many) that I appreciate:

  • Compatible with the Fever API, read your feeds through existing mobile and desktop clients (This is the killer feature for me. I hardly ever read RSS on my desktop, I typically read on my iPhone or iPad, using Fiery Feeds or my new squeeze, Unread)
  • Send your bookmarks to Pinboard, Wallabag, Shaarli or Instapaper (I use this to automatically pin my bookmarks for collection on my blog)
  • Feeds can be configured to download a "full" version of the content (rather than an excerpt)
  • Use the Bookmarklet to subscribe to a website directly from any browsers

2.0+ is a bit different

Some things changed when Miniflux 2.0 was released. For one thing, the only supported database is now postgresql (no more SQLite). External themes are gone, as is PHP (in favor of golang). It's been a controversial change, but I'm keen on minimal and single-purpose, so I'm still very happy with the direction of development. The developer has laid out his opinions re the decisions he's made in the course of development.

Miniflux Requirements

Ingredients

Already deployed:

Related:

Preparation

Setup data locations

Create the location for the bind-mount of the application data, so that it's persistent:

mkdir -p /var/data/miniflux/database-dump
mkdir -p /var/data/runtime/miniflux/database

Setup environment

Create /var/data/config/miniflux/miniflux.env something like this:

DATABASE_URL=postgres://miniflux:secret@miniflux-db/miniflux?sslmode=disable
POSTGRES_USER=miniflux
POSTGRES_PASSWORD=secret

# This is necessary for the miniflux to update the db schema, even on an empty DB
RUN_MIGRATIONS=1

# Uncomment this on first run, else leave it commented out after adding your own user account
CREATE_ADMIN=1
ADMIN_USERNAME=admin
ADMIN_PASSWORD=test1234

Create /var/data/config/miniflux/miniflux-backup.env, and populate with the following, so that your database can be backed up to the filesystem, daily:

PGHOST=miniflux-db
PGUSER=miniflux
PGPASSWORD=secret
BACKUP_NUM_KEEP=7
BACKUP_FREQUENCY=1d

The entire application is configured using environment variables, including the initial username. Once you've successfully deployed once, comment out CREATE_ADMIN and the two successive lines.

Miniflux Docker Swarm config

Create a docker swarm config file in docker-compose syntax (v3), something like the example below:

Fast-track with premix! 🚀

I automatically and instantly share (with my sponsors) a private "premix" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a git pull and a docker stack deploy 👍.

🚀 Update: Premix now includes an ansible playbook, so that sponsors can deploy an entire stack + recipes, with a single ansible command! (more here)

version: '3'

services:
  miniflux:
    image: miniflux/miniflux:2.0.7
    env_file: /var/data/config/miniflux/miniflux.env
    volumes:
     - /etc/localtime:/etc/localtime:ro
    networks:
    - internal
    - traefik_public
    deploy:
      labels:
        # traefik common
        - traefik.enable=true
        - traefik.docker.network=traefik_public

        # traefikv1
        - traefik.frontend.rule=Host:miniflux.example.com
        - traefik.port=8080     

        # traefikv2
        - "traefik.http.routers.miniflux.rule=Host(`miniflux.example.com`)"
        - "traefik.http.services.miniflux.loadbalancer.server.port=8080"
        - "traefik.enable=true"

  miniflux-db:
    env_file: /var/data/config/miniflux/miniflux.env
    image: postgres:10.1
    volumes:
      - /var/data/runtime/miniflux/database:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
    networks:
      - internal

  miniflux-db-backup:
    image: postgres:10.1
    env_file: /var/data/config/miniflux/miniflux-backup.env
    volumes:
      - /var/data/miniflux/database-dump:/dump
      - /etc/localtime:/etc/localtime:ro
    entrypoint: |
      bash -c 'bash -s <<EOF
      trap "break;exit" SIGHUP SIGINT SIGTERM
      sleep 2m
      while /bin/true; do
        pg_dump -Fc > /dump/dump_\`date +%d-%m-%Y"_"%H_%M_%S\`.psql
        (ls -t /dump/dump*.psql|head -n $$BACKUP_NUM_KEEP;ls /dump/dump*.psql)|sort|uniq -u|xargs rm -- {}
        sleep $$BACKUP_FREQUENCY
      done
      EOF'
    networks:
    - internal

networks:
  traefik_public:
    external: true
  internal:
    driver: overlay
    ipam:
      config:
        - subnet: 172.16.22.0/24

Serving

Launch Miniflux stack

Launch the Miniflux stack by running docker stack deploy miniflux -c <path -to-docker-compose.yml>

Log into your new instance at https://YOUR-FQDN, using the credentials you setup in the environment flie. After this, change your user/password as you see fit, and comment out the CREATE_ADMIN line in the env file (if you don't, then an additional admin will be created the next time you deploy)

Chef's notes 📓


  1. Find the bookmarklet under the Settings -> Integration page. 

Tip your waiter (sponsor) 👏

Did you receive excellent service? Want to compliment the chef? (..and support development of current and future recipes!) Sponsor me on Github / Ko-Fi / Patreon, or see the contribute page for more (free or paid) ways to say thank you! 👏

Employ your chef (engage) 🤝

Is this too much of a geeky PITA? Do you just want results, stat? I do this for a living - I'm a full-time Kubernetes contractor, providing consulting and engineering expertise to businesses needing short-term, short-notice support in the cloud-native space, including AWS/Azure/GKE, Kubernetes, CI/CD and automation.

Learn more about working with me here.

Flirt with waiter (subscribe) 💌

Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the RSS feed, or leave your email address below, and we'll keep you updated.

Your comments? 💬