[ ARCHIVED ] Wikipedia snapshots on IPFS (2017-2021). The ZIM-unpacking approach is a dead end, read the README for what to build instead.
[ ARCHIVED ] Wikipedia snapshots on IPFS (2017-2021). The ZIM-unpacking approach is a dead end, read the README for what to build instead.
[!IMPORTANT] This project is archived and its build pipeline is a dead end. Please do not revive it.
The approach here (unpack a ZIM into millions of small files, rewrite the HTML, re-add it to IPFS) was expensive to run and incompatible with Kiwix tooling. If you want to work on Wikipedia over IPFS today, read Instead: put the ZIM on IPFS and read it in the browser and start a new repository. Details and prior discussion: #140.
Distributed Wikipedia Mirror Project (archived)
Between 2017 and 2021 this repo produced read-only Wikipedia snapshots on IPFS, in response to Wikipedia being blocked in Turkey and elsewhere. The pipeline:
_all_maxi_ ZIM archive from download.kiwix.org.zimdump it into a directory of millions of flat files.ipfs add -r the result, producing a large HAMT-sharded UnixFS DAG.tr.wikipedia-on-ipfs.org at the root CID.It worked, and for a while it was the only way to read Wikipedia in a normal browser over IPFS. It is not the right shape for the problem anymore.
Each of those steps costs something, and the costs compound:
build issue:
entries in the issue tracker).The building blocks that made this workaround necessary no longer make it necessary. Do not spend a machine-month rediscovering that.
Keep the ZIM intact. Add the .zim file to IPFS as a single file, and read it
in place with a JavaScript ZIM reader that seeks into it over byte ranges.
ipfs add the unmodified .zim files from
download.kiwix.org. One CID per
archive. No transforms, no footer injection, no HAMT of millions of entries.
This also makes those CIDs useful as extra mirrors for Kiwix itself..zim rather than loading it whole. It gives you article rendering,
full-text search, and every language, for free.@helia/verified-fetch
is a drop-in fetch() that speaks HTTP Range against a CID and verifies the
blocks it gets back. That is exactly the seek primitive kiwix-js needs from a
local file, so it can stand in for filesystem access. Single ranges have been
supported since v1.2.0 and multiple byte ranges since v3.1.0.The work then is integration, not a data pipeline: give kiwix-js a file-like
object backed by verified-fetch (the seam is readFileSlice() in
www/js/lib/util.js, used by zimfile.js), get the ZIM CIDs published and
pinned in more than one place, and fix whatever paths and cosmetics break.
Start it in a new repository. This one is kept for its history, not as a base.
Out of scope for that plan: it does not make Wikipedia writable over IPFS, and it does not replace Kiwix's own distribution. It mirrors what Kiwix already publishes, and adds a way to read it without downloading the whole archive.
The DNSLinks below still resolve, but they point at snapshots frozen in 2021. Nobody is updating them. Treat them as an archive, not as a source of current Wikipedia.
en, tr, my, ar, zh, uk, ru, fa at *.wikipedia-on-ipfs.org;
the CIDs are recorded in snapshot-hashes.yml.
To read Wikipedia offline today, use a Kiwix reader with a ZIM from download.kiwix.org.
The pipeline is still in this repo, unchanged, in src/, bin/, tools/, and
legacy-pipeline/. It is preserved so the history stays readable. It is not
maintained, its dependencies are years out of date, and the build instructions
have been removed from this README on purpose. If you need them, they are in
git history before the archive commit.
If you are an AI coding assistant working in this repo, read AGENTS.md first.
No open issues yet, or sync has not completed.