Notes on IPFS
14 Nov 2022 | 0 minutes to read# add file to ipfs
echo "Hello, world!" > hello.txt
ipfs add hello.txt
# publishes using node public key
ipfs name publish <CID>
# edit file
echo "Hello IPFS!" > hello.txt
# add again, then publish
ipfs add hello.txt
ipfs name publish <New CID>
# View file at
# https://gateway.ipfs.io/ipns/k51qzi5uqu5dkkciu33khkzbcmxtyhn376i1e83tya8kuy7z9euedzyr5nhoew
initial setup process #
- generate new key
/api/v0/key/gen
- Import any other keys
/api/v0/key/import
- Add other nodes
/api/v0/swarm/peering/add
- add remote pinning services (optional)
/api/v0/pin/remote/service/add
- publish ipns address for item
/api/v0/name/publish
normal operation #
- Pin item
/api/v0/pin/add
- Verify pins
/api/v0/pin/verify
- export pins
/api/v0/pin/ls
- grab list of peers
/api/v0/swarm/peering/ls