fyr: offline maps, books and knowledge in one service
by Hexagon, 5 min read fyr rust offline off-grid kiwix zim wikipedia maps pmtiles raspberry-pi docker llm
What do you have left when the internet goes away? fyr is my answer: one small server that keeps maps, books, Wikipedia, a local AI assistant and a message board available to every device on your network, with no connection to the outside. It is an alternative to Project N.O.M.A.D. with a much simpler architecture, and it runs out of the box on almost any machine. Version 0.9.0 is the current release, and the first 1.0 beta, 1.0.0-beta.0, is out for anyone who wants to help test.
Why build it
The idea of an offline knowledge box is not new. Kiwix has served Wikipedia offline for years, and Project N.O.M.A.D. has recently made "survival computer" a category of its own. N.O.M.A.D. is a good project. It is also a stack: a command center that installs and runs a set of separate apps in their own containers, one for Wikipedia, one for maps, one for the AI, and so on. That is a sensible way to put existing tools together, but every extra part is something more that can break, update out of step, or not support your hardware.
I wanted the opposite. One service, one process, one data folder. Something you could put on an old laptop, a Raspberry Pi in a drawer or a mini PC in a cabin, and forget about until you need it.
The name is Swedish. A fyr is a lighthouse: it stands on its own, needs no one to tell it what to do, and is there when everything else has gone dark.
What it is
fyr is a web server written in Rust. You open it in a browser, on the computer it runs on or on any phone or laptop on the same network or hotspot. Once the content is downloaded, nothing needs the internet:
- Maps: offline vector and raster maps from PMTiles and MBTiles, with place search ("where is Kebnekaise?"), go-to-coordinate in every format you can think of, distance measuring, GPS track recording, POIs and GPX import and export.
- Books: one reader for EPUB, PDF, Markdown and ZIM. ZIM is the format
Kiwix uses for Wikipedia, Wiktionary, Stack Exchange, iFixit, medical
references and much more, and fyr reads it natively with its own reader. No
kiwix-serveon the side. - Search: one box for everything: book titles, article titles, text inside articles and books, maps, places on the maps and your own POIs.
- Assistant: a local AI that runs GGUF models (Qwen2, Llama, Phi-3) on the CPU, with NEON on ARM and AVX2 on x86. No GPU needed. With Use library turned on, it answers from your own books and Wikipedia and cites its sources, which you can click to read.
- Messages: a public board with info, need, offer and alert posts (with locations on the map), plus end-to-end encrypted channels joined with a name and a passphrase. No accounts, and it works on a plain-HTTP hotspot.
- Content manager: a download queue that resumes broken downloads, checks SHA-256 sums, and suggests tested maps, books and models when a folder is empty.
- Tools: unit converters and a few offline utilities (AES, Base64, ROT13, hashes).
The interface comes in English and Swedish, and can be installed as an app on phones and desktops.
The architecture, or the lack of it
This is the part I care most about. fyr is:
- One binary. Maps, the ZIM reader, search indexes, the AI runtime, messaging and downloads all live in the same Rust process (axum and tokio, with candle for inference).
- No database, no cache server, no sidecars. State is plain files in one
data folder:
books/,maps/,poi/,models/,misc/, and the indexes fyr builds itself. - Plain files in, plain files out. Copy a
.zimor.pmtilesfile into the right folder and it shows up. Back up the folder and you have backed up everything, or use Settings → Backup & restore.
Heavy work is done in the background and at low priority. Full-text indexes for ZIM archives and place indexes for maps are built one at a time, continue where they stopped after a restart, and pause if the disk gets close to full. Really large archives, like a full Wikipedia, are only indexed when you ask, so a Raspberry Pi is not busy for hours behind your back.
Installing it
fyr runs in Docker, so install that first. The installer then pulls the right
image for your CPU, creates a data volume, optionally sets an admin password
(--admin-password), and remembers your choices for later upgrades.
Linux and macOS:
|
Windows (PowerShell):
irm https://fyr.guide/install.ps1 | iex
Then open http://localhost:8080, or http://<ip-of-the-machine>:8080 from
another device.
Updating is the same command with update:
|
To try the 1.0 beta, use the next channel. It follows the newest beta or
release candidate, the choice is remembered by later update runs, and
latest takes you back to stable releases. On a machine where fyr is already
installed, put update in front:
| | |
For older hardware there is a legacy image that trades speed for compatibility:
|
Phones only allow GPS on HTTPS pages, so if you want My Location and track
recording over the LAN, add --https. fyr then makes its own certificate and
serves HTTPS directly, no reverse proxy needed:
|
If you prefer Docker by hand, it is one container:
And if you have Rust, you can build it yourself:
There is a step-by-step guide for offline Wikipedia on a Raspberry Pi, and more, like offline maps, a local AI assistant and an off-grid emergency server, at fyr.guide/guides.
Where it runs
The short answer is: on whatever you have. The latest (stable) and next
(pre-release) images are built for current x86_64 (AVX2) and arm64 machines, and the legacy, pc-legacy and
rpi-legacy images cover older PCs and older Raspberry Pi-class boards.
Everything except the AI assistant is light. A Raspberry Pi 5 with 4 GB of RAM
runs the small Qwen2.5 1.5B model, 8 GB is enough for a 7B model, and a desktop
with 16 GB or more can run the 14B one.
Open mode is the default, where everyone on the network can do everything.
Set FYR_ADMIN_PASSWORD to keep downloads and settings for yourself, or
FYR_READONLY=true for a kiosk or a public library box where the content is
loaded in advance and nobody should change anything.
Status: 0.9.0, and the 1.0 beta
0.9.0 is the current release, and 1.0.0-beta.0 is the first beta on the way to
1.0, available through the next channel. Everything above works, and I use
it, but interfaces and workflows may still change before 1.0. If you are coming
from 0.5.x, take a backup first and follow the
upgrade guide.
This is a good time to try it and tell me what breaks. Bug reports, hardware it does or does not run on, and content sources that should be in the curated list are all welcome as issues on GitHub.
Resources
- fyr.guide, the website and installation guide
- fyr on GitHub (MIT licensed)
- User manual
- Kiwix library for ZIM archives
- Protomaps and BBBike for offline maps