Skip to content

Instantly share code, notes, and snippets.

@swyngaard
Last active August 15, 2019 13:51
Show Gist options
  • Save swyngaard/058fd6be835e7b46b3e981269707fe19 to your computer and use it in GitHub Desktop.
Save swyngaard/058fd6be835e7b46b3e981269707fe19 to your computer and use it in GitHub Desktop.
Install IPFS on Ubuntu 16.04

#Install IPFS on Ubuntu 16.04

Pre-requisites

Ensure your user has sudo access

Install IPFS executable

Download the IPFS go client using wget:

wget https://dist.ipfs.io/go-ipfs/v0.4.13/go-ipfs_v0.4.13_linux-amd64.tar.gz

Uncompress the archive file:

tar xvf go-ipfs_v0.4.13_linux-amd64.tar.gz

Switch directories:

cd go-ipfs

Install to /usr/local/bin:

sudo ./install.sh

Initialise the node configuration:

ipfs init

Create systemd service

To ensure IPFS starts when the machine boots, create a systemd service for it. As root, create the file /lib/systemd/system/ipfs.service with the following contents:

[Unit]
Description=IPFS daemon
After=network.target

[Service]
User=swyngaard
Group=swyngaard
ExecStart=/usr/local/bin/ipfs daemon
Restart=on-failure

[Install]
WantedBy=multi-user.target

NOTE: Modify the User= and Group= clauses above with your particular user. Start the IPFS service:

sudo systemctl start ipfs

Enable the service at system startup:

sudo systemctl enable ipfs

Optionally, check the IPFS service logs:

sudo journalctl -u ipfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment