> For the complete documentation index, see [llms.txt](https://docs.emc.network/emc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emc.network/emc/run-an-emc-node/gpu-mining-guide.md).

# GPU Mining Guide

**Overview:**

This guide will walk you through the process of setting up an EMC Node on **AWS EC2** with a **Virtual GPU**. It includes step-by-step instructions for **GPU setup**, **Docker installation**, **EMC software configuration**, and **node registration**.

{% hint style="warning" %}
**Note:** This configuration is a starting point to help you get up and running. Feel free to adjust settings such as **instance type**, **region**, and **storage** to suit your specific needs and preferences.
{% endhint %}

{% hint style="success" %}
**Recommended:** For optimal performance and increased AI task rewards, we suggest using a GPU with **24GB VRAM** or higher (e.g., **RTX 4090**, **A100**).
{% endhint %}

### Part 1: Prepare AWS for GPU Access

#### 1.1 Create an AWS Account

1. Go to [https://aws.amazon.com](https://aws.amazon.com/)
2. Click "Create an AWS Account"

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FOe9neHqnspMCFVTd2FiG%2Fimage.png?alt=media&amp;token=2722b1b1-8d67-4f68-93d7-cd7fe65b89b9" alt=""><figcaption></figcaption></figure>

3. Complete the signup process

#### 1.2 Request GPU Quota

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FmFC2Wr3YVRB5uc0Zrw34%2Fimage.png?alt=media&amp;token=13aff2ae-1be3-42b7-8a3e-d9031db1594a" alt=""><figcaption></figcaption></figure>

1. Go to <https://console.aws.amazon.com/servicequotas/>
2. Choose "Amazon EC2"

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FfFgKlMrymXpDVMgfNP7X%2Fimage.png?alt=media&amp;token=d3aa3bf5-44cf-489e-92b7-39a3ef4e17f1" alt=""><figcaption></figcaption></figure>

3. Search for "Running On-Demand G"

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FYjUOCwJh6kPKbPSOVxfC%2Fimage.png?alt=media&amp;token=e7435197-f853-4a49-9035-2f8f2436cefb" alt=""><figcaption></figcaption></figure>

4. Request for a quota increase for `g4dn.xlarge` (8–16 vCPUs)
5. Provide justification: "Running EMC Node workloads"
6. Wait for approval (24–48 hours)

***

### Part 2: Launch GPU Instance

#### 2.1 Configure and Launch

1. Open the EC2 Dashboard and click "Launch instance"

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2Fh5TJIGeNBO5Aw1CBwIV3%2Fimage.png?alt=media&amp;token=c46ebb30-d2d1-4401-8cb1-5a3b2e627d8e" alt=""><figcaption></figcaption></figure>

2. Set a custom instance name (e.g., `EMC-GPU-Node`)

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FXUAz0it9oFk5oOlKReDK%2Fimage.png?alt=media&amp;token=ae95a0a0-a0aa-4d5e-9e7e-b9d989378b8d" alt=""><figcaption></figcaption></figure>

3. Choose AMI: **Ubuntu Server 22.04 LTS (HVM)**

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FT0MBi8uZXn5RzjglwNku%2Fimage.png?alt=media&amp;token=80e29387-4669-492c-87e1-07c084116a5c" alt=""><figcaption></figcaption></figure>

4. **Select instance type:** `g4dn.xlarge` (or choose another instance type based on your needs)

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FMTZDVkJnopTv3CI0MHyV%2Fimage.png?alt=media&amp;token=6a6b0819-06ce-45bb-9089-b8479244057f" alt=""><figcaption></figcaption></figure>

5. Create and download a new Key Pair (.ppk format for PuTTY)

<div align="left"><figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FD3boJGWn3pTOCrd6NMAB%2Fimage.png?alt=media&amp;token=dc5d07c4-ff9f-471d-b579-f81de8821a9a" alt=""><figcaption></figcaption></figure></div>

6. Under Network Settings:
   1. Enable Auto-assign Public IP
   2. Enable Allow SSH

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FsFrmnNWzDnFFl4Tp7TcG%2Fimage.png?alt=media&amp;token=6cebb196-61dd-40d3-8419-2f889ed455ab" alt=""><figcaption></figcaption></figure>

7. Set storage to at least **30GB**

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FKpxsc6EJ4NURCcUgcOxr%2Fimage.png?alt=media&amp;token=83e9e000-73da-451a-bd59-42ad6b651919" alt=""><figcaption></figcaption></figure>

8. Click "Launch instance"

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FmQaj7MfYgF2NdN74ybub%2Fimage.png?alt=media&amp;token=eaf77265-b0e8-42f0-a158-6907b0f52e5f" alt=""><figcaption></figcaption></figure>

9. Once the green success notification bar appears, your setup is complete, and you’re ready to proceed.

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FETsVl92ckZvcBIsgQojM%2Fimage.png?alt=media&amp;token=743043f3-9d25-451a-a3fa-ce681e77f79c" alt=""><figcaption></figcaption></figure>

***

### Part 3 Connect to Your Instance Using PuTTY

1. **Download PuTTY**: Install PuTTY from <https://www.putty.org/> if you don’t have it.
2. **Find Public IP Address**:

   * Open the AWS EC2 dashboard and select your instance.
   * Locate the **Public IPv4 address** field in the bottom panel.

   <figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FPmJ54NEzGm1LdVnrqp1T%2Fimage.png?alt=media&amp;token=b458323e-d782-4285-ba15-486e638f3765" alt=""><figcaption></figcaption></figure>

   * Click the copy icon to copy the IP address.
3. **Connect Using PuTTY**:

   * Open PuTTY.
   * In the left-hand menu, click on **"Session"** under the *Category* section.
   * Enter `ubuntu@your-instance-public-ip` in the **Host Name** field.

   <div align="left"><figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FRabfuEBk6lq4iMnHkYCX%2Fimage.png?alt=media&amp;token=9a15524b-9d31-436d-8a14-541ff8f2211a" alt=""><figcaption></figcaption></figure></div>

   * Navigate to **Connection > SSH > Auth > Credentials** in the left sidebar.
   * Click **Browse**, select your `.ppk` private key file.

   <div align="left"><figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2F2xBCr8uUv1M7vRCkMvQ1%2Fimage.png?alt=media&amp;token=26d4e95e-a1ca-4437-8d58-8258b8bc328d" alt=""><figcaption></figcaption></figure></div>

   * Go back to the **Session** category.
   * Enter a name (e.g., "EMC Node") in **Saved Sessions**, then click **Save**.
   * Click **Open** to connect.

   <div align="left"><figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FvFZOdHDcHFhPqfgFLvk0%2Fimage.png?alt=media&amp;token=79af44ce-7b7b-4b2c-b090-79e03b714290" alt=""><figcaption></figcaption></figure></div>

   * Click **Accept** if prompted with a security alert.

   <div align="left"><figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2F8QgbjR71wk12QZm7PCwx%2Fimage.png?alt=media&amp;token=7d0ada01-296d-4853-b105-1f1fbbf33aa3" alt=""><figcaption></figcaption></figure></div>

   <br>

***

#### 3.2 Install NVIDIA Drivers and Docker

**After launching the PuTTY terminal, make sure to run each command one by one to ensure everything works smoothly.Update and upgrade system:**

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
sudo reboot
```

*Reconnect to your instance after reboot.***Install Docker:**

```bash
curl -fsSL https://get.docker.com -o get-docker.sh && chmod +x get-docker.sh && bash get-docker.sh
```

**Set up NVIDIA container toolkit:**

```bash
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
  && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
```

```bash
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
```

**Test GPU access:**

```bash
nvidia-smi
sudo docker run --rm --gpus=all nvidia/cuda:11.8.0-base-ubuntu22.04 nvidia-smi
```

***

### Part 4: Install EMC Node and Cloud Software

#### 4.1 Install EMC Software

```bash
curl -s https://install.edgematrix.pro/setup_linux.sh | sh
curl -s https://install.edgematrix.pro/setup_cloud_linux.sh | sh
```

***

#### 4.2 Run with tmux (persistent terminal sessions)

```bash
sudo apt install tmux -y
```

**Run EMC node:**

```bash
tmux new -s emc-node
cd ~/emc
./start.sh
```

*(Detach using Ctrl+B, then press D)***Run EMC cloud client:**

```bash
tmux new -s emc-cloud
cd ~/cloud
./cloud_client.sh
```

*(Detach using Ctrl+B, then press D)*

***

#### 4.3 Register the Node

```bash
cd ~/emc
./edge-matrix-computing node register --commit set --node computing --owner 0xYourWalletAddress
```

Replace `0xYourWalletAddress` with your **Arbitrum wallet address**.

***

### Part 5: Monitor and Stake

#### 5.1 Check Node Status

```bash
./edge-matrix-computing version
./edge-matrix-computing secrets output --data-dir edge_data
./edge-matrix-computing node status
```

After 30 minutes to 1 hour, run this command `sudo docker ps | grep edgematrix` and you will see the following output

<div align="left"><figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FnN95FQfiYC1CsLgwEoKq%2Fimage.png?alt=media&amp;token=af5ec869-bb2d-4150-91ce-12c916ae0209" alt=""><figcaption></figcaption></figure></div>

**Step 6: Bind Wallet & Stake Tokens**

**1. Open Your Node Dashboard**&#x20;

🔗 Replace `xxxxxx` with your **Node ID** and visit: <https://dashboard.emc.network/nodes/xxxxxx>

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FpS0RBXjah6HgwdtJIKSE%2Fimage.png?alt=media&amp;token=162630a2-d9d5-45f0-879d-2c9fda7b2396" alt=""><figcaption></figcaption></figure>

**2. Bind Your Wallet**

Click on **“Bind”** to link your wallet to the node; after connecting, a **“Bind Node Success”** message will display.

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FXr59gHQxk3VEQG8Ysnpg%2Fimage.png?alt=media&amp;token=6d9f8931-88b4-498c-aa2f-4b0a102e033e" alt=""><figcaption></figcaption></figure>

**3. Stake EMC Tokens**

Ensure your wallet address is whitelisted on EMC, then stake EMC tokens to activate rewards for your node.

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FOP6vOz472KXZsACDe2Xa%2Fimage.png?alt=media&amp;token=8f30d853-70c6-484f-a76b-150474a50072" alt=""><figcaption></figcaption></figure>

**4. Check Your Rewards**&#x20;

Once staked, monitor your node rewards from the same dashboard. Click the top right on your wallet address and check your active EMC Node rewards

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2F5raM6HbzhBaifin2S6FX%2Fimage.png?alt=media&amp;token=7e51de2a-1369-4eab-bc7d-0bc2cd1aae0f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2FkR9Xal4utkZ8PmTp6KVZ%2Fimage.png?alt=media&amp;token=96413010-733a-4664-9172-affa2242e648" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
***Note:**&#x52;ewards will only appear on the dashboard UI after surpassing **1000 EMC rewards**, as shown as an example below:*
{% endhint %}

<figure><img src="https://1003733059-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCcFTjhPM7zwDNPXWjdyR%2Fuploads%2F2gVVkEXm0VVgkxWxpqdy%2Fimage.png?alt=media&amp;token=824bf824-ab15-43d8-a592-4a38bf3559c7" alt=""><figcaption></figcaption></figure>

* Ensure you have whitelist eligibility by **opening a ticket on the** [**EMC Discord**](https://discordapp.com/channels/1101359709547679848/1199652961681428520) before staking.
* Smart Contract Address deployment: <https://arbiscan.io/address/0xaefdd38de2ad3c301b234be320a2305db082426f>

{% hint style="danger" %}
🚨 If you encounter any issues or bugs, feel free to reach out on Official [**EMC Discord**](https://discord.com/invite/emcnetwork).
{% endhint %}

### 🔐 Why Stake $EMC?

Staking $EMC isn’t just a requirement, it’s how you **earn, contribute, and gain influence** in the EMC ecosystem.By staking, you're not only supporting the backbone of a decentralized AI compute network, you're also unlocking your potential to earn consistent rewards while helping secure a global infrastructure built for AI and DePIN.**Here’s what staking $EMC means for you:**

* **Earn More, Do More**: Active stakers receive priority rewards for task validation and GPU compute participation.
* **Boost the Network**: Your stake helps strengthen EMC’s reliability and ensures AI workloads are processed securely across nodes.
* **Contribute Security**: Stakers are considered core contributors to the ecosystem’s safety and reliability.

***

### 📜 Staking Rules

**Minimum Stake:** A minimum of **10 $EMC** is required to begin staking.**Recommended Stake:** **1000 $EMC or more** for better reward share, and increased contribution recognition within the network.**Unstaking Period:** Once you initiate unstaking, your tokens will enter a **30-day cooldown** period before they become withdrawable. This ensures network stability and fairness for all participants.
