Skip to content

Instantly share code, notes, and snippets.

@christroutner
Forked from lordcirth/ipfs.service
Created October 10, 2019 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christroutner/8f5ab5efc219c8938ec9da86ee254108 to your computer and use it in GitHub Desktop.
Save christroutner/8f5ab5efc219c8938ec9da86ee254108 to your computer and use it in GitHub Desktop.
IPFS systemd service with resource limits
[Unit]
Description=IPFS daemon
After=network-online.target
[Service]
ExecStart=/home/ipfs/.nix-profile/bin/ipfs daemon
User=ipfs
LimitNice=10
MemoryHigh=4G
# OOM-killer
MemoryMax=6G
MemorySwapMax=1G
[Install]
WantedBy=multiuser.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment