IPFS is a peer-to-peer hypermedia protocol to make the web faster, safer, and more open. It is similar to combining HTTP publishing with bittorrent. In order to participate and publish files one needs to run a node. These instructions assume running as root, so add sudo if not.

Get latest version of ipfs node software and install.

wget https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_linux-amd64.tar.gz
tar zxvf go-ipfs_v0.4.18_linux-amd64.tar.gz
mv go-ipfs/ipfs /usr/local/bin/
chmod +x /usr/loca/bin/ipfs

create a user for ipfs to run as

adduser ipfs
ipfs init --profile server
ipfs daemon

You can start ipfs in two ways; simple shell script or a systemd service file.

create a file like start_ipfs.sh with the following:

su - ipfs -c "/usr/bin/screen -d -m -fa -S ipfs /usr/local/bin/ipfs daemon"

then run it:

chmod +x start_ipfs.sh

or for systemd

create this file /etc/systemd/system/ipfs.service with the following:

Description=IPFS Daemon
After=syslog.target network.target remote-fs.target nss-lookup.target

ExecStart=/usr/local/bin/ipfs daemon --enable-namesys-pubsub


Then run:

systemctl daemon-reload
systemctl enable ipfs
systemctl start ipfs

More information here and here