A light-weight web server that serves any website published to IPFS. It monitors a BCH address and automatically updates when new content is announced by that address. This repository focuses on the Raspberry Pi, the $50 credit-card sized minicomputer, as a web server. This is what it looks like:
Here is a non-technical video overview of how governments censor content on the internet, and how decentralized publishing tools can be used to circumvent it.
This is the server-side software that serves up content to users with a normal web browser. It also serves the content over IPFS and the Tor networks. It works in conjunction with the memo-push publishing tool. Memo-push is used to announce new content via the BCH network. This software is used to retrieve that new content from the IPFS network and serve it to users. It also serves content directly to the Tor network as well, via a hidden service.
This repository is forked from koa-ipfs-blog. While that version targets a normal computer, this version targets Raspberry Pi (ARM) as the production server. The koa-ipfs-blog repo was originally forked from the koa-api-boilerplate
Installation & Raspberry Pi Setup
This document discusses the modifications necessary to run a 'production' website off a Raspberry Pi mini computer. The directions below assume you are starting with an RPi v3 B+ with a fresh installation of Raspbian OS. All instructions below use the command line (terminal), not the graphical user interface.
- Clone this repository and enter the new directory:
git clone https://github.com/christroutner/koa-ipfs-blog-rpi cd koa-ipfs-blog-rpi
- (optional) Raspberry Pi comes loaded with educational software by default. If you are running your Pi as a dedicated device for serving web pages, you don't need all that bloat, and can save a lot of disk space by removing it. Run this shell script to remove this software:
- Update the Raspbian OS:
sudo apt-get update sudo apt-get upgrade -y
If the below Docker instructions produce an error, try it again. The install script for Docker and Docker Compose does not have robust retry logic, and will usually throw an error if your internet has any hiccup.
Install Docker on the RPi:
curl -sSL https://get.docker.com | sh sudo usermod -aG docker pi
Log out, then back in. Ensure you can run this command to confirm that Docker is installed and working correctly:
docker ps -a
Install Docker Compose:
sudo apt-get install -y python python-pip libffi-dev libssl-dev sudo pip install docker-compose
Build the Docker container with:
Run the docker container:
Or, run the docker container in daemon mode:
docker-compose up -d
Note: It takes time for the container to crawl the IPFS peer-to-peer network
and connect to peers, in order to find the initial content it wants to download.
You can speed up this processes by pre-downloading the initial content into the
Note: Your website will be able to be accessed directly over the Tor network.
The .onion address for your website can be found in
Your device will now automatically pull down updated content from the IPFS network, and serve that content over IPFS, the web, and Tor. It will automatically start up the software if you reboot your RPi.