Well, that look long enough to repeat and document! My piratebox is a custom job, not one of the images provided, so this is all specific to me - but you should be able to adapt it.
-----
Instructions for converting your piratebox to use IPFS.
1. Repartition the drive (optional).
This is not actually required, but in the case of a piratebox it is wise to separate the IPFS data from the OS. This is to reduce the possibility of serious data corruption in the event of an unexpected loss of power - which, in many pirateboxes, is the most common way of turning off. Actually you've still a good chance of screwing IPFS up with unclean shutdowns, so... don't do that.
So just shrink your OS down to as low as you feel comfortable, and make the rest a bit ext4 partition. Personally I make this my /home/ partition, but you can put it elsewhere and link the .ipfs directory to it.
For those pirateboxes which use a separate device for storage due to limited internal flash memory, this step is obviously not required.
2. Install IPFS.
Detailed instructions will not be provided here. Simply install IPFS as you would on any other computer, and initialise it for whichever user will be running the IPFS service.
3. Configure IPFS.
The default IPFS configuration is quite resource-intensive. Pirateboxes are a resource- and power-constrained environment. They may or may not be connected to the internet, and may or may not be connected to other physically nearby IPFS nodes either as part of a mesh or as client devices. IPFS needs a few small configuration changes to operate optimally under these conditions. So open up ~/.ipfs/config and make the changes:
StorageMax needs to be a little bit less than the available space on your IPFS storge partition.
Under "Access-Control-Allow-Methods" you see only 'GET' by default. Change to 'GET PUT POST' in order to enable write methods. This will allow clients to upload files into IPFS.
Likewise, change the "Writable" field to "true" - those two settings are both needed.
The next two changes are to reduce resource usage, and are only required if you have CPU, memory or power constraints. Which most pirateboxes do.
"Routing" defaults to type "dht". You want "dhtclient"
Finally, look for the "ConnMgr" field - this one sets how many connections IPFS tries to maintain to the network. If your node has no internet connection that won't mean much, but if it does the reducing 'HighWater' and 'LowWater' will greatly reduce resouce usage (at the expense of making it harder to retrieve blocks). I use 100 and 150 respectively.
4. Apache
I use apache on my piratebox, so you will need to change this procedure entirely if you are using another web server. In order for both IPFS and the webserver to use the same port, you need to configure the web server to forward traffic into the /ipfs/ and /ipns/ directories to the go-ipfs daemon as if it were a proxy server. So first, enable the apache module mod_proxy - and don't forget proxy_http goes with it. Then add two lines to httpd.conf or apache2.conf, whichever your disto uses:
ProxyPass "/ipfs" "[
127.0.0.1];
ProxyPass "/ipns" "[
127.0.0.1];
Note the use of 127.0.0.1 rather than localhost. This matters. By default IPFS only binds the gateway to 127.0.0.1, while localhost will resolve to ::1 - if you use localhost you get ipv6 connectons, you must have ipv4 for this. At least until the IPFS people change the behavior.
5. Firewall.
Almost done! Only three steps left. Configure your firewall so that the interface to which clients connect will allow traffic on UDP port 5353 (IPFS's MDNS discovery) and TCP 4001 (IPFS connections). Don't forget to allow these on IPv6 as well! These are in addition to the usual piratebox requirements of 53, 67/68 and 80.
6. IPFS on startup.
Add to rc.local: su <user> -c "ipfs daemon" &
<user> is whichever used account you have running go-ipfs. If you are using a Pi with rasperian, that's usually the 'pi' user.
7. Add to the page.
Finally, edit your piratebox's HTML page, the part users actually see. Remove any references to the Droopy horror, and replace with a link to the IPFS file uploading utility. This utility is actually stored within IPFS itsself:
/ipfs/Qmd2jKm99A2pJucn58xg5nGVRtUuNgSpiZ3jjdL39Bw95V/
If your piratebox has no internet connectivity at all, you'll need to manually download that on an internet-connected IPFS node and copy it across, then put it in. But if you do have internet connectivity, simply accessing that address will cause IPFS to search the network for a source and retrieve it.