Mysterium Network Logo

How to prepare your environment for Mysterium node development

The minimum recommended pre-requisites for building, running and testing Mysterium node are:

SOFTWARE MINIMUM VERSION

Go               1.17.0+

Docker        19.0+

Docker Compose 1.21.0+

Mage (Recommended) 1.10+

Follow the instructions below to set it up.

Setup for Ubuntu

  1. Install and configure Docker CE:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $(whoami)
docker login 

If you prefer to perform these steps manually:

Make sure that you can run docker without sudo

  1. Install docker-compose:

You should be able to install docker-compose using the default package manager:

sudo apt-get install docker-compose

You can also install it using the docker provided files:


sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
  1. Download and install the latest Golang release:

sudo apt-get install -y build-essential
sudo rm -rf /usr/local/go
wget https://golang.org/dl/go1.15.4.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.15.4.linux-amd64.tar.gz

You can install other versions by replacing the go1.15.4 with any version you want. To find the latest version check: https://golang.org/doc/install

  1. Update your shell's initialization script (e.g. .profile, .bashrc or .zshrc) and add the following:

export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:/usr/local/go/bin
  1. Reload shell config

In order to load the configuration from step 4 you must reload your shell.

Try and source the shell initialization script: source $HOME/.profile. If that doesn't work re-login or restart your computer for the configuration to be applied.

  1. Make sure everything is working:

Test your setup using these commands:

  • go version to checkout if go was installed and is configured
  • docker --version to check if docker was installed and is working
  • docker-compose --version to check if docker-compose was installed and is working

Setup for macOS

  1. Install and configure Docker CE: https://docs.docker.com/docker-for-mac/.
  2. Download and install homebrew: https://brew.sh/.
  3. Install Go:
brew install go

      4. Update your shell's initialization script (e.g. .profile, .bashrc or .zshrc) and add the following:


export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

       5. Reload shell config

In order to load the configuration from step 4 you must reload your shell.

Try and source the shell initialization script: source $HOME/.profile. If that doesn't work re-login or restart your computer for the configuration to be applied.

  1. Make sure everything is working:

Test your setup using these commands:

  • go version to checkout if go was installed and is configured
  • docker --version to check if docker was installed and is working
  • docker-compose --version to check if docker-compose was installed and is working

Mage - Golang's task automation tool

Mage is a simple make-like Go tool we use to help us develop our software. Before installing Mage, make sure you've completed the steps above for system setup as it requires you to have golang installed on your system.

To install simply execute these commands:


git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go