{"id":21813952,"url":"https://github.com/genaronetwork/genaroshare_daemon","last_synced_at":"2026-05-21T07:02:50.007Z","repository":{"id":91573414,"uuid":"123665060","full_name":"GenaroNetwork/GenaroShare_Daemon","owner":"GenaroNetwork","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-26T09:28:33.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-26T06:10:04.224Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GenaroNetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-03T06:10:20.000Z","updated_at":"2019-11-06T07:24:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e3989ef-c918-4725-bff4-fa765118aa36","html_url":"https://github.com/GenaroNetwork/GenaroShare_Daemon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2FGenaroShare_Daemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2FGenaroShare_Daemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2FGenaroShare_Daemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2FGenaroShare_Daemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GenaroNetwork","download_url":"https://codeload.github.com/GenaroNetwork/GenaroShare_Daemon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244769185,"owners_count":20507403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T14:34:34.811Z","updated_at":"2026-05-21T07:02:44.963Z","avatar_url":"https://github.com/GenaroNetwork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Genaro Share Daemon\n==================\n\nDaemon + CLI for farming data on the Genaro network, suitable for standalone\nuse or inclusion in other packages.\n\n中文说明请往下滚动看下半部分\n\n## Manual Installation\n\nMake sure you have the following prerequisites installed:\n\n* Git\n* Node.js LTS (8.x.x)\n* NPM\n* Python 2.7\n* GCC/G++/Make\n\n### Node.js + NPM\n\n#### GNU+Linux \u0026 Mac OSX\n\n```\nwget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash\n```\n\nClose your shell and open an new one. Now that you can call the `nvm` program,\ninstall Node.js (which comes with NPM):\n\n```\nnvm install --lts\n```\n\n#### Windows\n\nDownload [Node.js LTS](https://nodejs.org/en/download/) for Windows, launch the\ninstaller and follow the setup instructions. Restart your PC, then test it from\nthe command prompt:\n\n```\nnode --version\nnpm --version\n```\n\n### Build Dependencies\n\n#### GNU+Linux\n\nDebian based (like Ubuntu)\n```\napt install git python build-essential\n```\n\nRed Hat / Centos\n```\nyum groupinstall 'Development Tools'\n```\nYou might also find yourself lacking a C++11 compiler - [see this](http://hiltmon.com/blog/2015/08/09/c-plus-plus-11-on-centos-6-dot-6/)\n\n#### Mac OSX\n\n```\nxcode-select --install\n```\n\n#### Windows\n\n```\nnpm install --global windows-build-tools\n```\n\n---\n\nOnce build dependencies have been installed for your platform, install the\npackage globally using Node Package Manager:\n\n```\nnpm install --global genaroshare-daemon\n```\n\n## Usage (CLI)\n\nOnce installed, you will have access to the `genaroshare` program, so start by\nasking it for some help.\n\n```\ngenaroshare --help\n\n  Usage: genaroshare [options] [command]\n\n\n  Commands:\n\n    start          start a farming node\n    stake          stake the farming node\n    addNodes       add storage nodes\n    stop           stop a farming node\n    restart        restart a farming node\n    status         check status of node(s)\n    logs           tail the logs for a node\n    create         create a new configuration\n    destroy        kills the farming node\n    killall        kills all shares and stops the daemon\n    createWallet   create a new wallet\n    listWallets    list wallets\n    deleteWallet   delete wallet\n    daemon         starts the daemon\n    help [cmd]     display help for [cmd]\n\n  Options:\n\n    -h, --help     output usage information\n    -V, --version  output the version number\n```\n\nYou can also get more detailed help for a specific command.\n\n```\ngenaroshare help create\n\n  Usage: genaroshare-create [options]\n\n  generates a new share configuration\n\n  Options:\n\n    --name \u003cname\u003e              specify the account name(required)\n    --password \u003cpassword\u003e      specify the account password(required)\n    --key \u003cprivkey\u003e            specify the private key\n    --storage \u003cpath\u003e           specify the storage path\n    --size \u003cmaxsize\u003e           specify node size (ex: 10GB, 1TB)\n    --rpcport \u003cport\u003e           specify the rpc port number\n    --rpcaddress \u003caddr\u003e        specify the rpc address\n    --maxtunnels \u003ctunnels\u003e     specify the max tunnels\n    --tunnelportmin \u003cport\u003e     specify min gateway port\n    --tunnelportmax \u003cport\u003e     specify max gateway port\n    --manualforwarding         do not use nat traversal strategies\n    --verbosity \u003cverbosity\u003e    specify the logger verbosity\n    --logdir \u003cpath\u003e            specify the log directory\n    --noedit                   do not open generated config in editor\n    -o, --outfile \u003cwritepath\u003e  write config to path\n    -h, --help                 output usage information\n\n    -o, --outfile \u003cwritepath\u003e  write config to path\n```\n\n## Configuring the Daemon\n\nThe Genaro Share daemon loads configuration from anywhere the\n[rc](https://www.npmjs.com/package/rc) package can read it. The first time you\nrun the daemon, it will create a directory in `$HOME/.config/genaroshare`, so\nthe simplest way to change the daemon's behavior is to create a file at\n`$HOME/.config/genaroshare/config` containing the following:\n\n```json\n{\n  \"daemonRpcPort\": 45016,\n  \"daemonRpcAddress\": \"127.0.0.1\",\n  \"daemonLogFilePath\": \"\",\n  \"daemonLogVerbosity\": 3\n}\n```\n\nModify these parameters to your liking, see `example/daemon.config.json` for\ndetailed explanation of these properties.\n\n## Debugging the Daemon\n\nThe daemon logs activity to the configured log file, which by default is\n`$HOME/.config/genaroshare/logs/daemon.log`. However if you find yourself\nneeding to frequently restart the daemon and check the logs during\ndevelopment, you can run the daemon as a foreground process for a tighter\nfeedback loop.\n\n```\ngenaroshare killall\ngenaroshare daemon --foreground\n```\n\n#### Updating genaroshare and restoring sessions\n\nIf you want to upgrade genaroshare you can save your current session and\nreload it after updating\n\n```\ngenaroshare save\ngenaroshare killall\nnpm install -g genaroshare-daemon\ngenaroshare daemon \u0026\ngenaroshare load\n```\n\n中文说明\n==================\n\nDaemon + CLI 是在 Genaro Network 上面 farming 的软件, 可以独立使用，也可以用在其他的软件中.\n\n## 手动安装\n\n确保您已安装以下依赖:\n\n* Git\n* Node.js LTS (8.x.x)\n* NPM\n* Python 2.7\n* GCC/G++/Make\n\n### Node.js + NPM\n\n#### GNU+Linux \u0026 Mac OSX\n\n```\nwget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash\n```\n\n关闭你的控制台，然后新开一个控制台. 现在您可以调用 `nvm` 程序\n安装 Node.js (与 NPM 在一起):\n\n```\nnvm install --lts\n```\n\n#### Windows\n\n下载 [Node.js LTS](https://nodejs.org/en/download/) 的 Windows 版本, 打开安装文件，然后按照提示进行. 重启您的电脑, 然后用以下命令测试:\n\n```\nnode --version\nnpm --version\n```\n\n### 编译依赖项\n\n#### GNU+Linux\n\n基于 Debian (例如 Ubuntu)\n```\napt install git python build-essential\n```\n\nRed Hat / Centos\n```\nyum groupinstall 'Development Tools'\n```\n您也许发现需要一个 c++ 11 的编译器 - [请看这里](http://hiltmon.com/blog/2015/08/09/c-plus-plus-11-on-centos-6-dot-6/)\n\n#### Mac OSX\n\n```\nxcode-select --install\n```\n\n#### Windows\n\n```\nnpm install --global windows-build-tools\n```\n\n---\n\n一旦编译依赖项在您的平台上安装成功, 全局安装下面的软件包:\n\n```\nnpm install --global genaroshare-daemon\n```\n\n## 使用方式 (命令行)\n\n一旦安装成功, 您就可以使用 `genaroshare` 程序, 可以以帮助开始.\n\n```\ngenaroshare --help\n\n  Usage: genaroshare [options] [command]\n\n\n  Commands:\n\n    start          start a farming node\n    stake          stake the farming node\n    addNodes       add storage nodes\n    stop           stop a farming node\n    restart        restart a farming node\n    status         check status of node(s)\n    logs           tail the logs for a node\n    create         create a new configuration\n    destroy        kills the farming node\n    killall        kills all shares and stops the daemon\n    createWallet   create a new wallet\n    listWallets    list wallets\n    deleteWallet   delete wallet\n    daemon         starts the daemon\n    help [cmd]     display help for [cmd]\n\n  Options:\n\n    -h, --help     output usage information\n    -V, --version  output the version number\n```\n\n您也可以获得某个特定命令的详细帮助\n\n```\ngenaroshare help create\n\n  Usage: genaroshare-create [options]\n\n  generates a new share configuration\n\n  Options:\n\n    --key \u003cprivkey\u003e            specify the private key\n    --storage \u003cpath\u003e           specify the storage path\n    --size \u003cmaxsize\u003e           specify node size (ex: 10GB, 1TB)\n    --rpcport \u003cport\u003e           specify the rpc port number\n    --rpcaddress \u003caddr\u003e        specify the rpc address\n    --maxtunnels \u003ctunnels\u003e     specify the max tunnels\n    --tunnelportmin \u003cport\u003e     specify min gateway port\n    --tunnelportmax \u003cport\u003e     specify max gateway port\n    --manualforwarding         do not use nat traversal strategies\n    --verbosity \u003cverbosity\u003e    specify the logger verbosity\n    --logdir \u003cpath\u003e            specify the log directory\n    --noedit                   do not open generated config in editor\n    -o, --outfile \u003cwritepath\u003e  write config to path\n    -h, --help                 output usage information\n\n```\n\n## 配置 Daemon\n\nGenaro Share daemon 载入配置文件从任何\n[rc](https://www.npmjs.com/package/rc) 软件可以读取的地方. 首次运行时, 他将在目录 `$HOME/.config/genaroshare` 新建文件夹, 所以改变 daemon 行为的最简单的方式是再如下目录新建一个文件`$HOME/.config/genaroshare/config`，包含以下内容：\n\n```json\n{\n  \"daemonRpcPort\": 45016,\n  \"daemonRpcAddress\": \"127.0.0.1\",\n  \"daemonLogFilePath\": \"\",\n  \"daemonLogVerbosity\": 3\n}\n```\n\n按照您的兴趣修改上面的参数, 查看 `example/daemon.config.json` 文件以获取详细说明。\n\n## 调试 Daemon\n\ndaemon 会记录日志至日志文件, 默认为\n`$HOME/.config/genaroshare/logs/daemon.log`. 然而如果您发现需要经常重启并查看日志的话，您可以将 daemon 启动在前台，以获得即时反馈。\n\n```\ngenaroshare killall\ngenaroshare daemon --foreground\n```\n#### 更新 genaroshare 恢复会话\n\n如果您需要升级 genaroshare 可以先保存会话并在升级后重新载入会话\n\n```\ngenaroshare save\ngenaroshare killall\nnpm install -g genaroshare-daemon\ngenaroshare daemon \u0026\ngenaroshare load\n```\n\n## farming 基本步骤\n在安装 genaroshare 完成后需要做以下操作开始分享硬盘\n1. 创建配置文件: genaroshare-create 。完成后输出配置文件路径。\n2. 按照需求，修改创建好的配置文件\n3. 使用genaroshare-stake开始stake自己的钱包。完成后会获得一个txhash。\n4. 使用genaroshare-addNode将刚才创建的节点添加到自己的钱包下。完成后会获得一个txhash\n5. 开启 daemon: genaroshare-daemon\n6. 开始 farming: genaroshare-start -c \u003c配置文件路径\u003e\n7. 查看分享状态 genaroshare-status\n\n# FAQ\n\n- 为什么需要 stake，我不 stake 能否用 sharer 分享?\n\nstake 行为的目的在于提高矿工们开启分享节点的积极性，尽可能保证大部分节点能够长期有效在线的机制。不进行stake也能进行分享，但是在不stake的情况下，无法使用addNodes将节点和钱包地址绑定来获取收益。\n\n- Stake 的 GNX 可以取出来吗？\n\nStake 时，除了设置 GNX 押注量之外。押注的这一部分 GNX 在退注前将无法使用。\n    \n- 什么是公网 ip ，没有公网 ip 是否能分享?\n\nIP 地址即 Internet Protocol Address，公网 IP 地址是任何接入 Internet 的设备都可以访问的 IP 地址，在 Internet 中是全球唯一的。所谓公网是 Internet 的接入方式，使得上网的计算机得到的IP地址是 Internet 上的非保留地址，公网的计算机和 Internet 上的其他计算机可以随意互相访问。对于家庭网络用户来说，你的 ISP (网络运营商，例如中国电信，联通等) 负责分配给你 IP，但是这个 IP 还不一定是公网 IP，需要到拨号的设备（一般是路由器，也有可能是路由器和 modern 二合一的设备）检查，如果不是公网 IP 那么您可以与你的 ISP 沟通。如果你运行 genaro sharer 的设备没有公网 IP 而路由器有，可以启用路由器的 Upnp 功能，或者自行设置端口转发，这样也同样可以分享。\n\n- 发现 sharer 运行问题怎么办？\n  - 可以自查原因，检查所使用的 sharer 是否是最新版本；或可通过sharer提示的错误，排查由于网络或计算机本身导致的 sharer 运行不正常的原因；\n  - 通过社区咨询解决方案；加入微信群请加微信管理员：imairei6221217 注明 Genaro Sharer 问题。\n  - 向 genaro 官方反馈问题，反馈问题是请提供计算机系统、版本、sharer 版本、问题现象、错误提示、日志等信息；邮件 eden@genaro.network\n\n- Linux 环境下的 genaroshare 是否能导入已经存在的钱包。如想把 IMtoken 钱包导入到 genaroshare 中?\n\nLinux 现在没有这个功能，Windows/Mac 的 GUI 版本可以。这个功能我们已经加入待开发列表。\n\n- 我可以用 NAS 设备运行 Sharer 吗？\n\n取决于你的 NAS 设备的配置，操作系统等。一般来说是可以的，但是 Genaro 团队没有测试所有型号的 NAS，不保证可以运行。另外操作 NAS 需要一定的技术基础，至少要熟悉 Linux 命令行(大部分 NAS 都是 linux 系统)，以及配置操作系统的 ip ，能够解决 Node 安装，编译时会遇到的各种问题。由于 NAS 品牌设备种类多，Genaro 团队不会对 NAS 设备的运行做专门的技术支持。\n\n- 节点配置问题，团队能否推荐好的节点配置？nas 做节点效率高还是电脑磁盘阵列效率高？\n\n对于磁盘没有很高的要求。通常情况下能否获得更多的分享取决于你的网络连接是否够快，与上传文件的用户的链接是否够快。以及是否持续稳定在线。\n\n- 某些列不同的颜色都表示什么样的状态？\n\nStatus/状态：\n\n灰色：stopped，未开启；\n\n绿色：running，正常运行；\n\n红色：errored，出错；\n\n\nDelta/延迟：\n\n绿色：延迟在500以内；\n\n红色：延迟超过500；\n\n\nPort/端口：\n\n绿色：非私网IP，且根据配置文件中的rpcAddress和rpcPort可成功建立socket连接；\n\n黄色：无法直接接受用户文件，但成功进行tunnel连接，可通过tunnel接受到文件；\n\n红色：配置文件中doNotTraverseNat（不进行Nat穿透）配置为true且不是公网IP；\n\n\nBridges/桥接：\n\n灰色：disconnected，未连接；\n\n黄色：connecting，正在连接中；\n\n橙色：confirming，验证用户中；\n\n绿色：connected，正常连接；","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenaronetwork%2Fgenaroshare_daemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenaronetwork%2Fgenaroshare_daemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenaronetwork%2Fgenaroshare_daemon/lists"}