From e6dee62899e524c48519993101d6e8368d860a11 Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Fri, 19 Jan 2024 16:11:55 -0500 Subject: [PATCH 1/7] Add new command flags. You'll need to edit your daemon's startup if necessary for these to take effect. --- ipfs.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipfs.md b/ipfs.md index cfb3c08..bb2558c 100644 --- a/ipfs.md +++ b/ipfs.md @@ -45,12 +45,13 @@ In order for your node to be able to talk to other nodes on the IPFS network, yo ### 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: +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, editing the user services where necessary: ```bash -ipfs daemon +ipfs daemon --enable-gc --migrate --enable-namesys-pubsub ``` +In brief, these flags allow for migrating the daemon automatically when you install a new version, letting the garbage collector run at periodic intervals, In bief, these extra flags allow for subscribing to published events about names, allowing migrations on daemon startup, and allows for the newer pubsub system. ### Sync the Archive From dd1399d37f3f1f8b4513b5a39deffeb878e35abb Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Sat, 20 Jan 2024 15:54:25 -0500 Subject: [PATCH 2/7] Update the paths for copying the archive. DNS Link is a wonderful thing; it simplifies a bunch of things. --- ipfs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipfs.md b/ipfs.md index bb2558c..d21d2d4 100644 --- a/ipfs.md +++ b/ipfs.md @@ -58,14 +58,14 @@ In brief, these flags allow for migrating the daemon automatically when you inst 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 +ipfs pin add games-archive.stormux.org ``` 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 +ipfs name resolve --nocache games-archive.stormux.org | ipfs pin add ``` @@ -74,5 +74,5 @@ To automate this process, you can add it to your crontab: ```bash crontab -e # ipns update for audiogame-manager once a week -0 12 * * 1 ipfs name resolve --nocache /ipns/k51qzi5uqu5dg7ndb48x1v9hzp98vg6wncrbhps16a8yn3eh4nqis7v384jh20 | ipfs pin add +0 12 * * 1 ipfs name resolve --nocache games-archive.stormux.org | ipfs pin add ``` From e717859c13ef0d6c1a6eb31b05c686ae70058ea4 Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Sat, 20 Jan 2024 16:03:36 -0500 Subject: [PATCH 3/7] Fix pin add instruction. You do need to use /ipns/games-archive.stormux.org. --- ipfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipfs.md b/ipfs.md index d21d2d4..d6c569f 100644 --- a/ipfs.md +++ b/ipfs.md @@ -58,7 +58,7 @@ In brief, these flags allow for migrating the daemon automatically when you inst 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 games-archive.stormux.org +ipfs pin add /ipns/games-archive.stormux.org ``` From ce053fb56b339128f171f6cc9de76b739ceb47aa Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Mon, 22 Jan 2024 13:32:50 -0500 Subject: [PATCH 4/7] Some tweaks to the IPFS instructions. It is interesting to have the archive mounted into your MFS for easier browsing. Also, it will make updating the pins easier, I hope. --- ipfs.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ipfs.md b/ipfs.md index d6c569f..d2b5bd3 100644 --- a/ipfs.md +++ b/ipfs.md @@ -61,18 +61,29 @@ Now that yu have the IPFS node running, you can now get the archive and pin a co ipfs pin add /ipns/games-archive.stormux.org ``` +### Copy the Archive into Your MFS for Easier Perusal + +If you want an easier way to parooze the archive, you can put it into your MFS (Mutable File Storage). I believe there is a way to mount this onto your filesystem by way of fuse, but I am not sure if it works, as it is an experimental feature. Regardless, you'll want to do this so that you can update the records easier (you need to keep track of the old hash for the pin to update, since ipfs pin update will delete the old hash and pin the new one). So here is how you do this: + +```bash +ipfs files cp $(ipfs name resolve /ipns/games-archive.stormux.org) /games-archive +``` + +Now you can do ipfs ls /games-archive instead of a longer path. + +### Syncing the Archive 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 games-archive.stormux.org | ipfs pin add +ipfs pin update $(ipfs files stat --hash /games-archive) $(ipfs name resolve --nocache /ipns/games-archive.stormux.org) && ipfs files rm -r /games-archive && ipfs files cp $(ipfs name resolve /ipns/games-archive.stormux.org) /games-archive ``` - To automate this process, you can add it to your crontab: ```bash crontab -e # ipns update for audiogame-manager once a week -0 12 * * 1 ipfs name resolve --nocache games-archive.stormux.org | ipfs pin add +0 12 * * 1 ipfs pin update $(ipfs files stat --hash /games-archive) $(ipfs name resolve --nocache /ipns/games-archive.stormux.org) && ipfs files rm -r /games-archive && ipfs files cp $(ipfs name resolve /ipns/games-archive.stormux.org) /games-archive + ``` From 951f0064bf0463bb69d711cf0f9b5b92ef02298a Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Mon, 22 Jan 2024 13:37:35 -0500 Subject: [PATCH 5/7] Update the general list. --- ipfs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ipfs.md b/ipfs.md index d2b5bd3..964dda1 100644 --- a/ipfs.md +++ b/ipfs.md @@ -15,6 +15,8 @@ These instructions are going to require a bit of elbow grease in the command lin - Start your demon. - Pin the directory resolved by way of IPNS. +- Optional, but really recommended: mounting the archive into MFS. +- Sync the archive. ### Installing the Daemon From 9f626f6ed065575e0c9ec584c4b4c1a0c27b4745 Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Mon, 22 Jan 2024 13:37:54 -0500 Subject: [PATCH 6/7] Fix sentence. --- ipfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipfs.md b/ipfs.md index 964dda1..3dacee0 100644 --- a/ipfs.md +++ b/ipfs.md @@ -53,7 +53,7 @@ For some distributions, a user service is already shipped, so starting the daemo ipfs daemon --enable-gc --migrate --enable-namesys-pubsub ``` -In brief, these flags allow for migrating the daemon automatically when you install a new version, letting the garbage collector run at periodic intervals, In bief, these extra flags allow for subscribing to published events about names, allowing migrations on daemon startup, and allows for the newer pubsub system. +In brief, these extra flags allow for subscribing to published events about names, allowing migrations on daemon startup, and allows for the newer pubsub system. ### Sync the Archive From dbbd225d41deca5ee41bf3c2f07b42fefdb09261 Mon Sep 17 00:00:00 2001 From: Hunter Jozwiak Date: Mon, 22 Jan 2024 13:38:09 -0500 Subject: [PATCH 7/7] Fix file command. It's ipfs files ls, not ipfs ls to browse the MFS. --- ipfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipfs.md b/ipfs.md index 3dacee0..927926b 100644 --- a/ipfs.md +++ b/ipfs.md @@ -71,7 +71,7 @@ If you want an easier way to parooze the archive, you can put it into your MFS ( ipfs files cp $(ipfs name resolve /ipns/games-archive.stormux.org) /games-archive ``` -Now you can do ipfs ls /games-archive instead of a longer path. +Now you can do ipfs files ls /games-archive instead of a longer path. ### Syncing the Archive