Skip to content

Commit

Permalink
Close-edited @lidel additions
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicaschilling committed Jan 6, 2021
1 parent ccbb23b commit d965c04
Showing 1 changed file with 35 additions and 26 deletions.
61 changes: 35 additions & 26 deletions docs/how-to/companion-node-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ description: Learn about the available node types in IPFS Companion.

# Understand node types in IPFS Companion

Available node types depend on a browser vendor, the full list is:
IPFS Companion's preferences screen allows you to choose from several different node types. The full list of available types you'll see in your Companion preferences depends on the browser you're using (i.e. Firefox, Chrome, Brave), but the full list is as follows:

[[toc]]

![Screenshot of node type switch](./images/node-type-switch.png)

When in doubt, use the _External_ node type running on your localhost. Some options for doing so:
**More information on each node type is below, but when in doubt, choose the _External_ node type and run an IPFS node on your local machine.** Some options for doing so:

- Use the [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) GUI app (for Windows/Linux/Mac), which installs and manages a local IPFS node for you
- Use the [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) app (for Windows/Linux/Mac), which installs and manages a local IPFS node for you as well as offering an easy, convenient user interface for managing files, peers, and more
- If you prefer a more hands-on approach:
- Install IPFS by following the [command line quick-start guide](command-line-quick-start.md)
- Or run it in [Docker](https://github.com/ipfs/go-ipfs#running-ipfs-inside-docker)
Expand All @@ -22,52 +22,60 @@ Or, if [Brave](https://brave.com/) is your browser of choice, you can use the ea

## External

An _external_ node can be any instance of an IPFS daemon that runs outside of a web browser process and exposes _Gateway_ and writable _API_ over HTTP at TCP ports.
An _external_ node can be any instance of an IPFS daemon that:

At this time, the [go-ipfs](https://github.com/ipfs/go-ipfs) daemon is the 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 the background all the time).
- Runs outside of your web browser
- Exposes a _gateway_ and writeable _API_ over HTTP at TCP ports

A good practice is to run it on localhost (`127.0.0.1`), as it provides:
At this time, the [go-ipfs](https://github.com/ipfs/go-ipfs) implementation of IPFS is the recommended choice of daemon for running an external node. It is easier on CPU than other implementations, and provides `dhtclient` mode, which decreases ambient bandwidth use and reduces battery drain (key qualities for something that is expected to run in the background all the time).

A good practice is to run your go-ipfs daemon on localhost (`127.0.0.1`), as it provides:

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

As noted above, you can get started with running a go-ipfs node on your local machine in several ways:

Don't know where to start? See the [command line quick-start guide](command-line-quick-start.md).
- Download [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop), which installs and manages a local node for you as well as offering an easy, convenient user interface for managing files, peers, and more
- If you're comfortable with the command line and don't need the convenience of the IPFS Desktop UI, follow the directions in the [command line quick-start guide](command-line-quick-start.md)
- Docker fans can run and use go-ipfs from [inside a Docker container](https://github.com/ipfs/go-ipfs#running-ipfs-inside-docker)

## Native

### Provided by Brave

Users of the [Brave](https://brave.com/) browser can enable native support for IPFS using a go-ipfs node built directly into the browser itself. This is a great way to experiment with IPFS without having to install or run IPFS Desktop or an IPFS daemon.
Users of the [Brave](https://brave.com/) browser can enable native support for IPFS using a go-ipfs node built directly into the browser itself. This is a great way to experiment with IPFS without having to install or run IPFS Desktop or the command-line daemon.

This node type brings the same benefits as [External](#external) one, with additional Brave features:
This node type offers the same benefits as an [external](#external) node, with additional features provided within Brave itself:

- Native URI support: `ipfs://` and `ipns://`
- Native support for `ipfs://` and `ipns://` URIs:
- Built-in fallback to a public gateway
- Ability to change your preferred public gateway from Brave's settings page
- Options for default resolution of IPFS resources: through a public gateway, through a local node, or asking each time
- Node is managed by the browser itself
- Brave takes care of go-ipfs updates and migrations
- Node is only running when you're running your copy of Brave
- The power button in IPFS Companion menu can be used for starting and stopping the node
- The IPFS node is managed by Brave itself:
- Automatic go-ipfs updates and migrations
- Your node is only running when you're running your copy of Brave
- You can start/stop your Brave-based node by clicking the power button icon in IPFS Companion's main menu

::: tip Useful pages
::: tip TOOLS FOR BRAVE USERS

- `ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi` a popular URI for triggering and testing native support
- `brave://settings/extensions` one-click Companion install and URI resolution settings
- `brave://ipfs` the status of go-ipfs managed by Brave
- `ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi`
Popular URI for triggering and testing native IPFS support
- `brave://settings/extensions`
One-click Companion install and URI resolution settings
- `brave://ipfs`
Status page for Brave's built-in go-ipfs node

:::

## Embedded

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

::: warning

This node type is only for development and experimentation.
Regular users should use [native](#native) or [external node type](#external) instead.
This node type is only for development and experimentation. Most users should use [external](#external) or [native](#native) node types instead.

:::

Expand All @@ -76,8 +84,7 @@ Power users can provide [custom config](https://github.com/ipfs/js-ipfs#faq) (e.
**Note:** At present, embedded js-ipfs running within webextension (browser context) comes with some limitations:

- Can't act as an HTTP gateway (extension uses public one as a fallback)
- Known to be CPU-hungry
([#450](https://github.com/ipfs-shipyard/ipfs-companion/issues/450), [ipfs/js-ipfs#1190](https://github.com/ipfs/js-ipfs/issues/1190)) over time, which may drain your battery
- Known to be CPU-hungry ([#450](https://github.com/ipfs-shipyard/ipfs-companion/issues/450), [ipfs/js-ipfs#1190](https://github.com/ipfs/js-ipfs/issues/1190)) over time, which may drain your battery
- Missing DHT ([js-ipfs/#856](https://github.com/ipfs/js-ipfs/pull/856))
- Default transports limited to websockets ([js-ipfs/#1088](https://github.com/ipfs/js-ipfs/issues/1088))
- Lack of connection closing ([ipfs/js-ipfs#962](https://github.com/ipfs/js-ipfs/issues/962))
Expand All @@ -90,4 +97,6 @@ This node type has been deprecated and is no longer supported by Chromium browse

## Public

A _public_ node is not a part of the toggle UI. It is used as an implicit fallback for its gateway functionality when an external node is offline or an embedded node is used. It does not expose the API port.
A _public_ node is used as an implicit fallback for gateway functionality when an external node is offline or an embedded node is used. It does not expose the API port.

Because it's a fallback, it's not included as an option in Companion's preferences.

0 comments on commit d965c04

Please sign in to comment.