# Install from .deb package

{% hint style="info" %}
This guide is suitable only for Ubuntu 20.04 and newer. If you're using other distro, please refer [Build from sources](broken://pages/rfKuWcy5Z9jUK0ZzBYt5) page
{% endhint %}

{% hint style="info" %}
This guide is not suitable for mainnet
{% endhint %}

## Prerequisites

Before installation and running of swisstronikd, check if you have correct hardware and SGX was properly configured. You can refer [Setup SGX](/swisstronik-docs/node-setup/setup-sgx.md) 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.

```sh
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:

```sh
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.

```sh
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:

```sh
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:

```sh
unzip swisstronikd_v1.0.2.deb.zip  
```

Now you're ready to install it using `dpkg`:

```sh
dpkg -i swisstronikd_v1.0.2.deb 
```

To check if everything was installed correctly, run:

```sh
swisstronikd version
```

{% hint style="info" %}
By default .deb can install `swisstronikd_v1.0.2` \
Feel free to rename it to `swisstronikd`
{% endhint %}

\
&#x20;It should output you current version of binary, for example, `v1.0.2`.

{% hint style="info" %}
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
{% endhint %}

Now you're ready to configure your node. To do it, refer [Configure node](/swisstronik-docs/node-setup/setup-node/testnet/configure-node.md) page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swisstronik.com/swisstronik-docs/node-setup/setup-node/testnet/install-from-.deb-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
