Skip to content

Latest commit

 

History

History
95 lines (65 loc) · 4.5 KB

node-types.md

File metadata and controls

95 lines (65 loc) · 4.5 KB

Node Types in IPFS Companion

screenshot of node type switch

Available node types:

TL;DR

When in doubt, use External node running on your localhost:

  • IPFS Desktop is a GUI app for Windows/Linux/Mac that installs and manages local IPFS node for you
  • If you prefer more hands-on approach:
  • If you are using Brave, feel free to experiment with Embedded + chrome.sockets.
    You can always switch back to External with local IPFS Desktop

🛰️ External

External node can be any instance of IPFS daemon that runs outside of web browser process and exposes Gateway and writable API over HTTP at TCP ports.

At this time go-ipfs daemon is preferred implementation. It is easier on CPU and provides dhtclient mode which decreases ambient bandwidth use and smaller battery drain (key characteristics of something that is expected to run in background all the time).

A good practice is to run it on localhost (127.0.0.1) as it provides:

  • Increased security (native IPFS used as end-to-end transport)
  • Better UX in web browser (no mixed-content warnings)
  • Improved performance (local loopback is used, no network overhead)

Don't know where to start? See Getting Started instructions.

🏗️ Embedded

Embedded node is a js-ipfs instance running in browser (in-memory), without need for any external software.

It is a work in progress but can be used for development and experimentation eg. for testing a dapp that uses window.ipfs without having to install and start up your own IPFS daemon.

Power users can provide custom config (eg. to enable experimental pubsub) via Preferences

Note: at the time this note was created, Embedded js-ipfs running within webextension (browser context) comes with some limitations:

When in doubt, run go-ipfs as External node instead.

🦄 Embedded + chrome.sockets

This node type replaces regular Embedded type if browser vendor granted us access to chrome.sockets APIs.
Those powerful APIs enable embedded js-ipfs to provide true p2p experience without the need for external daemon:

🚪 HTTP Gateway

  • access IPFS resources over HTTP without relying on a public gateway
  • automatically picks a free localhost port

🚄 TCP transport

  • embedded js-ipfs is able to connect to go-ipfs
  • go-ipfs is able to connect to embedded js-ipfs

🔮 Local Discovery (mDNS/DNS-SD)

  • embedded node discovers go-ipfs in LAN and automatically connects to it

Note: this is still work in progress, see Embedded JS-IPFS in Brave for the current status.

🌐 Public

Public node is not a part of the toggle UI. It is used as an implicit fallback for its Gateway functionality when External node is offline or Embedded node is used. It does not expose API port.