# 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

```
cd exsat-client
yarn install && yarn build
```

## 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 synchronizer account

#### Create or import the account

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

If you already have a synchronizer 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).

#### Register account as synchronizer

You must [register your account as synchronizer](/guides-of-data-consensus/others/operation-references/synchronizer-operations/synchronizer-registration.md) to be qualified for Synchronizer tasks.&#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**, can also be done by editing the .env file)
* [Bridge BTC for gas fee ](/guides-of-data-consensus/others/operation-references/common-operations/refill-btc-for-gas-fees.md)(**required**)
* [Change Reward Address ](/guides-of-data-consensus/others/operation-references/synchronizer-operations/change-reward-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/synchronizer-operations/execute-the-synchronizer-client.md).

### 4. Check and claim rewards

You could [check and claim rewards ](/guides-of-data-consensus/others/operation-references/synchronizer-operations/check-and-claim-rewards-for-synchronizer.md)on the front-page with the reward address.


---

# 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.exsat.network/guides-of-data-consensus/run-a-sychronizer/run-as-synchronizer/run-from-source-code.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.
