I’d recommend looking at the Getting Started page on ipfs.io if you haven’t already.
Here’s an example of how you’d share files between computers assuming ipfs is already installed in the path on each machine, the repos have been initialized ipfs init
, and there’s a daemon running on each computer (ipfs daemon
).
Source:
ipfs add path/to/file
or ipfs add -r /path/to/directory
. You might want to consider the -w
option to wrap the content in another directory to preserve the top level’s original name.
Receiver:
ipfs get <hash>
or ipfs pin add <hash>
or ipfs cat <hash>
where <hash>
is the multihash output from the command above run on the source.
Note that unless you send someone else the content’s hash it’s unlikely they will be able to retrieve the files as well, though I think it’s possible to sniff the DHT traffic that your machines send out to the swarm to potentially get it without you explicitly sharing it. If you wanted to set up a private network, see this discussion.