---
# System prepended metadata

title: Shared node configuration

---

# Shared node configuration

### Problem 

Sharing nodes across browsing contexts / tabs (see [#3022](https://github.com/ipfs/js-ipfs/issues/3022)) implies sharing / consensus on configuration. That is also challenge facing native IPFS support in browsers. Also a thing that came up in the past with Textile Desktop / Radicle / IPFS Desktop
- https://github.com/ipfs/notes/issues/390
- https://github.com/radicle-dev/radicle/issues/677
- https://github.com/textileio/desktop/issues/50

### Goal

Lets figure out how to make IPFS in browser be adaptable to the environment it's running so it can use best possible configuration given conditions as opposed to making that embedders burnden. In practice things are complicated bet let's aim to:

1. Move configuration option into API call option, when possible _(Consider how to make that a possiblity when it is not the case)_.
2. Consider who is in charge of which option. E.g. some choices should concern end user rather than an embedder _(and likely are not app specific)_. 



[config notes]:https://via.hypothes.is/https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md



## Attendees

- @gozala
- @lidel
- @achingbrain
- @jacobheun

### Config Table



| option                                      | drop | default          | comment                                                      |
| ------------------------------------------- | ---- | ---------------- | ------------------------------------------------------------ |
| `repo`                                      | Yes  | `'ipfs'`         | Needs to verify with users                                   |
| `repoAutoMigrate`                           | Yes  | `true`           | Can we do per MFS ?a                                         |
| `init.empty`                                | Yes  | `false`          | Probably can have `ipfs.clear()` to clear app data           |
| `init.bits`, `init.privateKey`, `init.pass` | Yes   |                  | Guessing passing keys is common. Can we find a way to drop this ? |
| `start`                                     | Yes  | `true`           | Chances are shared node is already started.                  |
| `pass`                                      | 🤷‍♂️   |                  | Seems like this should be between IPFS and user & note between App and user. |
| `silent`                                    | Yes  | `false`          | Should probably have `ipfs.setLogLevel(0)` or something that can be changed at runtime. |
| `relay.enabled`                             | Yes  | `true`           | What would be a reason to disable this ?                     |
| `relay.hop`                                 | Yes  | `null`           | Does not seem revenant in browser.                           |
| `options.offline`                           | Yes  | `false`          | Should be option passed to API calls                         |
| `options.preload`                           | Yes  | `false`          | Should probably be moved                                     |
| `EXPERIMENTAL.ipnsPubsub`                   | Yes  | 🤷‍♂️               | Should probably opt-in during IPNS publish                   |
| `EXPERIMENTAL.sharding`                     | Yes  | `false`          | Should probably move to `ipfs.add` instead.                  |
| `config.Profiles` | Yes  | `null` | Seems like user choice |
| `config.Addresses.API` | Yes  | `null`| Probably out of scope for in-browser  |
| `config.Addresses.Delegates` | Yes  | `null`| Might be useful to have a way to add those, but probably config for embedder it |
| `config.Addresses.Gateway` | Yes  | `null`|  N/A |
| `config.Addresses.Swarm` | 🤔   | `null`|  |
| `config.Bootstrap` | Yes   | `null`| Mechanism for adding those would be nice. User setting though not embedder |
| `config.Datastore` | Yes  | `null`|  |
| `config.Discovery` | Yes  | `null`| Seems like **advanced user** setting at best |
| `config.Identity` | Yes  | `null`|  |
| `config.Keychain` | Yes  | `null`|  |
| `config.Pubsub` | Yes  | `null`|  |
| `config.Swarm` | 🤔  | `null`|  |
| `ipld`                                      | 🤔    |                  | Custom formats are used by Textile. Should have a way to load them. |
| `libp2p`                                    | Yes  | 🤷‍♂️               | Browser make best choices given the environment. Some options should probably move to API calls. |
| `Addresses.Swarm`                           | 🤷‍♂️   | `[]`             |                                                              |
| `Discovery.MDNS`                            | Yes  |                  | Should leverage IPFS Desktop                                 |
| `Discovery.webRTCStar`                      | Yes  | `false`          | Can't do in SharedWorker yet.                                |
| `Bootstrap`                                 | Yes  | 🤷‍♂️               | Probably need API for adding but with user consent. Maybe visiting bootstrap node could offer adding itself ? |
| `Pubsub`                                    | Yes  | `{Enabled:true}` | Maybe individual call should opt-out ?                       |
| `Swarm`                                     | Yes  | 🤔                | Should probably intelligently adapt to conditions.           |



## Notes

