ipfs2fil

For anyone with an IPFS node full of things they want to keep

Your IPFS repo, archived on Filecoin. Browsable from anywhere.

ipfs2fil reads an IPFS repo (kubo, go-ipfs or IPFS Desktop, any version), packs every pin, your MFS files and stray blocks into pieces, and stores copies with Filecoin storage providers that prove on chain they still hold them. Each archive carries its own explorer, so any IPFS gateway can show you what is in it.

curl -fsSL https://github.com/jbenet/ipfs2fil/releases/latest/download/install.sh | sh
The ipfs2fil explorer showing a grid of archived photos with a large preview of one photo, its CID, piece and copies
Read onlynever writes to your repo; the daemon can keep running
Incrementalcontent-defined pieces: run it again, only changes upload
Self-describingindex and explorer travel inside every archive
Reads old reposfs-repo 0 to 18: go-ipfs 0.2 through kubo 0.43, on flatfs, leveldb, badger or pebble

Three commands

Below, two made-up repos of a few GiB go through the real ipfs2fil, with the storage simulated so nothing is paid for, and the waits sped up. The live demo is a real archive.

1

See what you have, and what it costs

ipfs2fil scan reads $IPFS_PATH (or ~/.ipfs, or --repo) and tells you how many blocks, pins and pieces there are, and the monthly price. Nothing is written anywhere.

ipfs2fil scan output: 25080 blocks, 6.1 GiB, 9 pins, about 10 pieces, and the monthly cost
2

Pack and store in one go

ipfs2fil up links every pin, the MFS tree and leftover blocks under one root, cuts the blocks into pieces, shows the cost and any deposit, and after you say yes stores the copies. Each piece leaves your machine once; providers copy it from each other.

Run it again whenever the repo changes: pieces are cut where the content says, so pieces already stored are skipped. Ctrl-C or a failure is safe; run it again and it carries on.

Keep a list of repos with ipfs2fil repos add and up --all archives them together: one confirmation, shared data sets, and a block an earlier repo stores is never stored twice.

3

Check on it, from the chain

ipfs2fil status reads your data sets from chain: which providers hold a copy, when each last proved it, and how many days your deposit lasts. ipfs2fil verify fetches every piece back, checks every block against its CID, and asks the IPFS network whether the CIDs are announced.

An explorer inside every archive

Run ipfs2fil explore to browse on your machine, or open https://dweb.link/ipfs/<root>/explorer/ once the archive is stored. Photos, video, audio, PDFs, books and code open right in the page; tar and zip files open like folders. Bluesky accounts read like Bluesky, git repos like a git host, and archived web sites open as sites. Every list filters, sorts and moves with the keyboard.

Open the demo archive from Filecoin or a copy on this website

The Filecoin demo is a public archive of open-license books, papers, music, photos and HTML games, stored on mainnet and served by an IPFS gateway. The copy on this website holds that content and more: twelve repos of every kind ipfs2fil reads, kubo, js-ipfs, Helia, CAR files, a Bluesky account, a whole PDS, git repos, a pinning service and a list of web sites, made with simulated storage. It loads even when gateways are slow.

j / k through files, v to switch views, then Bluesky, git and web sites

A viewer for each kind of repo

An archive is more than files. The explorer knows what it is looking at and shows it the way its own app would, all from the archive, with nothing but a browser and an IPFS gateway.

The Bluesky viewer: the @bsky.app profile with its banner, its posts, and a summary of the records the archive holds

Bluesky

Accounts and whole PDSes: profiles, posts, replies, threads and media, as Bluesky shows them, and every record as JSON.

The Git viewer: the go-cid repo at HEAD with its files, commits, branches and tags

Git

Repos with all their history, read from the stored packs: files at any commit, the log, branches and tags, at paths like a git host's.

Archived web sites: docs.ipfs.tech open in the preview, beside a list of sites and folders that look like web sites

Web sites

IPFS sites from a site list, and any folder with an index.html, open as sites whose links work inside the archive.

The Bluesky accounts as a list: one row per account with posts, following, likes, media and records in columns

Grid or list

Accounts and repos show as cards or as a sortable list, with their numbers in columns. Press v to switch.

Built to outlast the machine it ran on

Every repo version

fs-repo 0 through 18: go-ipfs 0.2 to kubo 0.43, with flatfs, leveldb, badger, pebble and custom datastore specs. Old pin layouts and the MFS root are read too.

More than kubo

js-ipfs repos, Helia stores, CAR files, a running node through its RPC API, Bluesky accounts or a whole PDS, whose repos are IPLD too, git repos with all their history, the pins on a pinning service, and a list of IPFS web sites. Each shows up in the explorer's library: posts, commits and branches, sites you can open. The demo has one of each.

Everything, not just pins

Recursive and direct pins, your MFS files, and orphan blocks no pin reaches (on by default), all linked under one archive root.

Same repo, same pieces

Piece cuts depend only on the blocks, so a re-run skips every piece already stored and an edit changes only nearby pieces. Dates and providers live in the index, not the data.

Copies that are proven

Pieces go to Filecoin Onchain Cloud, where providers prove on chain, over and over, that they still hold them. Three copies by default, paid from your own wallet.

Findable by CID

Providers announce the blocks to the IPFS network, so any gateway or node can fetch a file by its CID, and verify checks that they do.

Many repos, many machines

Give each machine the same wallet key. The catalog of every machine's repos is kept, encrypted, in your own data sets on chain, so shared blocks are stored once and status --all sees everything.

Safe to stop

Ctrl-C or a failure never wastes work: packing reuses its cache, uploads resume, and on-chain adds wait out gas price spikes while uploads keep going.

One binary

A single Go binary with no cgo, built for every platform kubo ships for, with checksums and signed build provenance on every release.

Quickstart

You need an IPFS repo (kubo, go-ipfs, or anything that runs them, like IPFS Desktop; js-ipfs, Helia, a CAR file or a Bluesky account work too) and a Filecoin wallet with some FIL for gas and USDFC for storage. Add --network calibration to any command to try it free on the testnet first.

  1. Install

    curl -fsSL https://github.com/jbenet/ipfs2fil/releases/latest/download/install.sh | sh

    Or go install github.com/jbenet/ipfs2fil/cmd/ipfs2fil@latest, or a binary from releases.

  2. Look before you leap

    ipfs2fil scan          # blocks, pins, pieces and the monthly cost
  3. Get a wallet

    ipfs2fil wallet new    # makes ~/.ipfs2fil/wallet.key, prints its address
    ipfs2fil wallet        # FIL, USDFC and the Filecoin Pay deposit

    Or point it at a key you already have with IPFS2FIL_KEY_FILE. ipfs2fil never prints the key or copies it anywhere.

  4. Archive

    ipfs2fil up            # pack, show the cost, store after you say yes
  5. Check and browse

    ipfs2fil status        # providers, pieces, last proof, days funded
    ipfs2fil verify        # fetch every piece back, check every block
    ipfs2fil explore       # browse it here: http://127.0.0.1:8484/
    ipfs2fil explore-url   # the explorer stored on Filecoin, for any browser

    The explorer travels inside the archive, so once the pieces are stored anyone can open it from an IPFS gateway: explore-url prints https://dweb.link/ipfs/<root>/explorer/, one per repo with --all.

Archive all the things

Not just kubo. --repo takes every kind of IPFS and IPLD data ipfs2fil reads:

ipfs2fil up --repo ~/.jsipfs                      # a js-ipfs repo
ipfs2fil up --repo ./my-app/data                  # a Helia store (blocks/, datastore/)
ipfs2fil up --repo export.car                     # a CAR file, or a folder of them
ipfs2fil up --repo http://127.0.0.1:5001          # a running kubo node
ipfs2fil up --repo at://you.bsky.social           # a Bluesky account
ipfs2fil up --repo pds:https://pds.example.com    # every account on a PDS
ipfs2fil up --repo ~/src/project                  # a git repo, or a folder of them
ipfs2fil up --repo https://github.com/ipfs/kubo   # a git repo by URL
ipfs2fil up --repo psa:pinata                     # your pins on a pinning service
ipfs2fil up --repo mine.ipfs-sites.toml           # a list of IPFS web sites

The demo holds one of each beside two kubo repos:

  • a js-ipfs repo and a Helia store, made by their own code
  • a CAR of art, and one of dev assets
  • the @bsky.app Bluesky account
  • a PDS of three made-up accounts
  • the multiformats specs and ipfs/go-cid, as git repos
  • a pinning service
  • the ipfs.tech, specs.ipfs.tech and docs.ipfs.tech sites

The same images sit in the Bluesky account, the Helia store, the CAR and kubo, and are stored once; so are the papers and photos the pinning service holds, and the specs site it pins.

Several repos?

ipfs2fil repos add ~/.ipfs     # for each
ipfs2fil up --all

Every command explains itself

ipfs2fil help <command>

Commands

scanRead the repo and say what an archive would hold and cost
upPack and push in one go, after confirming the cost
packBuild the archive and its pieces on disk
pushUpload pieces that are not stored yet
statusCopies, funding and proofs, read from chain
verifyFetch pieces back and check every block
exploreServe the HTML explorer, with the files themselves
explore-urlPrint the URL of the explorer stored on Filecoin
reposKeep a list of repos to archive together (add, ls, rm)
walletMake a wallet key to fund, or show its balances

Questions

Is what I archive public?

Yes. Pieces are stored as they are, and providers announce the CIDs to the IPFS network, so anyone who has a CID can fetch that content. Only archive what you are happy to publish, or encrypt it before adding it to IPFS. (The catalog of your repos is the exception: it is encrypted with a key derived from your wallet key, and repo paths never leave your machine.)

What does it cost?

scan prints the monthly price before anything happens, and up shows it again with any deposit it needs and waits for your yes. Storage is paid in USDFC through Filecoin Pay from your own wallet; gas is paid in FIL. status says how many days your deposit lasts.

Which repos can it read?

Any repo in the fs-repo format that kubo and go-ipfs use, from go-ipfs 0.2 (fs-repo 0) to kubo 0.43 (fs-repo 18), on flatfs, leveldb, badger or pebble. That includes the repos of IPFS Desktop and other apps that run kubo inside them.

Will it touch my repo?

No. Stores are opened read-only and migrations are never run, so it is safe while the daemon runs. Archives are written to ./ipfs2fil-archive, or under ~/.ipfs2fil for listed repos.

What if a provider loses a piece?

verify fetches every piece from every copy and lists any that are bad; push uploads again what a copy is missing. status shows when each copy last proved it holds your data.

Can I get my files back without ipfs2fil?

Yes. Every file has a CID, so any IPFS gateway or node can fetch it, and the archive root opens the explorer in a browser. The pieces are plain CAR files, and the index lists which piece holds each block.

Can I try it without spending anything?

Yes: add --network calibration and fund a wallet from the Calibration faucets.

Who made it?

@claude and @jbenet, written with Claude Code. It is open source under the MIT license, on GitHub.