Skip to content

Instantly share code, notes, and snippets.

@southbite
Last active May 30, 2018 05:49
Show Gist options
  • Save southbite/cc7802f76a6affbfc0b590a31e31d03f to your computer and use it in GitHub Desktop.
Save southbite/cc7802f76a6affbfc0b590a31e31d03f to your computer and use it in GitHub Desktop.
set IPFS up as a service in ubuntu 14.04

create the file /etc/init/ipfs.conf, with the following contents:

description "ipfs-daemon"
author      "Joe Bloggs"

start on started mountall
stop on shutdown

# automatically respawn

respawn
respawn limit 20 5

script

	export IPFS_PATH="/root/.ipfs"
  exec  ipfs daemon >> /var/log/ipfs-daemon.log 2>&1

end script

post-start script

end script
  1. NB: remember to modify the path /root/.ipfs if this is not the location of your ipfs folder
  2. NB: the service logs to /var/log/ipfs-daemon.log - this is also configurable in the above file
  3. now you can run "sudo start ipfs" to start the service and "sudo stop ipfs" to stop the service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment