Install from .deb package

This guide is suitable only for Ubuntu 20.04 and newer. If you're using other distro, please refer Build from sources page

Prerequisites

Before installation and running of swisstronikd, check if you have correct hardware and SGX was properly configured. You can refer Setup SGX section to read more about it.

Install Go >1.20

We will use Go v1.21.4 as example here. The code below also cleanly removes any previous Go installations.

sudo rm -rvf /usr/local/go/
wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz
rm go1.21.4.linux-amd64.tar.gz

Configure Go

Unless you have specific preferences for non-standard configuration, set the following in the ~/.profile file:

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin

Install Cosmovisor

We will use Cosmovisor v1.0.0 as an example here.

go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0

Installation

To install swisstronik binary without building it from sources, you can use prebuilt .deb package.

You can download archive with .deb package from our GitHub: https://github.com/SigmaGmbH/swisstronik-chain/releases/tag/v1.0.1

Or use the following command:

wget https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.2/swisstronik_1.0.2_amd64.deb.zip

Once you downloaded the archive, extract .deb package from it:

unzip swisstronikd_v1.0.2.deb.zip  

Now you're ready to install it using dpkg:

dpkg -i swisstronikd_v1.0.2.deb 

To check if everything was installed correctly, run:

swisstronikd version

By default .deb can install swisstronikd_v1.0.2 Feel free to rename it to swisstronikd

It should output you current version of binary, for example, v1.0.2.

If you got Error: Enclave failure: SGX_ERROR_ENCLAVE_FILE_ACCESS, check location of enclave.signed.so file and copy it to default location, for example cp /usr/lib/enclave.signed.so /root/.swisstronik-enclave/enclave.signed.so or specify ENCLAVE_HOME=path/to/enclave env var

Now you're ready to configure your node. To do it, refer Configure node page.

Last updated