> For the complete documentation index, see [llms.txt](https://docs.exsat.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exsat.network/guides-of-data-consensus/run-a-xsat-validator/run-as-xsat-validator/run-from-source-code.md).

# Run from source code

## Download the Client

Execute the following command to clone the repository :

```
git clone https://github.com/exsat-network/exsat-client
```

## Build the client

<pre><code>cd exsat-client
<strong>yarn install &#x26;&#x26; yarn build
</strong></code></pre>

## Edit the .env configuration file

Please generate ".env" file by coping from ".env.example":

```
cp .env.example .env
```

Please edit the ".env" file to configure the settings.

```
vim .env
```

Please ensure all configurations are correctly set. Some settings can also be adjusted by executing the Client. Detailed configurations can be found [here](/guides-of-data-consensus/others/operation-references/common-operations/environment-variables.md).

## Execute the client

### 1. Initiate the validator account

#### Create or import the account

If you don't have a validator account, please [create a new account](/guides-of-data-consensus/others/operation-references/validator-operations/create-new-xsat-validator-account.md).

If you already have a validator account, and wish to import it to your client, please [import seed phase](/guides-of-data-consensus/others/operation-references/common-operations/import-from-seed-phrase.md) or [import private key](/guides-of-data-consensus/others/operation-references/common-operations/import-from-private-key.md).

#### Stake for your validator account

Validator must stake at least 2100 $XSAT to become a qualified validator. Click [here ](/guides-of-data-consensus/others/operation-references/validator-operations/stake-for-validator-via-xbtc-staking-or-xsat-staking.md)to see how to stake for your validator account.&#x20;

### 2. Configurations

You can complete some client configurations or perform operations on your account:

* [Set BTC RPC Node](/guides-of-data-consensus/others/operation-references/common-operations/set-btc-rpc-node.md) (**required**)
* [Bridge BTC for gas fee](/guides-of-data-consensus/others/operation-references/common-operations/refill-btc-for-gas-fees.md) (**required**)
* [Change Stake Address](/guides-of-data-consensus/others/operation-references/validator-operations/change-stake-address.md) (optional)
* [Export private key](/guides-of-data-consensus/others/operation-references/common-operations/export-private-key.md) (optional)
* [Remove your account](/guides-of-data-consensus/others/operation-references/common-operations/remove-your-account.md) (optional)
* [New version check](/guides-of-data-consensus/others/operation-references/common-operations/upgrade-to-new-version.md) (optional)

### 3. Execute the client

Please be aware that completing [Set BTC RPC Node](/guides-of-data-consensus/others/operation-references/common-operations/set-btc-rpc-node.md) and [Bridge BTC for gas fee ](/guides-of-data-consensus/others/operation-references/common-operations/refill-btc-for-gas-fees.md)is mandatory.

Once the above operations are completed, your account and client are ready, and you can [start it for long-term running](/guides-of-data-consensus/others/operation-references/validator-operations/execute-the-validator-client.md).

### 4. Check and claim rewards

You could [check and claim rewards](/guides-of-data-consensus/others/operation-references/validator-operations/stake-for-validator-via-xbtc-staking-or-xsat-staking.md#claim-rewards) on the front-page with the reward address.
