2019-02-12 19:32:40 +01:00
|
|
|
[Unit]
|
|
|
|
Description=IPFS daemon
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
2019-03-26 21:05:52 +01:00
|
|
|
ExecStart=/home/mikaela/go/bin/ipfs daemon --routing=dhtclient --enable-gc --enable-namesys-pubsub
|
|
|
|
# My attempts at explaining flags above + --mount for fuse
|
2019-03-26 21:26:25 +01:00
|
|
|
# --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.
|
2019-03-26 21:05:52 +01:00
|
|
|
# --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
|
2019-04-23 12:51:18 +02:00
|
|
|
# ipfs config --json Swarm.ConnMgr.HighWater 40 - attempt to stay below 40
|
2019-03-26 21:05:52 +01:00
|
|
|
# connections
|
2019-04-23 12:51:18 +02:00
|
|
|
# ipfs config --json Swarm.ConnMgr.LowWater 20 - attempt to keep at least
|
|
|
|
# 20 connections
|
2019-03-26 21:05:52 +01:00
|
|
|
# ipfs config --json Swarm.EnableAutoRelay true - if impassable NAT is
|
|
|
|
# detected, connect to the network through relays that have configured
|
2019-03-26 21:26:25 +01:00
|
|
|
# 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
|
2019-03-26 21:05:52 +01:00
|
|
|
#
|
2019-04-23 12:51:18 +02:00
|
|
|
# I am using badger datastore.
|
|
|
|
#
|
2019-03-26 21:05:52 +01:00
|
|
|
# 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.
|
|
|
|
#
|
2019-02-12 19:32:40 +01:00
|
|
|
Restart=on-failure
|
|
|
|
User=mikaela
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=default.target
|