- Compile/Download/Install as detailed at [https://github.com/ipfs/go-ipfs#install].
a. This should create an executable at
/usr/local/bin/ipfs
- Create a user for the service (I opted to create a regular user with a home directory where an ipfs datastore can 'live'):
$ sudo mkdir /home/ipfs
$ sudo useradd -d /home/ipfs
$ sudo chown -R ipfs:ipfs /home/ipfs
$ sudo chown root:staff /usr/local/bin/ipfs
$ sudo chmod a+rx /usr/local/bin/ipfs
- Create a password for the user:
$ su root
# passwd ipfs #follow the prompts to create a password
# exit
- Login as the user and initialize ipfs:
$ su ipfs
$ ipfs init
$ exit
- Create an
ipfs.service
file in/etc/systemd/system
- Enable and start the servive:
$ sudo systemctl enable ipfs
$ sudo systemctl start ipfs
- Verify ipfs has started successfully:
$ ps ax | grep ipfs
$ tail -n 60 /var/log/syslog
Notes
- I additionally enabled websockets for the ipfs node as outlined at [https://github.com/ipfs/js-ipfs/tree/master/examples/exchange-files-in-browser#2-make-your-daemons-listen-on-websockets].
- I then proxied websocket access via nginx