> 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="/files/wNiSgZ0IE1TfyBv4PGzF" alt=""><figcaption></figcaption></figure>

3. Complete the signup process

#### 1.2 Request GPU Quota

<figure><img src="/files/WepipO036mmalkMYkns0" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/2hffW8npvKQDgRIXB7fM" alt=""><figcaption></figcaption></figure>

3. Search for "Running On-Demand G"

<figure><img src="/files/usyZGCpcgariyDu7LtgI" 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="/files/PMifrQ2Nmc94496h0v0n" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/hq5mb4SHIDiFL6spgFE5" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/5a7My54hDllp2LbKjcDU" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/HskeN4efQBLaHURuZaTM" alt=""><figcaption></figcaption></figure>

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

<div align="left"><figure><img src="/files/Kec025EU28b5vVg4M8jg" alt=""><figcaption></figcaption></figure></div>

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

<figure><img src="/files/P7FbbaFwH1qK2fdxMN4B" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/hIEWFK9xqidpVzRuJGVf" alt=""><figcaption></figcaption></figure>

8. Click "Launch instance"

<figure><img src="/files/9zMRTmd3m866OgaqZQP3" 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="/files/8Y81rv0gpG0fLltW75uq" 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="/files/04PkoU5EZN7Rz5GztsXL" 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="/files/dWf8GZmVy9tFNoL27kKd" 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="/files/zz2Xq7ZXUJbNBWOS0GWW" 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="/files/4Y63gPQG8cscuJ3eZ6ad" alt=""><figcaption></figcaption></figure></div>

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

   <div align="left"><figure><img src="/files/buJRtsiLt9HjH7IYoZhh" 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="/files/LgLqiKSs1pEl27GGEUiT" 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="/files/L6MViO1lWHzVhC96sTKE" 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="/files/TwMvcrlL05faDlbd2j8K" 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="/files/GGoUo4xPoyX1aQBEhKgq" 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="/files/WlEx9DnYl1TveGX479Ee" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/yYQW15XMRzb91dQM3Pba" 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="/files/L7il4rDkBbTQm8udNpip" 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.
