# 如何分享自己的节点

前提：

* 您的节点需要有公网 IP；
* 服务器关闭防火墙；
* 在服务器供应商控制台放行 6180 和 8080 端口；

### 修改节点监听的地址

编辑 public full node.yaml 文件，将 `listen_address` 修改为 `0.0.0.0` ，使得能监听来自外部 IP 的流量。

如下图所示：

![](/files/aAEVwH3h7XLHuaiGUJHt)

### 映射节点端口

修改 docker-compose.yaml 文件，将 6180 暴露给公网。

新增一行 `- "6180:6180"` ，如下图所示：

![](/files/zdAP3di8ujBcPgNXQHUK)

### 重启节点

输入如下命令重启：

```
docker-compose down
docker-compose up
```

### 端口检测

可以使用[站长工具](https://tool.chinaz.com/port/)检测：

{% hint style="info" %}
若是开启状态，则可以继续下面的步骤分享。

如果是关闭状态，请检查节点运行状态、配置文件是否修改成功、防火墙是否关闭或放行 6180 端口。
{% endhint %}

![](/files/zDGfOMrbXzkh1cb1xEnb)

### 组装节点 seeds 信息

以下是格式说明：

```
<Peer_ID>:
  addresses:
  # with DNS
  - "/dns4/<DNS_Name>/tcp/<Port_Number>/noise-ik/<Public_Key>/handshake/0"
  role: Upstream
<Peer_ID>:
  addresses:
  # with IP
  - "/ip4/<IP_Address>/tcp/<Port_Number>/noise-ik/<Public_Key>/handshake/0"
  role: Upstream
```

#### 方式一：IP 地址

假设：

* 您的 IP 为 5.161.43.102；
* 公钥和 Peer ID 是 1741d4ef7b057349f8162b50b84b5959c872c927fba037a502aeca0da4b60d3e；

那么组装结果为：

```
1741d4ef7b057349f8162b50b84b5959c872c927fba037a502aeca0da4b60d3e:
  addresses:
  - "/ip4/5.161.43.102/tcp/6180/noise-ik/1741d4ef7b057349f8162b50b84b5959c872c927fba037a502aeca0da4b60d3e/handshake/0"
  role: "Upstream"
```

#### 方式二：域名

若您有域名，且域名解析到了节点服务器，则可以使用该方式。

假设：

* 您的节点域名为 node1.devnet.aptos.movemove.org（<mark style="color:blue;">该节点域名仅作演示，实际不存在</mark>）
* 公钥和 Peer ID 是 1741d4ef7b057349f8162b50b84b5959c872c927fba037a502aeca0da4b60d3e；

那么组装结果为：

```
1741d4ef7b057349f8162b50b84b5959c872c927fba037a502aeca0da4b60d3e:
  addresses:
  - "/dns4/node1.devnet.aptos.movemove.org/tcp/6180/noise-ik/1741d4ef7b057349f8162b50b84b5959c872c927fba037a502aeca0da4b60d3e/handshake/0"
  role: Upstream
```

{% hint style="info" %}
您也可以向社区提交 issue，以共享您的节点，<mark style="color:red;">提交前请确保您的节点可用，并长期维护</mark>。

地址：<https://github.com/jiangydev/aptos-node/issues>
{% endhint %}


---

# 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://wiki.aptos.movemove.org/wen-ti-faq/ru-he-fen-xiang-zi-ji-de-jie-dian.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.
