# Linux Automatic Update Tutorial

**1.  Acquire sub-account**

In order to earn qus, one must mine to a sub-account. Head over to <https://www.apool.top>[ ](https://www.apool.io/)to finish email registration.&#x20;

Apool will allocate a sub-account automatically under your name.  Check out your sub-account name in 'My miners' page.

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2F6wlzyyOLADp1FfwOFP5n%2F%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20240410112842.png?alt=media&#x26;token=fac31930-c33c-4923-8d66-10bda5e427e6" alt=""><figcaption></figcaption></figure>

&#x20;**2. Download the mining software**

* Download link：<https://github.com/apool-io/apoolminer/releases>

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FcyzEFQacOuArA9q3JBEU%2Fimage.png?alt=media&#x26;token=8d18b7f9-fe83-4382-960f-745c6487249b" alt=""><figcaption></figcaption></figure>

* Extract the file with the comand：

```
tar zxf apoolminer_linux_autoupdate_v3.5.0.tar.gz
```

&#x20;**3. Modify the configuration file miner.conf and change the account to your own.**

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FrZiWRnHHaQAFV2X2uTFn%2Fimage.png?alt=media&#x26;token=b87c664c-d764-4b77-a13b-806b493acb99" alt=""><figcaption></figcaption></figure>

**4.apoolminer miner.conf Parameter Description**

<table><thead><tr><th width="203">Param</th><th>Description</th></tr></thead><tbody><tr><td>algo=&#x3C;qubic/aleo></td><td>Specify algorithm, default configuration is qubic , <strong>Required</strong></td></tr><tr><td>account=&#x3C;string></td><td>Specify your sub-account(CP_xxx) in pool mining or Specify your wallet address in solo mining, <strong>Required</strong></td></tr><tr><td>pool=&#x3C;url:port></td><td>Specify the proxy address, <strong>Required in pool mining</strong></td></tr><tr><td>solo=&#x3C;url:port></td><td>Specify the proxy address, <strong>Required in solo mining</strong></td></tr><tr><td>worker=&#x3C;name></td><td>Specify the worker name. The name consists of numbers and letters and cannot exceed 15 characters in length</td></tr><tr><td>gpu=&#x3C;indexes></td><td>Specify the index of GPU. If you’re only running on specific GPUs, please spell out explicitly, example: gpu=0,1,2, If you run all GPUs, you don’t need to configure them.</td></tr><tr><td>thread=&#x3C;num></td><td>Specify the number of CPU thread [default: 0, use all threads]</td></tr><tr><td>cpu-off=&#x3C;true/false></td><td>If you don’t want to use CPU, please configure it to True.</td></tr><tr><td>gpu-off=&#x3C;true/false></td><td>If you don’t want to use GPU, please configure it to True.</td></tr><tr><td>xmr-gpu-off=&#x3C;true/false></td><td>If you don't want to use the GPU during XMR mining time, please set this option to True.</td></tr><tr><td>xmr-cpu-off=&#x3C;true/false></td><td>If you don't want to use the CPU during XMR mining time, please set this option to True.</td></tr><tr><td>xmr-thread=&#x3C;num></td><td>Number of CPU threads to use during XMR mining time</td></tr></tbody></table>

**Configuration file example**

* Configuration files for mining with GPU and CPU (Recommended mining configuration for all resources)

  ```
  algo=qubic
  account=my_sub_account
  pool=qubic.asia.apool.io:4334
  ```
* Configuration files for mining with GPU only

  ```
  algo=qubic
  account=my_sub_account
  pool=qubic.asia.apool.io:4334
  cpu-off=true
  ```
* Configuration files for mining with CPU only

  ```
  algo=qubic
  account=my_sub_account
  pool=qubic.asia.apool.io:4334
  gpu-off=true
  ```
* Configuration files for mining with CPU and specify the number of CPU thread

  <pre><code><strong>algo=qubic
  </strong>account=my_sub_account
  pool=qubic.asia.apool.io:4334
  gpu-off=true
  thread=8
  </code></pre>
* Connect using SSL/TLS encryption

  ```
  algo=qubic
  account=my_sub_account
  pool=qubic.asia.apool.io:4334
  gpu-off=true
  ```

**5.Run and shutdown**

* #### Select the execution script according to your needs

  * [ ] &#x20;<mark style="color:red;">Autoupgrade Start command</mark>

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2F2OwuXIfa1ycQglq9ctDB%2Fimage.png?alt=media&#x26;token=e310658c-f554-4cca-94a0-679b1f10530e" alt=""><figcaption><p><mark style="color:red;">Autoupgrade Start command</mark></p></figcaption></figure>

* If you want to run an automatic upgrade of apoolminer, you can execute the upgrade\_and\_run.sh script

```
nohup bash upgrade_and_run.sh > nohup.out 2>&1 &
```

&#x20;

* [ ] &#x20;<mark style="color:red;">Manually operated Start command</mark>

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FyAbk4a0NkMg7oAwKsXpX%2Fimage.png?alt=media&#x26;token=c0381b1c-e646-4233-8072-9a17789d2c1e" alt=""><figcaption><p><mark style="color:red;">Manually operated Start command</mark></p></figcaption></figure>

* If you do not need to automatically upgrade apoolminer, you can execute the run.sh script

```
bash run.sh
```

**6.** View apoolminer log

```
tail -f qubic.log
```

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FwbSsaCdU0eAawGKL9KcH%2Fimage.png?alt=media&#x26;token=e32e8d1f-3ff5-4e5f-8da6-5328199a1e12" alt=""><figcaption></figcaption></figure>

**7.**&#x73;hutdown apoolminer command

```
killall -9 apoolminer
```

&#x20;

**8.**&#x73;hutdown autoupgrade script

If you are running an automatic upgrade script, use the following command to shutdown and it will no longer be upgraded.

```
for i in $(ps aux|grep "upgrade_and_run"|grep -v grep |awk '{print $2}'); do sudo kill -9 $i; done
```

**9. Watch the Statistics and earn QU's on Apool**

<https://www.apool.io/myMiner>


---

# 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://apool.gitbook.io/help/qubic-pool-tutorial/linux-automatic-update-tutorial.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.
