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
git, follow the instructions here.
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
$HOME/go directory if it doesn't exist:
Verify this step was successful through
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.