Run with Docker

Please ensure that Docker is installed on your Linux server.

1. Download docker image

docker pull exsatnetwork/exsat-client:latest

2. Download and configure the environment variables (.env)

Please create a directory (e.g., $HOME/.exsat/) to store the files for running the exSat Client via Docker. We will download the .env file directly from GitHub into this directory.

mkdir -p $HOME/.exsat/
curl -o $HOME/.exsat/.env https://raw.githubusercontent.com/exsat-network/exsat-client/test/.env.example

In the .env file, most configurations can be customized as needed, you can check here to see the details.

Typically, if this is your first time running the exSat Client and you'reinitializing the account and configuring the Client, there's no need to modify the .env file.

However, if you have already have the account and keystore, and wish to run the exSat Client directly, you will need to configure the following items,

   # Bitcoin RPC configurations
   BTC_RPC_URL=
   BTC_RPC_USERNAME=
   BTC_RPC_PASSWORD=
   
   # Synchronizer Keystore configurations, configure the password if needed
   SYNCHRONIZER_KEYSTORE_FILE=
   SYNCHRONIZER_KEYSTORE_PASSWORD=

3. Initialize the account and configure the Client

Start Docker in interactive mode:

docker run -it --name commander -v $HOME/.exsat/:/app/.exsat -e CLIENT_TYPE=commander exsatnetwork/exsat-client:latest

Perform below actions in the docker.

3.1 Initiate the synchronizer account

Create or import the account

If you don't have a synchronizer account, please create a new account.

If you already have a synchronizer account, and wish to import it to your client, please import seed phase or import private key.

Register account as synchronizer

If you didn't register your account as synchronizer, please register as synchronizer.

Set Reward Address

If you didn't set reward address for your synchronizer account, please set reward address.

3.2 Configurations

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

4. Execute the Client

Please ensure that you have initialized the synchronizer account and configured the BTC RPC Node.

There are several ways to start the client using Docker, differing in how the keystore password is provided. Choose the method you prefer.

Assuming the keystore file is stored at $HOME/.exsat/synctest_keystore.jsonand the password is 123456 , the keystore file path in ".env" file should be look like:

SYNCHRONIZER_KEYSTORE_FILE=/app/.exsat/synctest_keystore.json

Password stored in ".env"

Please configure password in the .env file:

SYNCHRONIZER_KEYSTORE_PASSWORD=123456

Then, start the Docker container with the following command:

docker run -d --name synctest -v $HOME/.exsat/:/app/.exsat -e CLIENT_TYPE=synchronizer exsatnetwork/exsat-client:latest

Input password in the command

Start docker container with the password as parameter in the command:

docker run -d --name synctest -v $HOME/.exsat/:/app/.exsat -e CLIENT_TYPE=synchronizer -e SYNCHRONIZER_KEYSTORE_PASSWORD=123456 exsatnetwork/exsat-client:latest

Interactive Password Input

Start Docker in interactive mode and enter the password in the command line interface.

docker run -it --name synctest -v $HOME/.exsat:/app/.exsat -e CLIENT_TYPE=synchronizer exsatnetwork/exsat-client:latest

Different startup methods vary in terms of security and convenience. If you start the client interactively and enter the password in the interface, the password won't be stored in plain text in the startup command or files, reducing the risk of exposure. However, if you provide the password in the .env file or directly in the command line, it may be more prone to leakage but offers greater convenience during startup.

5. Check and claim rewards

You could check and claim rewards on the front-page with the reward address.

Last updated