# Command-line
Installing IPFS through the command-line is handy if you plan on building applications and services on top of an IPFS node. This method is also useful if you're setting up a node without a user interface, usually the case with remote servers or virtual machines. Using IPFS through the command-line allows you to do everything that IPFS Desktop can do, but at a more granular level since you can specify which commands to run.
There are several different ways to install IPFS using the command-line. The easiest method is by using a package manager. If you don't have one installed or would like a more up-to-date version of IPFS, you can use dist.ipfs.io (opens new window) to grab the latest package and install it. Lastly, there are manual compilation instructions available if you're the kind of person who would rather bake a cake instead of using a pre-made one.
# System requirements
IPFS is a light-weight application in terms of CPU and RAM usage. You can run an IPFS node on a Raspberry Pi. However, how much disk space your IPFS installation takes up depends on how much data you're sharing. A base installation takes up about 12MB of disk space, and the default maximum disk storage is set to 10GB.
# Package managers
Most operating systems have a package manager, although they may not come pre-installed. Both Windows and macOS have open-source package managers that the user must install. Ubuntu comes with the Snap package manager pre-installed. Package managers download packages, install applications and keep everything up-to-date. They're the easiest way to install IPFS from the command-line.
Operating system | Package manager | Install command |
---|---|---|
Windows | Chocolatey (opens new window) | choco install ipfs |
macOS | Homebrew (opens new window) | brew install ipfs |
Ubuntu | Snap (opens new window) | snap install ipfs |
Although we try our best to keep the package manager releases up to date, they sometimes lag behind the Go-IPFS GitHub releases page by a few days. If you'd like to install a release the very same day it comes out, use the official distributions from dist.ipfs.io (opens new window).
WARNING
On Ubuntu, the IPFS Snap uses strict confinement (opens new window) by default. This includes some restrictions, such as not allowing ipfs
to access files outside of /home
. If this affects usability for you, consider connecting (opens new window) the removable-media interface (opens new window) for ipfs
snap.
# Official distributions
The IPFS team manages the dist.ipfs.io website (opens new window) to help users quickly find the latest version of every IPFS package. As soon as a new release of an IPFS package comes out, it is automatically shown on dist.ipfs.io
, so you can be sure you're getting the latest software. These steps detail how to download and install Go-IPFS 0.7.0 from dist.ipfs.io
using the command-line.
Windows | macOS | Linux |
---|---|---|
# Windows
Download the Windows binary from
dist.ipfs.io
(opens new window).cd ~\ wget https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_windows-amd64.zip -Outfile go-ipfs_v0.7.0.zip
Unzip the file and move it somewhere handy.
Expand-Archive -Path go-ipfs_v0.7.0.zip -DestinationPath ~\Apps\go-ipfs_v0.7.0
Move into the
go-ipfs_v0.7.0
folder and check that theipfs.exe
works:cd ~\Apps\go-ipfs_v0.7.0\go-ipfs .\ipfs.exe --version > ipfs version 0.7.0
While you can use IPFS right now, it's better to add
ipfs.exe
to yourPATH
by using the following steps.Print the current working directory and copy it to your clipboard:
pwd > Path > ---- > C:\Users\Johnny\Apps\go-ipfs_v0.7.0\go-ipfs
Add the address you just copied to PowerShell's
PATH
by adding it to the end of theprofile.ps1
file stored inDocuments\WindowsPowerShell
:Add-Content C:\Users\Johnny\Documents\WindowsPowerShell\profile.ps1 "[System.Environment]::SetEnvironmentVariable('PATH',`$Env:PATH+';;C:\Users\Johnny\Apps\go-ipfs_v0.7.0\go-ipfs')"
Close and reopen your PowerShell window. Test that your IPFS path is set correctly by going to your home folder and asking IPFS for the version:
cd ~ ipfs --version > ipfs version 0.7.0
# macOS
Download the macOS binary from
dist.ipfs.io
(opens new window).wget https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_darwin-amd64.tar.gz
Unzip the file:
tar -xvzf go-ipfs_v0.7.0_darwin-amd64.tar.gz > x go-ipfs/install.sh > x go-ipfs/ipfs > x go-ipfs/LICENSE > x go-ipfs/LICENSE-APACHE > x go-ipfs/LICENSE-MIT > x go-ipfs/README.md
Move into the
go-ipfs
folder and run the install script:cd go-ipfs bash install.sh > Moved ./ipfs to /usr/local/bin
Check that IPFS installed:
ipfs --version > ipfs version 0.7.0
# Linux
Download the Linux binary from
dist.ipfs.io
(opens new window).wget https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_linux-amd64.tar.gz
Unzip the file:
tar -xvzf go-ipfs_v0.7.0_linux-amd64.tar.gz > x go-ipfs/install.sh > x go-ipfs/ipfs > x go-ipfs/LICENSE > x go-ipfs/LICENSE-APACHE > x go-ipfs/LICENSE-MIT > x go-ipfs/README.md
Move into the
go-ipfs
folder and run the install script:cd go-ipfs sudo bash install.sh > Moved ./ipfs to /usr/local/bin
Test that IPFS has installed correctly:
ipfs --version > ipfs version 0.7.0
# Compile manually
Manually compiling IPFS is a fairly involved process that changes frequently. It can be handy if you'd like to build a specific branch or use the bleeding-edge version of Go-IPFS. See the ipfs/go-ipfs
GitHub repository for details → (opens new window)
# Next steps
Now that you've got an IPFS node installed, you can start building applications and services on top of the network! Check out the Command-line- quicks start guide and jump straight to the Initialize the repository section (opens new window).