Skip to content

Instantly share code, notes, and snippets.

@lordcirth
Last active August 20, 2020 14:52
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lordcirth/378ae7c3a8d2786874d00867098cbad1 to your computer and use it in GitHub Desktop.
Save lordcirth/378ae7c3a8d2786874d00867098cbad1 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
@da2x
Copy link

da2x commented Feb 14, 2019

-After=network.target
+After=network-online.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment