Skip to content

Commit 92c88b0

Browse files
authored
Merge pull request #6268 from ipfs/doc/environment
docs: document environment variables
2 parents 6b72593 + 4aa7076 commit 92c88b0

File tree

2 files changed

+90
-33
lines changed

2 files changed

+90
-33
lines changed

docs/environment-variables.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# go-ipfs environment variables
2+
3+
## `LIBP2P_TCP_REUSEPORT` (`IPFS_REUSEPORT`)
4+
5+
go-ipfs tries to reuse the same source port for all connections to improve NAT
6+
traversal. If this is an issue, you can disable it by setting
7+
`LIBP2P_TCP_REUSEPORT` to false.
8+
9+
This variable was previously `IPFS_REUSEPORT`.
10+
11+
Default: true
12+
13+
## `IPFS_PATH`
14+
15+
Sets the location of the IPFS repo (where the config, blocks, etc.
16+
are stored).
17+
18+
Default: ~/.ipfs
19+
20+
## `IPFS_LOGGING`
21+
22+
Sets the log level for go-ipfs. It can be set to one of:
23+
24+
* `CRITICAL`
25+
* `ERROR`
26+
* `WARNING`
27+
* `NOTICE`
28+
* `INFO`
29+
* `DEBUG`
30+
31+
Logging can also be configured (on a subsystem by subsystem basis) at runtime
32+
with the `ipfs log` command.
33+
34+
Default: `ERROR`
35+
36+
## `IPFS_LOGGING_FMT`
37+
38+
Sets the log message format. Can be one of:
39+
40+
* `color`
41+
* `nocolor`
42+
43+
Default: `color`
44+
45+
## `GOLOG_FILE`
46+
47+
Sets the file to which go-ipfs logs. By default, go-ipfs logs to standard error.
48+
49+
## `GOLOG_TRACING_FILE`
50+
51+
Sets the file to which go-ipfs sends tracing events. By default, tracing is
52+
disabled.
53+
54+
This log can be read at runtime (without writing it to a file) using the `ipfs
55+
log tail` command.
56+
57+
Warning: Enabling tracing will likely affect performance.
58+
59+
## `IPFS_FUSE_DEBUG`
60+
61+
Enables fuse debug logging.
62+
63+
Default: false
64+
65+
## `YAMUX_DEBUG`
66+
67+
Enables debug logging for the yamux stream muxer.
68+
69+
Default: false
70+
71+
## `IPFS_FD_MAX`
72+
73+
Sets the file descriptor limit for go-ipfs. If go-ipfs fails to set the file
74+
descriptor limit, it will log an error.
75+
76+
Defaults: 2048
77+
78+
## `IPFS_DIST_PATH`
79+
80+
URL from which go-ipfs fetches repo migrations (when the daemon is launched with
81+
the `--migrate` flag).
82+
83+
Default: https://ipfs.io/ipfs/$something (depends on the IPFS version)
84+
85+
## `LIBP2P_MUX_PREFS`
86+
87+
Tells go-ipfs which multiplexers to use in which order.
88+
89+
Default: "/yamux/1.0.0 /mplex/6.7.0"

docs/experimental-features.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -104,51 +104,19 @@ bandwidth than the others, but is lacking on congestion control and backpressure
104104
logic. It is available to try out and experiment with.
105105

106106
### State
107-
Experimental
107+
Stable
108108

109109
### In Version
110110
0.4.5
111111

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

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

121-
To check which stream muxer is being used between any two given peers, check the
122-
json output of the `ipfs swarm peers` command, you'll see something like this:
123-
```
124-
$ ipfs swarm peers -v --enc=json | jq .
125-
{
126-
"Peers": [
127-
{
128-
"Addr": "/ip4/104.131.131.82/tcp/4001",
129-
"Peer": "QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
130-
"Latency": "46.032624ms",
131-
"Muxer": "*peerstream_multiplex.conn",
132-
"Streams": [
133-
{
134-
"Protocol": "/ipfs/bitswap/1.1.0"
135-
},
136-
{
137-
"Protocol": "/ipfs/kad/1.0.0"
138-
},
139-
{
140-
"Protocol": "/ipfs/kad/1.0.0"
141-
}
142-
]
143-
},
144-
{
145-
...
146-
```
147-
148-
### Road to being a real feature
149-
- [ ] Significant real world testing and performance metrics across a wide
150-
variety of workloads showing that it works well.
151-
152120
---
153121

154122
## Raw Leaves for unixfs files

0 commit comments

Comments
 (0)