# Muon搭建测试网节点

By [kclub](https://paragraph.com/@kclub-2) · 2023-01-29

---

### 项目介绍

Muon是一个去中心化的节点网络，使应用程序能够在链上，链下和跨链上运行。其技术允许项目构建可定制的 web3 解决方案，从而实现超越区块链现有限制的可能性。为了激励 ALICE 测试网上的公共节点，所有运行 ALICE 节点的参与社区成员将有资格获得先锋金丝雀网络上的免费节点。这种“节点掉落”意味着符合条件的用户将获得运行节点所需的（锁定）$PION代币抵押品，这意味着他们可以操作先锋节点并免费获得网络奖励，而无需投资自己的资金

官方推特：

[https://twitter.com/muon\_net](https://twitter.com/muon_net)

dc:

[https://discord.gg/muon](https://discord.gg/muon)

### 推荐的要求

*   4GB内存、双核CPU、20GB存储空间的Linux服务器
    

### 注意事项

*   **NB1:** Muon Nodes need to have high availability and low downtime. Thus, while running a node on a PC/laptop without a valid IP is possible, it is not generally recommended. Moreover, receiving the "node-drop" reward (i.e. running a node on the Canary network without staking) depends on the nodes' up time and if a node is not up, it will be deprived of the reward.
    
    **NB2:** The following installation process is currently tested on Linux. Installing a node on a server with other operating systems may be possible but not officially supported yet.
    

以上为官方原话，即推荐使用云服务器运行，使用个人pc可能无法保持长时间运行从而导致无法获得奖励，推荐使用linux系统，其他系统还未正式支持

### 服务器购买

这边以vultr为例，如果有更便宜的服务器厂商也可自行选择

[https://www.vultr.com/](https://www.vultr.com/)

![](https://storage.googleapis.com/papyrus_images/a4aebe6dddc97238971693bf8adc17fe7b6b9e01bede50ddb75d51b9ce9e0ee2.png)

登陆成功后创建服务器

![](https://storage.googleapis.com/papyrus_images/68eda1f17005a719866698c34bdb19fd2108c54f860e776c9c316633d60198aa.png)

选择普通云计算服务器，上一代的cpu，怎么便宜怎么选

![](https://storage.googleapis.com/papyrus_images/8f6cea4da3f8ea9058e7d801337e72688c25af658ba185b77c793fda41f6de9a.png)

官方推荐的双核cpu以及4g内存，个人习惯选择了centos系统

![](https://storage.googleapis.com/papyrus_images/df7a1a7585664b80cd4937c40d49432134b3d574db997fcb7b4f3154086d4bb2.png)

记得把自动备份关掉，会便宜一些，算下来一个月20刀。

![](https://storage.googleapis.com/papyrus_images/354dce007e3a097d90bab29153ed056bd04e2ff5fcc2f341dfbaf5ffd0f360cd.png)

购买成功后就可以看见服务器在创建状态

![](https://storage.googleapis.com/papyrus_images/51e08e31f74cb626820afb31f9ae41e2fd535871e2809854b6234f399be3dcf4.png)

创建成功后点击Server Details查看服务器状态

![](https://storage.googleapis.com/papyrus_images/64e3d8d444504d854d4545587e0ff5b5ff98244a6ea5f994a71d5f79b770a7d8.png)

里面包含服务器IP，账号，密码。

![](https://storage.googleapis.com/papyrus_images/904db9ce7f9f419729e2f363fbc29d83e76b366df0433b51c553f572da3bf71f.png)

现在需要下载一个xshell来连接服务器

下面是xshell官网下载链接，填写姓名邮箱后在邮箱可收到下载链接。

[https://www.xshell.com/zh/free-for-home-school/](https://www.xshell.com/zh/free-for-home-school/)

安装完软件后打开，新建一个会话，填入IP地址，确定

![](https://storage.googleapis.com/papyrus_images/33eb115ab90430db1f722009ec83efaee81baedcaf3f419d3f83afd2a446b139.png)

选中刚刚新建的会话，点击链接。

![](https://storage.googleapis.com/papyrus_images/03dbdd1d076f5d49672fddbf4571df1b21ddb3fb1117b9ca0bb42ca866049126.png)

输入账号密码，可以点击保存用户名与密码，下次就不用再输入了。

![](https://storage.googleapis.com/papyrus_images/a61fc22a514d79b52c303da05471834436c2b5f589fcfb46d2516c71f58c6911.png)

![](https://storage.googleapis.com/papyrus_images/3f8f8f1177cdf3db3de491b5f82217c3b452142440ec4424b3a1d4b9f3233108.png)

登陆成功后就可以开始安装

![](https://storage.googleapis.com/papyrus_images/6f9554d8900a31ba0a7e4b83bf2ba5779d0104da43989995b0bad4cf87be0511.png)

### 正式安装

以Centos为例，如果安装的是Centos系统，直接对照着下面的命令复制运行就可以了

    #安装git
    yum -y install git
    
    #安装docker存储驱动的依赖包
    dnf install -y device-mapper-persistent-data lvm2
    
    #添加docker源
    dnf config-manager --add-repo=https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    
    #安装docker
    dnf install -y docker-ce --nobest
    
    
    #下载 Docker Compose 的当前稳定版本：
    sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    
    #执行权限应用于二进制文件：
    sudo chmod +x /usr/local/bin/docker-compose
    
    #创建软链:
    sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
    
    #测试是否安装成功：
    docker-compose --version
    
    #启动docker
    sudo systemctl start docker
    
    #拉取Github上的Moun存储库
    git clone https://github.com/muon-protocol/muon-node-js.git --recurse-submodules --branch testnet
    
    #切换目录
    cd muon-node-js
    
    #构建Moun节点
    docker-compose build
    
    #运行节点
    docker-compose up -d
    

运行节点后在浏览器打开

    http://你的服务器IP:8000/status
    

这里的address跟peerId是等会需要用到的

![](https://storage.googleapis.com/papyrus_images/4d4551f0273d80255d569382e04c2c347994a1b5ea1d943f38dc2c7fb98ae50f.png)

打开下面链接

[https://alice.muon.net/join/](https://alice.muon.net/join/)

连接钱包

![](https://storage.googleapis.com/papyrus_images/bcc3f4677e99165a17bb31692069411c507c363b7217fd544bac4ce66bfc9b87.png)

如果没有测试网的bnb可以去水龙头领取一些

![](https://storage.googleapis.com/papyrus_images/54f5dbc95eed95859b8108f3b6d4884c96f167af476b9bc58ee0f5d0a55c2de1.png)

Mint1000个alice

![](https://storage.googleapis.com/papyrus_images/27c79752d9b5c22a1d2b7e00948eb08b91e4f43c5391b7886dce10979d3e09c5.png)

Mint完成后填入刚刚的address跟peerId

![](https://storage.googleapis.com/papyrus_images/10d51731ed60a481370942ae3f3993084c9fdd2f577f2f9b4da9f717d29d0309.png)

添加完成之后再打开

    http://你的服务器IP:8000/status
    

如果节点添加成功，可以看到isOnline状态显示为true

![](https://storage.googleapis.com/papyrus_images/c2dd22203d38d917cad71f7319ed302b60a0bc0dde89485f5bc64662a3c5a357.png)

参考于官方文档：

[https://docs.muon.net/muon-network/muon-nodes/joining-the-testnet-alice](https://docs.muon.net/muon-network/muon-nodes/joining-the-testnet-alice)

---

*Originally published on [kclub](https://paragraph.com/@kclub-2/muon)*
