Installation and Updates

Installation

Swarm is part of the Ethereum stack, the reference implementation is currently at POC (proof of concept) version 0.2.

The source code is found on github: https://github.com/ethereum/go-ethereum/tree/master/

Supported Platforms

Geth runs on all major platforms (linux, MacOSX, Windows, also raspberry pi, android OS, iOS).

Note

This package has not been tested on platforms other than linux and OSX.

Prerequisites

building the swarm daemon swarm requires the following packages:

Grab the relevant prerequisites and build from source.

On linux (ubuntu/debian variants) use apt to install go and git

sudo apt install golang git

while on Mac OSX you’d use brew

brew install go git

Then you must prepare your go environment as follows

mkdir ~/go
export GOPATH="$HOME/go"
echo 'export GOPATH="$HOME/go"' >> ~/.profile

Installing from source

Once all prerequisites are met, download the go-ethereum source code

mkdir -p $GOPATH/src/github.com/ethereum
cd $GOPATH/src/github.com/ethereum
git clone https://github.com/ethereum/go-ethereum
cd go-ethereum
git checkout master
go get github.com/ethereum/go-ethereum

and finally compile the swarm daemon swarm and the main go-ethereum client geth.

go install -v ./cmd/geth
go install -v ./cmd/swarm

You can now run swarm to start your swarm node. Let’s check swarm‘s installation

$GOPATH/bin/swarm version

Should give you some relevant information back

Swarm
Version: 0.2
Network Id: 0
Go Version: go1.7.4
OS: linux
GOPATH=/home/user/go
GOROOT=/usr/local/go

Updating your client

To update your client simply download the newest source code and recompile.

cd $GOPATH/src/github.com/ethereum/go-ethereum
git checkout master
git pull
go install -v ./cmd/geth
go install -v ./cmd/swarm