Installing IPFS
There are a variety of ways to install a copy of IPFS on your system. We generally recommend installing a prebuilt package, but here are a few other supported options:
- Installing from a Prebuilt Package (recommended)
- Installing with ipfs-update
- Building from source
- Upgrading IPFS
- Troubleshooting
Note these instructions all make use of the command line. We use $ to indicate the command prompt — commands to type are on lines that are prefixed with that, while output lines are un-prefixed.
Don’t want to use the command line right now? You can give the desktop-app implementation of IPFS a go!
Get started with IPFS Desktop here
After doing this Lesson you will be able to:
- Download IPFS and install it on your operating system
- Display which version of IPFS you're using
- Get a list of commands the ipfs binary supports
- Upgrade IPFS
Installing from a Prebuilt Package
Step 1: Download the Prebuilt IPFS Package
Visit the IPFS installation page at https://dist.ipfs.io/#go-ipfs and download the prebuilt ipfs binaries for your operating system.
Why does the installation page talk about "Go IPFS"? There are multiple implementations of the IPFS protocol. The core IPFS team maintain implementations in Golang and Javascript. Those are commonly referred to as go-ipfs and js-ipfs. The official binaries are built from the Go implementation.
Step 2: Unzip & Install the Prebuilt Package
Mac OS X and Linux
After downloading, untar the archive, and move the ipfs
binary somewhere in your executables $PATH using the install.sh script:
$ tar xvfz go-ipfs_*
$ cd go-ipfs*
$ sudo ./install.sh
Test it out:
$ ipfs version
ipfs version <VERSION_NUMBER>
$ ipfs help
USAGE:
ipfs - Global p2p merkle-dag filesystem.
...
If you are encountering some error, let us know here.
Congratulations! You now have a working IPFS installation on your computer.
Head over to next part to start using IPFS.
Windows
First download and unzip the archive. Now copy the path of ipfs.exe.
Now, set the PATH system variable for ipfs.
- If you are on Windows 8 or above, search for and then select: System (Control Panel).
For Windows 7, right click the Computer icon and choose Properties from the context menu.
For other Windows versions, you can find a solution here. - Click the Advanced system settings link.
- Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
- In the Edit System Variable (or New System Variable) window, specify the value(the path for ipfs.exe) of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
- Reopen Command prompt window, and test it out as directed below.
Test it out:
$ ipfs version
ipfs version <VERSION_NUMBER>
$ ipfs help
USAGE:
ipfs - Global p2p merkle-dag filesystem.
...
If you are encountering some error, let us know here.
Congratulations! You now have a working IPFS installation on your computer.
Head over to next part to start using IPFS.
Installing with ipfs-update
ipfs-update is a command-line tool to install and upgrade the ipfs binary.
Getting ipfs-update
ipfs-update can be downloaded for your platform at: https://dist.ipfs.io/#ipfs-update
If you have a working Go environment (>=1.12), you can also install it with:
$ go get -u github.com/ipfs/ipfs-update
When installing new versions of ipfs or upgrading make sure you are using the latest version of ipfs-update.
Installing ipfs with ipfs-update
ipfs-update versions lists all the available ipfs versions which are available for download:
$ ipfs-update versions
v0.3.2
[...]
v0.4.20
v0.4.21
ipfs-update install latest will install the latest available version:
$ ipfs-update install latest
fetching go-ipfs version v0.4.21
binary downloaded, verifying...
success!
stashing old binary
installing new binary to /home/vasa/go/bin/ipfs
checking if repo migration is needed...
Installation complete!
Note that the latest available version may not be stable (i.e. release candidates in the form vX.X.X-rcX). So it is recommended to specify the version you want to install, for example: ipfs-update install v0.4.21.
Building from Source
If you want, you can also build IPFS from source. If you are on Mac OS X or Linux take a look at the readme for install instructions. If you are on Windows take a look at this document for instructions.
Upgrading IPFS
ipfs upgrades (and downgrades) may involve a repository upgrade process performed by the fs-repo-migrations tool.
Upgrading using ipfs-update
ipfs-update install will download and run fs-repo-migrations when needed, during the installation of a newer or older ipfs version (as explained above). This is the easiest way of upgrading.
Warning: Make sure that the ipfs daemon is not running during an upgrade
Upgrading manually
In order to perform a manual upgrade of ipfs, you will need to manually run any repository migrations. The procedure is as follows:
- Stop the ipfs daemon if it is running
- Optionally backup your ipfs data folder (i.e. cp -aL ~/.ipfs ~/.ipfs.bk)
- Download and install the latest version of ipfs from https://dist.ipfs.io/#go-ipfs
- Run ipfs daemon.
When a repository migration is necessary, ipfs will inform the user, download and install fs-repo-migrations and perform the upgrade. If you wish the procedure to happen unattended, launch the daemon with the --migrate flag.
Migrations can be also run manually by downloading the latest version of fs-repo-migrations from https://dist.ipfs.io/#fs-repo-migrations and following these instructions.
Troubleshooting
Help!
If you have any problems, come get live help at #ipfs or via the mailing list.
Check Go Version
IPFS works with Go 1.12.0 or later. To check what go version you have installed, type go version. Here’s what I get:
$ go version
go version go1.12.2 linux/amd64
If you need to update, it is recommended to install from the canonical Go packages. Package managers often contain out-of-date Go packages.
Install FUSE
For more details on setting up FUSE (so that you can mount the filesystem), see github.com/ipfs/go-ipfs/blob/master/docs/fuse.md