Installing Swarm
To install Swarm, you can download the latest binaries or—alternatively—compile them directly from the source code.
Download the binaries (recommended)
Pre-compiled binaries for Linux, macOS and Windows are available to download from the Swarm official homepage.
Compile from source code
Prerequisites
1. Git
To install git
, follow the instructions here.
2. Golang
To install go
, follow the instructions here.
2.1 Set up Go environmnet
Make sure the GOPATH
environment variable is set:
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export PATH=$GOPATH/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Create the $HOME/go
directory if it doesn't exist:
mkdir $HOME/go
Verify this step was successful through echo $GOPATH
.
Create the Swarm binaries
If needed, create the directory for the project:
mkdir -p $GOPATH/src/github.com/ethersphere
Clone the repo:
cd $GOPATH/src/github.com/ethersphere/ &&
git clone https://github.com/ethersphere/swarm
Compile the Swarm binaries:
cd $GOPATH/src/github.com/ethersphere/swarm &&
make swarm
Check the Swarm version:
cd $GOPATH/src/github.com/ethersphere/swarm/build/bin/ &&
./swarm version
Updating & Reinstalling
To update the Swarm client simply download the newest source code and recompile.
Guide based on Swarm for Node-Operators: Installation and Updates, by the Swarm team.