You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何免费搭建区块链节点?求分步指南及部署资源(曾遇Puppeth停用问题)

免费搭建区块链节点的分步指南(替代Puppeth方案)

Puppeth自2023年1月起停止维护,以下是基于主流开源工具的免费节点搭建方案,覆盖资源选择、分步操作及问题排查:

一、免费部署资源选型

  • 云服务商免费额度:AWS EC2 t2.micro实例、Google Cloud e2-micro实例、Azure B1s实例,均提供长期免费算力/存储,适合运行轻量区块链节点
  • 本地闲置设备:若有备用电脑,可直接本地部署,需确保稳定带宽与足够磁盘空间

二、手动搭建以太坊节点(以Geth为例)

步骤1:环境准备

登录目标机器(推荐Ubuntu/Debian系统),执行系统更新与依赖安装:

sudo apt update && sudo apt upgrade -y
sudo apt install -y git build-essential

步骤2:安装Geth客户端

下载预编译二进制包(避免编译耗时,适配免费资源):

wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.12.0-e501b3b0.tar.gz
tar -xvf geth-linux-amd64-1.12.0-e501b3b0.tar.gz
sudo cp geth-linux-amd64-1.12.0-e501b3b0/geth /usr/local/bin/

验证安装:执行geth version,输出版本信息即为成功

步骤3:配置并启动节点

  • 选择节点模式(优先轻节点适配免费资源):
    • 轻节点启动命令:geth --syncmode light
    • 全节点(需大存储,不推荐免费资源):geth --syncmode full
  • 用systemd管理节点后台运行:
    1. 创建服务文件:sudo nano /etc/systemd/system/geth.service
    2. 写入配置内容:
      [Unit]
      Description=Ethereum Geth Node
      After=network.target
      
      [Service]
      User=root
      ExecStart=/usr/local/bin/geth --syncmode light
      Restart=always
      RestartSec=5
      
      [Install]
      WantedBy=multi-user.target
      
    3. 启动并启用服务:
      sudo systemctl daemon-reload
      sudo systemctl start geth
      sudo systemctl enable geth
      
  • 查看同步日志:journalctl -u geth -f,确认区块同步进度正常

三、替代轻量客户端推荐

  • Erigon:内存占用仅为Geth的1/10,同步速度更快,安装启动流程与Geth一致,适合免费资源
  • Nethermind:支持多链的.NET客户端,提供轻量同步模式,适合跨链节点部署
  • 社区部署脚本:克隆以太坊基金会官方脚本一键部署:git clone https://github.com/ethereum/ethereum-devops && cd ethereum-devops && bash setup-geth.sh

四、常见问题排查

  • 同步缓慢:免费实例带宽有限,优先选择轻节点模式,避开网络高峰时段
  • 内存不足:关闭冗余进程,或新增swap分区:sudo fallocate -l 4G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
  • 节点崩溃:通过journalctl -u geth查看日志,调整启动参数(如增加内存限制)

内容的提问来源于stack exchange,提问作者Aditya Yadav

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 22:07:16