Skip to content

Commit

Permalink
docs: document environment variables
Browse files Browse the repository at this point in the history
fixes #5828

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Apr 26, 2019
1 parent fc1832f commit 8dec510
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 33 deletions.
89 changes: 89 additions & 0 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# go-ipfs environment variables

## `LIBP2P_TCP_REUSEPORT` (`IPFS_REUSEPORT`)

go-ipfs tries to reuse the same source port for all connections to improve NAT
traversal. If this is an issue, you can disable it by setting
`LIBP2P_TCP_REUSEPORT` to false.

This variable was previously `IPFS_REUSEPORT`.

Default: true

## `IPFS_PATH`

Sets the location of the IPFS repo (where the config, blocks, etc.
are stored).

Default: ~/.ipfs

## `IPFS_LOGGING`

Sets the log level for go-ipfs. It can be set to one of:

* `CRITICAL`
* `ERROR`
* `WARNING`
* `NOTICE`
* `INFO`
* `DEBUG`

Logging can also be configured (on a subsystem by subsystem basis) at runtime
with the `ipfs log` command.

Default: `ERROR`

## `IPFS_LOGGING_FMT`

Sets the log message format. Can be one of:

* `color`
* `nocolor`

Default: `color`

## `GOLOG_FILE`

Sets the file to which go-ipfs logs. By default, go-ipfs logs to standard error.

## `GOLOG_TRACING_FILE`

Sets the file to which go-ipfs sends tracing events. By default, tracing is
disabled.

This log can be read at runtime (without writing it to a file) using the `ipfs
log tail` command.

Warning: Enabling tracing will likely affect performance.

## `IPFS_FUSE_DEBUG`

Enables fuse debug logging.

Default: false

## `YAMUX_DEBUG`

Enables debug logging for the yamux stream muxer.

Default: false

## `IPFS_FD_MAX`

Sets the file descriptor limit for go-ipfs. If go-ipfs fails to set the file
descriptor limit, it will log an error.

Defaults: 2048

## `IPFS_DIST_PATH`

URL from which go-ipfs fetches repo migrations (when the daemon is launched with
the `--migrate` flag).

Default: https://ipfs.io/ipfs/$something (depends on the IPFS version)

## `LIBP2P_MUX_PREFS`

Tells go-ipfs which multiplexers to use in which order.

Default: "/yamux/1.0.0 /mplex/6.7.0"
34 changes: 1 addition & 33 deletions docs/experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,51 +104,19 @@ bandwidth than the others, but is lacking on congestion control and backpressure
logic. It is available to try out and experiment with.

### State
Experimental
Stable

### In Version
0.4.5

### How to enable
run your daemon with `--enable-mplex-experiment`

To make it the default stream muxer, set the environment variable
`LIBP2P_MUX_PREFS` as follows:
```
export LIBP2P_MUX_PREFS="/mplex/6.7.0 /yamux/1.0.0 /spdy/3.1.0"
```

To check which stream muxer is being used between any two given peers, check the
json output of the `ipfs swarm peers` command, you'll see something like this:
```
$ ipfs swarm peers -v --enc=json | jq .
{
"Peers": [
{
"Addr": "/ip4/104.131.131.82/tcp/4001",
"Peer": "QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
"Latency": "46.032624ms",
"Muxer": "*peerstream_multiplex.conn",
"Streams": [
{
"Protocol": "/ipfs/bitswap/1.1.0"
},
{
"Protocol": "/ipfs/kad/1.0.0"
},
{
"Protocol": "/ipfs/kad/1.0.0"
}
]
},
{
...
```

### Road to being a real feature
- [ ] Significant real world testing and performance metrics across a wide
variety of workloads showing that it works well.

---

## Raw Leaves for unixfs files
Expand Down

0 comments on commit 8dec510

Please sign in to comment.