Skip to content
A Docker image that installs ubuntu packages via IPFS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile Hello world Mar 21, 2019
LICENSE Create LICENSE Mar 25, 2019 Add and update readme Mar 27, 2019 Add and update readme Mar 27, 2019

IPFS apt mirror

A docker image that installs ubuntu packages via IPFS rather than using http to talk to a mirror

Full credit to for laying the ground work for this.

See the Dockerfile for a breakdown of how it works, and sources.list for the current IPFS hash of the mirror.

Run it with the following commands, may take a few minutes depending on how many nodes are connected

git clone
cd apt-on-ipfs
docker build .

Running your own mirror

Note: This requires ~2.5TB of free disk space and over 36 hours to complete the first time, subsequent runs take ~3 hours.

Initial setup commands, run once:

apt-get update
apt-get install -y git wget

tar xvfz go-ipfs_v0.4.19_linux-amd64.tar.gz
mv go-ipfs/ipfs /usr/local/bin/ipfs

mkdir -p /data/apt

export IPFS_PATH=/data/.ipfs

ipfs init

Mirroring commands, can be ran repeatedly to keep up to date:

rsync -q --recursive --times --links --safe-links --hard-links --exclude "Packages*" --exclude "Sources*" --exclude "Release*" --exclude "InRelease" rsync:// /data/apt/

rsync -q --recursive --times --links --safe-links --hard-links --delete --delete-after rsync:// /data/apt/

export IPFS_PATH=/data/.ipfs

hash="$(ipfs add -r --quieter --raw-leaves /data/apt | tail -n1)"

ipfs name publish "$hash"

The first time you run the mirroring commands, a new IPNS will be output, update sources.list with your IPNS and then after each sync that IPNS will be updated to point to the latest IPFS hash of the mirror.

You may wish to pick a different ubuntu mirror that is geographically closer to your server for faster rsyncing:

You can’t perform that action at this time.