Update IPFS guide
This commit is contained in:
parent
4ace00736b
commit
47508e7969
1 changed files with 9 additions and 7 deletions
16
docs/ipfs.md
16
docs/ipfs.md
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This guide explains how to run IPFS node in resource-constrained environment (such as cheap VPS or single-board computer).
|
This guide explains how to run IPFS node in resource-constrained environment (such as cheap VPS or single-board computer).
|
||||||
|
|
||||||
The recommended IPFS implementation is [go-ipfs](https://github.com/ipfs/go-ipfs), version 0.12 or higher. Normally go-ipfs requires at least 2 GB RAM, but after tweaking it can run on a machine with only 512 MB.
|
The recommended IPFS implementation is [kubo](https://github.com/ipfs/kubo), version 0.18.1 or higher. Normally **kubo** requires at least 2 GB RAM, but after tweaking it can run on a machine with only 512 MB.
|
||||||
|
|
||||||
## Configuration profiles
|
## Configuration profiles
|
||||||
|
|
||||||
|
@ -14,24 +14,26 @@ ipfs init --profile server
|
||||||
|
|
||||||
If you're running it on single-board computer, the recommended profile is `lowpower`.
|
If you're running it on single-board computer, the recommended profile is `lowpower`.
|
||||||
|
|
||||||
Documentation on configuration profiles: https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#profiles.
|
Documentation on configuration profiles: https://github.com/ipfs/kubo/blob/master/docs/config.md#profiles
|
||||||
|
|
||||||
## Configuration options
|
## Configuration options
|
||||||
|
|
||||||
- `Datastore.StorageMax`. Recommended value is `1G`.
|
- `Datastore.StorageMax`. Recommended value is `1G`.
|
||||||
- `Gateway.NoFetch`. Configures gateway to not fetch files from the network. Recommended value is `true`.
|
- `Gateway.NoFetch`. Configures gateway to not fetch files from the network. Recommended value is `true`.
|
||||||
- `RelayService.Enabled`. Enables providing p2p relay service to other peers on the network. Recommended value is `false`.
|
|
||||||
- `Routing.Type`. Should be set to `dht` otherwise the node will not respond to requests from other peers.
|
- `Routing.Type`. Should be set to `dht` otherwise the node will not respond to requests from other peers.
|
||||||
- `Swarm.ConnMgr.LowWater`. Recommended value is `10`.
|
- `Swarm.ConnMgr.LowWater`. Recommended value is `10`.
|
||||||
- `Swarm.ConnMgr.HighWater`. Recommended value is `20`.
|
- `Swarm.ConnMgr.HighWater`. Recommended value is `20`.
|
||||||
- `Swarm.ConnMgr.GracePeriod`. Recommended value is `15s`.
|
- `Swarm.ConnMgr.GracePeriod`. Recommended value is `15s`.
|
||||||
- `Swarm.DisableBandwidthMetrics`. Disabling bandwidth metrics can slightly improve performance. Recommended value is `true`.
|
- `Swarm.DisableBandwidthMetrics`. Disabling bandwidth metrics can slightly improve performance. Recommended value is `true`.
|
||||||
|
- `Swarm.RelayService.Enabled`. Enables providing p2p relay service to other peers on the network. Recommended value is `false`.
|
||||||
|
- `Swarm.ResourceMgr.Enabled`. Enables the libp2p Resource Manager. Recommended value is `true`.
|
||||||
|
- `Swarm.ResourceMgr.MaxMemory`. Recommended value is `150MB`.
|
||||||
|
|
||||||
Documentation: https://github.com/ipfs/go-ipfs/blob/master/docs/config.md
|
Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md
|
||||||
|
|
||||||
## Systemd service
|
## Systemd service
|
||||||
|
|
||||||
When go-ipfs starts, its memory usage is around 100 MB and then it slowly increases. To keep memory usage within reasonable bounds the service needs to be restarted regularly.
|
When **kubo** starts, its memory usage is around 100 MB and then it slowly increases, often beyond the Resource Manager's limit. To keep memory usage within reasonable bounds the service needs to be restarted regularly.
|
||||||
|
|
||||||
This can be achieved by using systemd process supervison features:
|
This can be achieved by using systemd process supervison features:
|
||||||
|
|
||||||
|
@ -44,8 +46,8 @@ ExecStart=/usr/local/bin/ipfs daemon
|
||||||
User=ipfs
|
User=ipfs
|
||||||
Group=ipfs
|
Group=ipfs
|
||||||
|
|
||||||
# Terminate service every 20 minutes and restart automatically
|
# Terminate service every 30 minutes and restart automatically
|
||||||
RuntimeMaxSec=1200
|
RuntimeMaxSec=1800
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
# Specify the absolute limit on memory usage
|
# Specify the absolute limit on memory usage
|
||||||
|
|
Loading…
Reference in a new issue