Polish off the IPFS entry, getting it ready for review..

* Document installation of the IPFS daemon, losely.
* Document initializing the daemon.
* Documented port openings.
* Documented starting the daemon.
* Documented a hesitant sync procedure.
Hunter Jozwiak 2024-01-19 02:52:37 -05:00
parent 812a4d1882
commit e9b68b1563

61
ipfs.md Normal file

@ -0,0 +1,61 @@
# Syncing the Archives via IPFS
## Introduction
This article will show you how you can sync our archive of audiogames on IPFS to your node, to ensure high availability should a hosting site go down.
## Procedure in Brief
These instructions are going to require a bit of elbow grease in the command line, so be prepared to get into a console or a terminal emulator. In brief, you need to:
- install an IPFS daemon. For this wiki, I am assuming Kubo or go-ipfs, depending on how your package manager packages things.
- Initialize your demon.
- Write a user service to start IPFS, or enable it on your system if such a service is available.
- Be sure that port 4001 is accessible, both by UDP and TCP.
- Start your demon.
- Pin the directory resolved by way of IPNS.
### Installing the Daemon
This step will vary, depending on how your distribution packages things. Here are some of the common ones that I did a bit of research for.
Arch Linux
: Available as kubo.
Void Linux
: Available as go-ipfs.
Slint/Slackware and Other Distros I Hadn't Thought of
: Consult the instructions [here.](https://github.com/ipfs/kubo)
### Initializing your Daemon
This is pretty easy, all you need to do here is:
```bash
ipfs init
```
### Opening the Ports
In order for your node to be able to talk to other nodes on the IPFS network, you will need to allow port 4001/tcp and 4001/udp through your firewall. In addition, you may also need to forward those ports to the box should UPNP not be working.
### Start or Create a Service
For some distributions, a user service is already shipped, so starting the daemon is pretty straightforward. Consult the specifics of your init system and be sure it is running now and enabled on boot. If a service is not available, be sure that you run the following as your user:
```bash
ipfs daemon
```
### Sync the Archive
Now that yu have the IPFS node running, you can now get the archive and pin a copy locally by way of its IPNS key.
```bash
ipfs pin add /ipns/k51qzi5uqu5dg7ndb48x1v9hzp98vg6wncrbhps16a8yn3eh4nqis7v384jh20
```
To ensure you have the latest archive, run the pin on a periodic interval. Additionally, if your node is slow in updating, as mine was, you can resolve the resolve the ipns entry by hand and pipe that into pin add.
```bash
ipfs name resolve --nocache /ipns/k51qzi5uqu5dg7ndb48x1v9hzp98vg6wncrbhps16a8yn3eh4nqis7v384jh20 | ipfs pin add
```