SDP offers different services to its members.
SDPFS is Social Dist0rtion Protocol File System. SDFPS is a private network of IPFS nodes. The network is private because we might share information about the future that would modify the course of events, causing a fork of our current branch of reality.
Download the latest IPFS version from:
Unpack it, run ./install.sh
or put it somewhere in your $PATH
.
Create the sdpfs
command by copying this script somewhere in your $PATH
:
#!/usr/bin/env bash
LIBP2P_FORCE_PNET=1 IPFS_PATH=~/.sdp/ipfs ipfs "$@"
Create the home directory for sdpfs
mkdir -p .sdp/ipfs
Get the swarm key from another member and put it in ~/.sdp/ipfs/swarm.key
.
Now run the following:
# Init the sdpfs repository
sdpfs init
# Enable experimental feature to not duplicate files
sdpfs config --json Experimental.FilestoreEnabled true
# Remove the bootstrap nodes, we have a private network
sdpfs bootstrap rm --all
# Add a new bootstrap endpoint
sdpfs bootstrap add /ip4/138.201.174.111/tcp/4001/ipfs/QmYuqXRt6HGEnD8vp5bcrDQJdhwt9q9innSWfU35d62qWD
Now you can use sdpfs as you would use ipfs. For example if you want to start the daemon run:
sdpfs daemon
And visit a member homepage by opening this friendly URL:
You don't need to to this, someone else did it already.
A private network needs a pre-shared secret called swarm key. The key is generated once and shared across all members' nodes. To generate the key, run:
echo -e "/key/swarm/psk/1.0.0/\n/base16/\n`tr -dc 'a-f0-9' < /dev/urandom | head -c64`" > ~/.sdp/ipfs/swarm.key
Then share ~/.sdp/ipfs/swarm.key
with SDP members.
curl https://ipfs.io/api/v0/get/Qmexhq2sBHnXQbvyP2GfUdbnY7HCagH2Mw5vUNSBn2nxip | tar -xf -
sdpfs add -r Qmexhq2sBHnXQbvyP2GfUdbnY7HCagH2Mw5vUNSBn2nxip