Hosting IPFS from behind NAT/Firewall using a free reverse proxy (ngrok)
- Expose localhost's port 4001 to public internet using ngrok:
ngrok tcp 4001. Tip: Use -region= flag for lower latency. - Note the hostname and port returned by ngrok in the form:
tcp://hostname:port -> localhost:4001 - Open the ipfs config json file
~/.ipfs/config - Edit as follows: Addresses.Announce=["/dns4/put-the-hostname-here/tcp/put-the-port-here"]
- Save the config file
ipfs daemon
Is
put-the-hostname-hererefers to IP address of the host?