Skip to content

Instantly share code, notes, and snippets.

@ardislu
Last active November 8, 2021 05:31
Show Gist options
  • Select an option

  • Save ardislu/f8476b98c0d776af36db73fc3f67db8a to your computer and use it in GitHub Desktop.

Select an option

Save ardislu/f8476b98c0d776af36db73fc3f67db8a to your computer and use it in GitHub Desktop.
Start an ipfs daemon process using pm2 with garbage collection enabled and auto-restart when 256 MB of memory is consumed.
#!/usr/bin/env bash
sudo env PATH=$PATH pm2 start "ipfs daemon --enable-gc" --name "ipfs" --max-memory-restart 256M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment