Miniflux

Title: Miniflux
Date: 2022/12/26
Tags: linux
Category: calendar
Author: ThomasTsai
Summary: TT-RSS 替代版

MINGFLUX

Miniflux is a minimalist and opinionated feed reader.

TT-RSS 一直是我 rss 閱讀器首選,可以自己架設再自己的伺服器,十分方便,安全。幾年之後,慢慢出現問題,TT-RSS 之前對 PHP 支援動作太慢,我 DEBIAN 一更新就會出問題。隨後,我就懶得去弄了,直到最近連資料重新init也跑步出來。官方也直接轉換到docker,不再支援 host 安裝的說明與維護,實在是無能為力阿。

只好把 TT-RSS 換掉,,準備用線上版的 rss reader,突然看到 MINIFLUX,也是可以架設再自己的伺服器,看了一下release log 也滿積極的,所幸把rss 匯出成 opml ,再從頭架設 MINIFLUX,rss opml 匯入、閱讀文章也沒有問和問題!

以下安裝步驟

Database Configuration

sudo apt-get install postgresql-13

# Switch to the postgres user
$ sudo su - postgres

# Create a database user for Miniflux
$ createuser -P miniflux
Enter password for new role: ******
Enter it again: ******

# Create a database for miniflux that belongs to our user
$ createdb -O miniflux miniflux

# Create the extension hstore as superuser
$ psql miniflux -c 'create extension hstore'
CREATE EXTENSION

Installing Miniflux

echo "deb [trusted=yes] https://repo.miniflux.app/apt/ /" | sudo tee /etc/apt/sources.list.d/miniflux.list > /dev/null
sudo apt-get update
sudo apt-get install miniflux
EXPORT  DATABASE_URL="postgres://miniflux:xxxxxxxx@localhost/miniflux?sslmode=disable"
miniflux -migrate

update configuration

因為我主機8080被用掉了,所以凱8081

BASE_URL 也是因為我需要用apache2 proxy 所以一定要設定

vi /etc/miniflux.conf

# See https://miniflux.app/docs/configuration.html

RUN_MIGRATIONS=1
LISTEN_ADDR=127.0.0.1:8081
BASE_URL=https://www.mydomain.org/rss/
DATABASE_URL="postgres://miniflux:xxxxxxxx@localhost/miniflux?sslmode=disable"

重新啟動看看

systemctl restart miniflux.service
systemctl status miniflux.service

ps: 如果有錯,可以設定環境變數後 手動直接跑miniflux 錯誤會丟到stderr 然後開始除錯。

Apache2 reverse proxy mode

先 enable proxy

a2enmod proxy
a2enmod proxy_http

設定 site (我是放 virtual_host內)

       ProxyRequests Off
       <Proxy *>
           Order allow,deny
           Allow from all
       </Proxy>
       
       <Location "/rss/">
           ProxyPreserveHost On
           ProxyPass http://127.0.0.1:8081/rss/
           ProxyPassReverse http://127.0.0.1:8081/rss/
       </Location> 
    </VirtualHost>

存檔之後restart apache2 systemctl restart apache2.service,直接瀏覽看看:

curl http://www.mydomain.org/rss/

登入後匯入rss,正常用!好用,分享紀錄起來!

reference: