> ## Documentation Index
> Fetch the complete documentation index at: https://covalenthq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Run EWM Light Client

The **EWM Light Client** can be run using four methods. Follow the instructions below based on your preferred approach:

* **Run with Docker Compose**
* **Run with Installer for macOS**
* **Run with Pre-complied Binaries**
* **Build & Run from Source**

***

## 1. Run with Docker Compose

### Instructions to Run EWM Light Client with Docker

**1. Clone the Repository**

```shell theme={null}
git clone https://github.com/covalenthq/ewm-das
cd ewm-das
```

**2. Build the Docker Image**

```shell theme={null}
docker build -t covalent/light-client -f Dockerfile.lc .
```

> [!NOTE]
>
> **Note:** If you are running the client on **Windows**, you may have to modify the Dockerfile.lc script since the lining on Windows is different than Linux.

#### For Windows:

```shell theme={null}
# Install dos2unix to fix line endings
RUN apk add --no-cache dos2unix
```

**3. Run the Docker Container**

You need to provide the `PRIVATE_KEY` of your burner address, which was generated as part of [Prerequisites Step 2](https://covalenthq.com/docs/ewm-light-client/lc-setup/).

```shell theme={null}
docker run -d --restart always --name light-client -e PRIVATE_KEY="YOUR_HEX_PRIVATE_KEY" covalent/light-client
```

**4. Check the Status of the Light Client**

```shell theme={null}
docker logs -f light-client
```

**Expected Output:**
For version details, please refer to our Discord's `light-client` channel.

```bash theme={null}
Version: v0.x.0, commit: 8d6709bee9e79d3c4e6ece35fed65da02f3850f4
2024-09-18T15:45:01.238-0700	INFO	light-client	light-client/main.go:91	Starting client...
2024-09-18T15:45:01.238-0700	INFO	light-client	light-client/main.go:97	Client identity: 0x51b6D674514849aF97FB77BCac51bcdD7799842C
...
```

## 2. Run using Installer for macOS only:

### Running Light Client on macOS

**1. Install IPFS Kubo Client (If Not Already Installed)**

```shell theme={null}
brew install ipfs
```

**2. Configure IPFS Kubo Client**

```shell theme={null}
ipfs init
```

**3. Install and Launch the Light Client**

You need to provide the `PRIVATE_KEY` of your burner address, which was generated as part of [Prerequisites Step 2](https://covalenthq.com/docs/ewm-light-client/lc-setup/).

**Single Command Installation:**

```shell theme={null}
curl -sSf https://storage.googleapis.com/ewm-release-artefacts/{{VERSION}}/macos/install.sh | bash -s <YOUR PRIVATE KEY>
```

**Alternative Installation Method:**

1. Go to the [Light Client Releases](https://github.com/covalenthq/ewm-das/releases) page and download the latest release.
2. Unzip the downloaded archive and navigate to the directory:
   ```shell theme={null}
   cd das-macos-latest
   ```
3. Run the installation script:
   ```shell theme={null}
   ./install.sh <YOUR_PRIVATE_KEY>
   ```

*The script will install all files in the `$HOME/.covalent` directory.*

**4. Check the Status of the Light Client**

```shell theme={null}
tail -n 1000 -f $HOME/.covalent/light-client.log
```

**Expected Output:**
For version details, please refer to our Discord's `light-client` channel.

```shell theme={null}
Version: v0.x.0, commit: 8d6709bee9e79d3c4e6ece35fed65da02f3850f4
2024-09-18T15:45:01.238-0700	INFO	light-client	light-client/main.go:91	Starting client...
2024-09-18T15:45:01.238-0700	INFO	light-client	light-client/main.go:97	Client identity: 0x51b6D674514849aF97FB77BCac51bcdD7799842C
...
```

**5. Uninstall the Light Client**

```shell theme={null}
$HOME/.covalent/uninstall.sh
```

***

## 3. Run with Pre-complied Binaries

### Running from Binaries

**1. Install IPFS Kubo Client (If Not Already Installed)**

```shell theme={null}
brew install ipfs
```

**2. Configure IPFS Kubo Client**

```shell theme={null}
ipfs init
```

**3. Download Binary for Your Platform**

Get the required pre-compiled binaries for Ubuntu or macOS from the [Releases](https://github.com/covalenthq/ewm-das/tags) page.

**4. Run the Light Client**

You need to provide the `PRIVATE_KEY` of your burner address, which was generated as part of [Prerequisites Step 2](https://covalenthq.com/docs/ewm-light-client/lc-setup/).

```shell theme={null}
./bin/light-client --rpc-url <rpc-url> \
    --collect-url <collect-url> \
    --private-key <private-key>
```

**Command:**

```shell theme={null}
./bin/light-client --rpc-url ws://coordinator.das.test.covalentnetwork.org/rpc --collect-url https://us-central1-covalent-network-team-sandbox.cloudfunctions.net/ewm-das-collector --private-key ${PRIVATE_KEY}
```

**5. Check the Status of the Light Client**

```shell theme={null}
tail -n 1000 -f $HOME/.covalent/light-client.log
```

***

## 4. Build & Run from Source

### Building from the Source

**1. Clone the Repository**

```shell theme={null}
git clone https://github.com/covalenthq/ewm-das
cd ewm-das
```

**2. Install Dependencies**

```shell theme={null}
make deps
```

**3. Build Binaries**

```shell theme={null}
make
```

> [!NOTE]
>
> **Note:** The binaries will be built in the `bin` directory.

**4. Run the Light Client**

You need to provide the `PRIVATE_KEY` of your burner address, which was generated as part of [Prerequisites Step 2](https://covalenthq.com/docs/ewm-light-client/lc-setup/).

```shell theme={null}
./bin/light-client --rpc-url <rpc-url> \
    --collect-url <collect-url> \
    --private-key <private-key>
```

**Command:**

```shell theme={null}
./bin/light-client --rpc-url ws://coordinator.das.test.covalentnetwork.org/rpc --collect-url https://us-central1-covalent-network-team-sandbox.cloudfunctions.net/ewm-das-collector --private-key ${PRIVATE_KEY}
```

**5. Check the Status of the Light Client**

```shell theme={null}
tail -n 1000 -f $HOME/.covalent/light-client.log
```

**Expected Output:**
For version details, please refer to our Discord's `light-client` channel.

```shell theme={null}
Version: v0.x.0, commit: 8d6709bee9e79d3c4e6ece35fed65da02f3850f4
2024-09-18T15:45:01.238-0700	INFO	light-client	light-client/main.go:91	Starting client...
2024-09-18T15:45:01.238-0700	INFO	light-client	light-client/main.go:97	Client identity: 0x51b6D674514849aF97FB77BCac51bcdD7799842C
...
```

**6. Clean Up Build Artifacts**

To remove build artifacts, run:

```shell theme={null}
make clean
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.