File tree Expand file tree Collapse file tree 2 files changed +10
-18
lines changed Expand file tree Collapse file tree 2 files changed +10
-18
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ ProtectHome=true
50
50
RemoveIPC =true
51
51
RestrictSUIDSGID =true
52
52
CapabilityBoundingSet =CAP_NET_BIND_SERVICE
53
+ # set memory limit to avoid taking all the CRN ressource and getting OOM
54
+ # https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgrmaxmemory
55
+ Environment =GOMEMLIMIT =1900m
56
+ MemoryHigh =2G
57
+ MemoryMax =4G
53
58
54
59
# enable for 1-1024 port listening
55
60
#AmbientCapabilities=CAP_NET_BIND_SERVICE
@@ -76,7 +81,11 @@ Type=notify
76
81
User =ipfs
77
82
Group =ipfs
78
83
Environment =IPFS_PATH ="/var/lib/ipfs"
79
- ExecStart =/opt/kubo/ipfs daemon --init --migrate --init-profile =server --config-file /etc/ipfs/kubo.json
84
+ ExecStartPre =/opt/kubo/ipfs init
85
+ ExecStartPre =/opt/kubo/ipfs config --json Gateway.PublicGateways '{"localhost": {"UseSubdomains": false, "Paths": ["/ipfs", "/ipns"]}}'
86
+ ExecStartPre =/opt/kubo/ipfs config --json Reprovider.Strategy '"roots"'
87
+ ExecStartPre =/opt/kubo/ipfs config --json Swarm.ResourceMgr '{"MaxMemory" : "1GB"}'
88
+ ExecStart =/opt/kubo/ipfs daemon --migrate =true --init-profile =server
80
89
Restart =on-failure
81
90
KillSignal =SIGINT
82
91
You can’t perform that action at this time.
0 commit comments