shell-things/etc/systemd/system/ipfs.service
Mikaela Suomalainen ce84c26bcd
ipfs.service: adapt lowpower profile & mention badgerds
If the lowpower option uses values 40 and 20 which are a lot higher than
mine were and considered suitable for laptops and smartphones, I guess
they are the best for me to use and I find content faster.
2019-04-23 13:51:18 +03:00

49 lines
2.1 KiB
Desktop File

[Unit]
Description=IPFS daemon
After=network.target
[Service]
ExecStart=/home/mikaela/go/bin/ipfs daemon --routing=dhtclient --enable-gc --enable-namesys-pubsub
# My attempts at explaining flags above + --mount for fuse
# --mount - fuse for /ipfs and /ipns, see
# https://github.com/ipfs/go-ipfs/blob/master/docs/fuse.md as it requires
# some specific config, I am not setting it as default here.
# --routing=dhtclient - not serving requests to the network saving bandwidth
# --enable-gc - automatic cleaning of unpinned files per rules in ipfs
# config, I think by default two hours or when the repo gets bigger than
# 10G
# --enable-namesys-pubsub - real time previously cached ipns updates
#
# My specific config:
# ipfs config Reprovider.Strategy pinned - advertise only pinned files
# to the network to reduce connections instead of also cached content
# (which they will still be able to download, see ipfs/go-ipfs#4145)
# ipfs config Swarm.ConnMgr.GracePeriod 1s - to get rid of excess
# connections quickly
# ipfs config --json Swarm.ConnMgr.HighWater 40 - attempt to stay below 40
# connections
# ipfs config --json Swarm.ConnMgr.LowWater 20 - attempt to keep at least
# 20 connections
# ipfs config --json Swarm.EnableAutoRelay true - if impassable NAT is
# detected, connect to the network through relays that have configured
# themselves as open (EnableAutoNATService & EnableRelayHop?)
# ipfs config --json Experimental.QUIC true - QUIC support, remember to
# edit swarm addresses to include /ip4/0.0.0.0/udp/4001/quic
# /ip6/::/udp/4001/quic
# ipfs config --json Experimental.FilestoreEnabled true - for ipfs add
# --nocopy to not store the content twice on disc
#
# I am using badger datastore.
#
# Extra: to disable IPv4 connections:
# ipfs swarm filters add /ip4/0.0.0.0/ipcidr/0
# However I think this may do more harm than good, especially if the
# other config options above (especially Reprovider.Strategy pinned) keep
# amount of connection tolerable and won't cause issues.
#
Restart=on-failure
User=mikaela
[Install]
WantedBy=default.target