|
|
|
@ -38,6 +38,8 @@ Now you can use ipfs command as normal:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ ipfs-daemon
|
|
|
|
|
$ ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
|
|
|
|
|
|
|
|
|
|
$ ipfs id
|
|
|
|
|
$ ipfs swarm addrs --local
|
|
|
|
|
$ ipfs pin ls -q --type recursive
|
|
|
|
@ -60,6 +62,39 @@ $ curl -s https://ipfs.io/ipfs/Qmdd7jNjEM4RXEnG8Y4ZikaqN6PUJkZ6bZuJZySEaFcuqY/do
|
|
|
|
|
03f9ccb5d2a0e88acb60188e627042ef143c7fe5426c883863e78e66dab908d7 -
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Sharing stuff
|
|
|
|
|
|
|
|
|
|
To make sure your stuff gets shared across IPFS peers well, you need to make
|
|
|
|
|
sure your ipfs-daemon listening on 4001/tcp port is accessible from the WAN.
|
|
|
|
|
|
|
|
|
|
Either configure your router to foward the traffic coming to 4001/tcp to your
|
|
|
|
|
internal server/pc where your ipfs-daemon is running or just punch a port using
|
|
|
|
|
the UPnP protocol like this:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ sudo apt-get -y install miniupnpc
|
|
|
|
|
$ upnpc -r 4001 tcp
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> Your IGD (router/GW) must support UPnP for this to work.
|
|
|
|
|
|
|
|
|
|
After that you should see lots of traffic is coming to your port 4001/tcp:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
sudo tcpdump -qenn -i eno1 src port 4001 and not src host 192.168
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
And ipfs reports lots of peers (>100 peers):
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
ipfs swarm peers
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then, when you've shared some stuff via the IPFS, you can try accessing it via
|
|
|
|
|
any available public IPFS gateway (see link below).
|
|
|
|
|
|
|
|
|
|
It should return the content you've shared quickly.
|
|
|
|
|
|
|
|
|
|
### Links
|
|
|
|
|
|
|
|
|
|
- https://ipfs.github.io/public-gateway-checker/
|
|
|
|
|