Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ilovelili/693de62a7b76d54a224b649a6a9e2662 to your computer and use it in GitHub Desktop.
Save ilovelili/693de62a7b76d54a224b649a6a9e2662 to your computer and use it in GitHub Desktop.
Hosting IPFS node with ngrok

Hosting IPFS from behind NAT/Firewall using a free reverse proxy (ngrok)

  1. Expose localhost's port 4001 to public internet using ngrok: ngrok tcp 4001. Tip: Use -region= flag for lower latency.
  2. Note the hostname and port returned by ngrok in the form: tcp://hostname:port -> localhost:4001
  3. Open the ipfs config json file ~/.ipfs/config
  4. Edit as follows: Addresses.Announce=["/dns4/put-the-hostname-here/tcp/put-the-port-here"]
  5. Save the config file
  6. ipfs daemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment