Adding Your First Feed
You finish this chapter subscribed to
one real feed, with its entries
standing in your unread list. The
check: the page title counts them —
the lab's read Unread (3) — and the
API agrees on the number
(transcript t04).
What subscribing actually is
Subscribing is one sentence to Miniflux: watch this feed. It fetches the feed once, immediately, learns the site's name and description from the document itself, files every entry it finds as unread, and puts the feed on the schedule (chapter 2). You do not import articles one by one, and you do not wait for the first scheduled round: the first fetch is the subscription.
The lab subscribed with the API
(chapter 8 shows the call); the web
interface's version is the same act
from the other door: Feeds → Add
(the + in the menu, or the + key),
paste an address, subscribe. What you
paste can be two kinds of address:
- A feed's own address, ending
usually in
.xml,/feed,/rssor/atom. This is the direct route, and it is the one the lab verified: the answer to the call was{"feed_id":1}— the new feed's number, and the whole transaction done. - A site's ordinary address. Miniflux then goes hunting for the feed the site advertises, trying several well-known places. This discovery hunt is taught from the documentation — the lab always knew its feed's address, because it wrote the feed itself. When the hunt succeeds you are offered the feed it found; when it fails, the site may still have a feed it does not advertise, and finding that address (often linked from the site's own footer or source) is a job for a search engine, not for Miniflux.
Meet the lab's feed
So that this chapter can be checked
rather than believed, the lab invented
its source: Notes from the Allotment,
a three-entry gardening journal that
never existed, served as a file from
the same machine. The file ships with
this guide at miniflux-lab/feed/feed.xml;
serve it the same way and every number
in this chapter should repeat for you:
cd miniflux-lab/feed
python3 -m http.server 8898 --bind 127.0.0.1
What came back when Miniflux fetched it is the feed record the API returned (transcript t04), with the parts a reader cares about:
"title": "Notes from the Allotment",
"site_url": "http://127.0.0.1:8898/",
"feed_url": "http://127.0.0.1:8898/feed.xml",
"language": "en",
"category": {"id": 1, "title": "All"}
Title, description and language were never typed by anyone — Miniflux read them out of the feed. New feeds land in the category All, which is every feed's first home; chapter 7 puts them in better ones. And the three entries arrived with it, in the API's list and on the web page alike:
3 unread - First potatoes are in
2 unread - Building a cold frame from old windows
1 unread - The last tomatoes, and what they taught me
(The entry numbers look backwards because Miniflux files newest first internally and the lab listed them oldest first. The titles, dates and texts are the feed's own, word for word.)
The guard rail: private networks
The lab's first subscription attempt failed, and the failure is worth a section because home servers meet it often (transcript t04):
"error_message": "fetcher: Get \"http://127.0.0.1:8898/feed.xml\": dial tcp 127.0.0.1:8898: fetcher: refusing to access private network host \"127.0.0.1\""
Miniflux refuses, by default, to fetch
feeds from private network
addresses — loopback, and the
192.168.* / 10.* ranges home networks
use. This is not a bug or a missing
feature. A feed reader fetches
whatever address it is handed, and a
reader on the open internet that could
be handed http://192.168.1.1/...
becomes a tool for probing networks it
sits inside. So the door is locked on
purpose, and the key is a setting:
FETCHER_ALLOW_PRIVATE_NETWORKS=1
The lab found it the documented way —
./miniflux -config-dump lists all 88
settings with their current values —
restarted its server with the key
turned, and the same call succeeded.
Turn this key only when your server is
yours and its network is yours: a
self-hosted reader following your own
home services is the legitimate case.
On a machine other people can ask to
fetch things, leave the lock on.
Chapter 11 returns to this setting
with the colder head it deserves.