NodeRunner ?
在你的 Minecraft 服务器内直接运行你的 Node.js Discord 机器人——无需 VPS、无需额外托管、无需 SSH。
NodeRunner 是一个 Paper 插件,它将 Node.js 进程作为 Minecraft 服务器的子进程进行管理。它自动处理一切:下载 Node.js、安装依赖项、崩溃后重启、通过 Web 仪表板实时流式传输日志以及发送 Discord 通知——所有操作都只需一个 config.yml。
? 1.4.0 更新内容
Java 25 & 构建现代化
- 升级至 Java 25 — 使用 Java 25 字节码编译,以获得最新的 JVM 性能和语言特性。
- Gradle 9.5.1 — 构建系统从 Gradle 8.x 升级至 9.5.1,以原生支持 Java 25。
- 虚拟线程执行器 — 仪表板的 HTTP 服务器现在使用
newVirtualThreadPerTaskExecutor(),在 Java 25 上实现非阻塞 I/O 扩展。
plugin.yml api-version 已更新为 1.21,以匹配目标平台。
兼容性
- Minecraft 1.21.x – 26.2.x — 基于 Paper 1.21.1 API 编译,向前兼容所有直至 26.2.x 版本的 Paper。
现有配置完全兼容——无需更改配置。
✨ 功能
⚡ 零接触 Node.js 设置
服务器上没装 Node.js?没问题。NodeRunner 会自动检测你的操作系统和 CPU 架构,并在首次启动时下载正确的 Node.js LTS 二进制文件。适用于 Linux (x64 & ARM64)、macOS 和 Windows。仅下载一次(约 30MB),永久缓存。
? 自动依赖安装
有 package.json?当检测到缺少 node_modules 时,NodeRunner 会在启动前自动运行 npm install。无需手动干预。
? 崩溃恢复与循环保护
你的机器人受到持续监控。发生崩溃时,NodeRunner 会等待一段可配置的时间并重启它。如果在短时间内崩溃次数过多,崩溃循环保护将停止重试并发出警报——避免无限的重启刷屏。
?️ 实时 Web 仪表板
内置的、受密码保护的控制面板,可从任何浏览器访问:
- 实时日志流式传输 通过 Server-Sent Events(无需刷新页面)
- 开始 / 停止 / 重启 / npm install 按钮
- 实时状态、运行时间、PID、重启计数和内存使用情况
- stdin 输入栏 — 直接向机器人进程发送命令
- 多机器人选择器 — 从仪表板切换机器人(自动检测)
- 带自动滚动切换功能的彩色编码日志输出
- 所有修改端点的 CSRF 保护
- 暴力登录保护 — 5 次失败尝试后锁定
? Discord Webhook 通知
当你的机器人启动、停止、崩溃或运行 npm install 时,通过标准 Webhook URL 在 Discord 中收到提醒。无需机器人令牌。每种事件类型均可单独开关。
? 游戏内命令
通过 Minecraft 控制台或游戏内的 /nodebot 进行完全控制。无需 SSH 会话即可重启机器人。
? 多机器人支持
同时运行多个 Node.js 机器人——每个机器人拥有自己的进程、日志文件和独立的崩溃恢复机制。使用 /nodebot start <name>、/nodebot stop <name> 等命令单独控制每个机器人。
? Node.js 版本固定
固定特定的 Node.js 主版本(例如 "22"),而不是始终下载最新的 LTS 版本。如果你的机器人需要特定的运行时版本,这非常有用。
? stdin 透传
直接从 Web 仪表板向机器人进程发送输入,而无需重启它——这对于接受通过 stdin 的控制台命令的机器人很有用。
? 内存监控
Web 仪表板显示机器人进程的实时内存使用情况(RSS),直接从 Linux 上的 /proc/<pid>/status 读取。
? TunnelMC 集成
如果安装了 TunnelMC 并且仪表板端口上有活动的隧道,NodeRunner 将在机器人启动时将公共 URL 打印到控制台——仅提供信息用途,绝不会自动启动 TunnelMC。
? Pterodactyl 兼容
已在 Pterodactyl 面板上全面测试。使用 .tar.gz 提取 Node.js(无 xz 依赖),并将 node 二进制文件正确注入进程 PATH,以确保容器内的 npm 兼容性。
? 安装
- 将
NodeRunner.jar 放入你的 plugins/ 文件夹
- 启动服务器一次以生成配置文件
- 将你的机器人代码放在
plugins/NodeRunner/bot/ 中(需要 index.js + package.json)
- 在
config.yml 的 env: 下设置你的机器人令牌和其他任何密钥
- 重启,或运行
/nodebot start
NodeRunner 处理其余部分——Node.js 下载、npm install 和机器人启动全部自动完成。
? 文件结构
plugins/
NodeRunner/
config.yml ← 所有插件设置
bot/ ← 你的机器人代码放在这里
index.js
package.json
logs/
bot.log ← 实时输出(5MB 轮换,保留 3 个备份)
bot-<name>.log ← 使用多个机器人时的单个机器人日志文件
nodejs/ ← 自动下载的 Node.js 二进制文件(不要触碰)
? 命令与权限
权限: noderunner.admin (默认:OP)
| 命令 |
描述 |
/nodebot start [name] |
启动机器人(或通过名称启动特定机器人) |
/nodebot stop [name] |
停止机器人(或通过名称停止特定机器人) |
/nodebot restart [name] |
重启机器人(或通过名称重启特定机器人) |
/nodebot status [name] |
显示所有机器人或特定机器人的状态 |
/nodebot install [name] |
强制重新运行 npm install |
/nodebot reload |
重新加载 config.yml |
? Web 仪表板
访问地址为 http://<your-server-ip>:8080(端口可配置)。
默认启用密码保护——在向公众开放之前,请在 config.yml 中更改默认密码。
Pterodactyl 用户: 仪表板需要第二个分配的端口。让你的主机添加一个,或使用 TunnelMC 或 Cloudflare Tunnel 在不添加端口的情况下暴露它。
? Discord Webhook 设置
- 进入你的 Discord 频道 → 编辑频道 → 集成 → Webhooks → 新建 Webhook
- 复制 Webhook URL
- 将其粘贴到
config.yml 中的 discord.webhook.url 下
- 设置
discord.webhook.enabled: true
- 重启服务器或运行
/nodebot reload
? Pterodactyl 注意事项
NodeRunner 已在 Pterodactyl 上经过全面测试。请注意:
- 该插件使用
.tar.gz 格式的 Node.js,以避免大多数容器镜像中缺少 xz 依赖的问题
- 如果之前的安装失败,请删除
plugins/NodeRunner/nodejs/ 目录并重启以重新下载
- 通过
config.yml 中的 env: 设置你的机器人令牌和其他密钥——切勿在机器人文件中硬编码这些内容
- 面板需要单独分配的端口——请联系你的主机提供商添加一个端口
? 兼容性
|
|
| Minecraft |
Paper 1.21.x – 26.2.x |
| Java |
25+(使用 Java 25 编译) |
| 操作系统 |
Linux, macOS, Windows |
| 架构 |
x64, ARM64 |
| 托管方式 |
自建、Pterodactyl、任意 VPS |
⚠️ 需要 Java 25: JAR 文件使用 Java 25 编译,并使用虚拟线程。你的服务器必须运行 Java 25 或更高版本。Paper 1.21.x+ 搭配 Java 25 是推荐且经过全面测试的配置。
? 相关资源
TunnelMC — 通过 ngrok 隧道将任意服务器端口暴露到互联网。与 NodeRunner 完美配合,无需额外分配端口即可让 Web 面板对公众可访问。
PyRunner — 本插件的 Python 等效版本。在你的 Minecraft 服务器旁运行一个 Python Discord 机器人。
? 许可证
保留所有权利 — 本插件及其源代码均为专有软件。未经作者明确书面许可,你不得复制、重新分发、修改或反编译此软件。
由 Spider 开发
NodeRunner ?
Run your Node.js Discord bot directly inside your Minecraft server — no VPS, no extra hosting, no SSH.
NodeRunner is a Paper plugin that manages a Node.js process as a child of your Minecraft server. It handles everything automatically: downloading Node.js, installing dependencies, restarting on crash, live log streaming via a web dashboard, and Discord notifications — all from one config.yml.
? What's new in 1.4.0
Java 25 & Build Modernization
- Upgraded to Java 25 — compiled with Java 25 bytecode for the latest JVM performance and language features.
- Gradle 9.5.1 — build system upgraded from Gradle 8.x to 9.5.1 for native Java 25 support.
- Virtual thread executor — the dashboard HTTP server now uses
newVirtualThreadPerTaskExecutor() for non-blocking I/O scaling on Java 25.
plugin.yml api-version updated to 1.21 to match the target platform.
Compatibility
- Minecraft 1.21.x – 26.2.x — compiled against Paper 1.21.1 API, which is forward-compatible with all Paper versions through 26.2.x.
Existing configs remain fully compatible — no config changes required.
✨ Features
⚡ Zero-Touch Node.js Setup
No Node.js on your server? No problem. NodeRunner auto-detects your OS and CPU architecture and downloads the correct Node.js LTS binary on first launch. Works on Linux (x64 & ARM64), macOS, and Windows. Downloaded once (~30MB), cached forever.
? Automatic Dependency Installation
Got a package.json? NodeRunner runs npm install automatically before launch whenever node_modules is missing. No manual intervention needed.
? Crash Recovery & Loop Protection
Your bot is monitored constantly. On crash, NodeRunner waits a configurable delay and restarts it. If it crashes too many times within a short window, crash-loop protection halts retries and alerts you — no infinite restart spam.
?️ Live Web Dashboard
A built-in, password-protected control panel accessible from any browser:
- Live log streaming via Server-Sent Events (no page refresh)
- Start / Stop / Restart / npm install buttons
- Real-time status, uptime, PID, restart count, and memory usage
- stdin input bar — send commands directly to the bot process
- Multi-bot selector — switch between bots from the dashboard (auto-detected)
- Color-coded log output with auto-scroll toggle
- CSRF protection on all mutating endpoints
- Brute-force login protection — lockout after 5 failed attempts
? Discord Webhook Notifications
Get pinged in Discord when your bot starts, stops, crashes, or when npm install runs — via a standard webhook URL. No bot token required. Every event type is individually toggleable.
? In-Game Commands
Full control from the Minecraft console or in-game via /nodebot. No SSH session needed just to restart your bot.
? Multiple Bot Support
Run more than one Node.js bot simultaneously — each with its own process, log file, and independent crash recovery. Control each bot individually with /nodebot start <name>, /nodebot stop <name>, etc.
? Node.js Version Pinning
Pin a specific Node.js major version (e.g. "22") instead of always downloading the latest LTS. Useful if your bot requires a specific runtime version.
? stdin Passthrough
Send input directly to the bot process from the web dashboard without restarting it — useful for bots that accept console commands via stdin.
? Memory Monitoring
The web dashboard shows live memory usage (RSS) of the bot process, read directly from /proc/<pid>/status on Linux.
? TunnelMC Integration
If TunnelMC is installed and has an active tunnel on the dashboard port, NodeRunner will print the public URL to console when the bot starts — purely informational, TunnelMC is never auto-started.
? Pterodactyl Compatible
Fully tested on Pterodactyl panels. Uses .tar.gz for Node.js extraction (no xz dependency), and correctly injects the node binary into the process PATH for npm compatibility inside containers.
? Installation
- Drop
NodeRunner.jar into your plugins/ folder
- Start the server once to generate config files
- Place your bot code in
plugins/NodeRunner/bot/ (needs index.js + package.json)
- Set your bot token and any other secrets under
env: in config.yml
- Restart, or run
/nodebot start
NodeRunner handles the rest — Node.js download, npm install, and bot launch all happen automatically.
? File Structure
plugins/
NodeRunner/
config.yml ← All plugin settings
bot/ ← Your bot code goes here
index.js
package.json
logs/
bot.log ← Live output (rotates at 5MB, keeps 3 backups)
bot-<name>.log ← Per-bot log files when using multiple bots
nodejs/ ← Auto-downloaded Node.js binary (don't touch)
? Commands & Permissions
Permission: noderunner.admin (default: OP)
| Command |
Description |
/nodebot start [name] |
Start the bot (or a specific bot by name) |
/nodebot stop [name] |
Stop the bot (or a specific bot by name) |
/nodebot restart [name] |
Restart the bot (or a specific bot by name) |
/nodebot status [name] |
Show status of all bots or a specific one |
/nodebot install [name] |
Force re-run npm install |
/nodebot reload |
Reload config.yml |
? Web Dashboard
Access at http://<your-server-ip>:8080 (port is configurable).
Password protection is enabled by default — change the default password in config.yml before going public.
Pterodactyl users: The dashboard needs a second allocated port. Ask your host to add one, or use TunnelMC or a Cloudflare Tunnel to expose it without one.
? Discord Webhook Setup
- Go to your Discord channel → Edit Channel → Integrations → Webhooks → New Webhook
- Copy the Webhook URL
- Paste it into
config.yml under discord.webhook.url
- Set
discord.webhook.enabled: true
- Restart or run
/nodebot reload
? Pterodactyl Notes
NodeRunner is fully tested on Pterodactyl. Keep in mind:
- The plugin uses
.tar.gz for Node.js to avoid the xz dependency missing in most container images
- If a previous install failed, delete
plugins/NodeRunner/nodejs/ and restart to re-download
- Set your bot token and other secrets via
env: in config.yml — do not hardcode them in your bot files
- The dashboard needs a separate allocated port — ask your host to add one
? Compatibility
|
|
| Minecraft |
Paper 1.21.x – 26.2.x |
| Java |
25+ (compiled with Java 25) |
| OS |
Linux, macOS, Windows |
| Architectures |
x64, ARM64 |
| Hosting |
Self-hosted, Pterodactyl, any VPS |
⚠️ Java 25 Required: The JAR is compiled with Java 25 and uses virtual threads. Your server must run Java 25 or higher. Paper 1.21.x+ with Java 25 is the recommended and fully tested setup.
? Related
TunnelMC — Expose any server port to the internet via ngrok tunnels. Pairs perfectly with NodeRunner to make the web dashboard publicly accessible without needing an extra port allocation.
PyRunner — The Python equivalent of this plugin. Run a Python Discord bot alongside your Minecraft server.
? License
All Rights Reserved — This plugin and its source code are proprietary. You may not copy, redistribute, modify, or decompile this software without explicit written permission from the author.
Developed by Spider
评论 0
登录后参与评分
还没有评论,来抢沙发吧