Skip to content

Instantly share code, notes, and snippets.

@tho
Last active April 24, 2022 14:35
Show Gist options
  • Save tho/b24cdc1edfec60844eb2de493f030483 to your computer and use it in GitHub Desktop.
Save tho/b24cdc1edfec60844eb2de493f030483 to your computer and use it in GitHub Desktop.
Deploy Miniflux on Heroku

Deploy Miniflux on Heroku

Miniflux is a minimalist and opinionated feed reader.

Prerequisites

Install

  1. Clone Miniflux 2

    git clone https://github.com/miniflux/v2.git
  2. Check out the latest version

    git checkout -b latest "$(git describe --tags --abbrev=0)"
  3. Create an Heroku application with the PostgreSQL addon installed

    heroku apps:create --addons "heroku-postgresql:hobby-dev" [APP-NAME]

    APP-NAME is optional. If it is left out, a random name will be generated.

  4. Configure Miniflux via environment variables

    heroku config:set HTTPS=1
    heroku config:set RUN_MIGRATIONS=1
    heroku config:set CLEANUP_FREQUENCY_HOURS=1
    heroku config:set FETCH_YOUTUBE_WATCH_TIME=1
  5. Deploy the latest version of Miniflux to Heroku

    git push heroku latest:main
  6. Delete the local branch

    git checkout - && git branch --delete latest
  7. Create the first user from within an one-off dyno

    $ heroku run bash
    Running bash on ⬢ [APP-NAME]... up, run.9371 (Free)
    ~ $ miniflux.app --create-admin
    Enter Username: admin
    Enter Password:
    ~ $ exit
  8. Open Miniflux in your web browser

    heroku open

    Or manually open https://APP-NAME.herokuapp.com.

  9. Login with the admin credentials and create regular user(s)

    Settings > Users > Add user

Upgrade

https://miniflux.app/docs/upgrade.html

  1. Disconnect all users by flushing all sessions

    heroku run miniflux.app -flush-sessions
  2. Backup your database

    heroku pg:backups:capture
  3. Update the local Miniflux repository

    git pull
  4. Check out the latest version

    git checkout -b latest "$(git describe --tags --abbrev=0)"
  5. Deploy the latest version of Miniflux to Heroku

    git push heroku latest:main
  6. Delete the local branch

    git checkout - && git branch --delete latest

Useful commands

  • Display the configuration of the application

    heroku config
  • Show the deployed version or rather commit of Miniflux

    heroku releases | grep Deploy | head -1
  • Display the recent log output of the application

    heroku logs [--tail]
  • Show PG database information

    heroku pg:info
  • Re-add heroku Git remote

    heroku git:remote --app [APP-NAME]
  • Print miniflux's parsed configuration values

    heroku run miniflux.app -config-dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment