Installing Miniflux
You finish this chapter with the two
pieces on the machine — a PostgreSQL
database waiting empty, and the
Miniflux program able to say its own
version. The checks: PostgreSQL
answers pg_isready, and
./miniflux -version prints a version
number. Chapter 4 joins them together.
First, the database
Miniflux's one hard requirement is PostgreSQL (chapter 2 explains why everything lives there). On a Debian or Ubuntu machine the database itself is one package:
sudo apt install postgresql
sudo systemctl start postgresql
Then give Miniflux a user and a database of its own — its own, so its tables never mix with anything else's, and so a password change later touches nothing else:
sudo -u postgres createuser -P miniflux
sudo -u postgres createdb -O miniflux miniflux
createuser -P asks you to invent the
database password. Keep it somewhere
safe; Miniflux needs it in its
configuration, in a string called the
DATABASE_URL:
postgres://miniflux:YOUR-PASSWORD@localhost/miniflux?sslmode=disable
Read it left to right: the program
(PostgreSQL), the user, the password,
the machine, the database, and
sslmode=disable because this
connection never leaves the machine.
The PostgreSQL guide in this series
covers the database's own care and
feeding; this guide only borrows it.
What the lab did instead: the build
machine had no system service to spare,
so the lab ran the same Ubuntu
PostgreSQL 16 binaries with a private
data directory, its own port (55432)
and throwaway trust authentication on
loopback — transcript t00 shows the
whole thing, and the miniflux
database being created in it. The
shape is identical; only the plumbing
differs, and the lab's way is not the
one to copy onto a real server.
Then, the program
There are three honest ways to get Miniflux itself.
The package (the usual route). The
project publishes a .deb for Debian
and Ubuntu and an .rpm for the Red
Hat family on its releases page.
Installed the ordinary way
(sudo apt install ./<the package>),
it adds the program, a configuration
file at /etc/miniflux.conf, and a
systemd service named miniflux
that keeps it running and restarts it
after reboots. You put your
DATABASE_URL and choices in the config
file, then start the service. This
route is taught from the project's
documentation; the lab ran the bare
binary below, so treat the package's
own messages with the trust you would
give any first install — the checks in
chapter 4 still apply unchanged.
The bare binary (the lab's route, and the simplest to understand). Every release also offers the single program file per platform. The lab's download, checksum and all, is transcript t01:
curl -sL -o miniflux \
https://github.com/miniflux/v2/releases/download/2.3.4/miniflux-linux-amd64
curl -sL -o miniflux.sha256 \
https://github.com/miniflux/v2/releases/download/2.3.4/miniflux-linux-amd64.sha256
cat miniflux.sha256
sha256sum miniflux
chmod +x miniflux
./miniflux -version
The checksum file the project
publishes and the checksum your
machine computes must agree — in the
lab both were
33f43a73f0b2b0dfa1f6cb30dd37c9c4b04a8c61785239f9ead578683ea0c175
— and the version call answered:
2.3.4
That one line is the install's first proof: the right file, intact, executable on this machine.
Containers. The project also publishes a Docker image and a compose file that starts Miniflux and PostgreSQL together. For many home servers that is the quickest road of all. This guide does not walk it (container fleets are the Docker and Docker Compose guides' territory); everything after this chapter is identical whichever road brought the program in.
Configuration, in one paragraph
Miniflux is configured by environment
variables — or a file of them, which
is what /etc/miniflux.conf is. There
are 88 settings in 2.3.4; the lab knows
because -config-dump printed them
all (transcript t04). You will meet
perhaps six in this guide:
DATABASE_URL, LISTEN_ADDR (where
the web page listens; port 8080 by
default, 8899 in the lab),
RUN_MIGRATIONS and CREATE_ADMIN
(chapter 4), POLLING_FREQUENCY, and
one guard rail, FETCHER_ALLOW_PRIVATE_NETWORKS,
that chapter 5 walks into on purpose.
The rest can stay at their defaults
until a chapter names one.