mc838
(七转八起)
41
创建服务器时 Software 选择 Golang Generic 选项
然后在网页 Settings 然后Executable 填写:start.sh
然后在网页 Files 文件管理中上传或者 添加New File 保存名字:start.sh
内容
#!/bin/bash
set -e
# --------------------------
# Pterodactyl 专用 Nezha Agent 启动脚本
# 兼容只读文件系统,无 sudo,无系统服务
# --------------------------
WORKDIR="/home/container/nezha"
mkdir -p "$WORKDIR"
cd "$WORKDIR"
echo "======================"
echo "🚀 下载 Nezha Agent"
echo "======================"
# 下载最新二进制(确保是直接可执行文件)
curl -L -o nezha-agent_linux_amd64.zip https://github.com/nezhahq/agent/releases/download/v1.13.1/nezha-agent_linux_amd64.zip
# 解压
unzip -o nezha-agent_linux_amd64.zip
chmod +x nezha-agent
echo "======================"
echo "✅ 生成配置文件 config.yml"
echo "======================"
cat > config.yml <<EOF
client_secret: <填写你的.yaml文件设置的固定key文件中的agentsecretkey所对应的参数>
debug: false
disable_auto_update: true
disable_command_execute: false
disable_force_update: true
disable_nat: false
disable_send_query: false
gpu: false
insecure_tls: false
ip_report_period: 1800
report_delay: 4
server: nezha.nyc.mn:443<域名填写你的argo中设置的哪吒面板域名>
skip_connection_count: false
skip_procs_count: false
temperature: false
tls: <哪吒面板的TLS 启用 TLS(true/false)>
use_gitee_to_upgrade: false
use_ipv6_country_code: false
uuid: 5e7bdddf-2557-4710-9096-2cebb524d7b9
EOF
echo "======================"
echo "🚀 启动 Nezha Agent 前台运行"
echo "======================"
# 前台运行,Pterodactyl 容器保持在线
exec ./nezha-agent -c config.yml
Stone_moon
(Stone moon)
42
I’ll study it, thanks for sharing.
mc838
(七转八起)
43
创建服务器时 Software 选择 Golang Generic 选项
然后在网页 Settings 然后Executable 填写:start.sh
然后在网页 Files 文件管理中上传或者 添加New File 保存名字:start.sh
内容
#!/bin/bash
set -e
# --------------------------
# Pterodactyl 专用 Nezha Agent 启动脚本
# 兼容只读文件系统,无 sudo,无系统服务
# --------------------------
WORKDIR="/home/container/nezha"
mkdir -p "$WORKDIR"
cd "$WORKDIR"
echo "======================"
echo "🚀 下载 Nezha Agent"
echo "======================"
# 下载最新二进制(确保是直接可执行文件)
curl -L -o nezha-agent_linux_amd64.zip https://github.com/nezhahq/agent/releases/download/v1.13.1/nezha-agent_linux_amd64.zip
# 解压
unzip -o nezha-agent_linux_amd64.zip
chmod +x nezha-agent
echo "======================"
echo "✅ 生成配置文件 config.yml"
echo "======================"
cat > config.yml <<EOF
client_secret: <填写你的.yaml文件设置的固定key文件中的agentsecretkey所对应的参数>
debug: false
disable_auto_update: true
disable_command_execute: false
disable_force_update: true
disable_nat: false
disable_send_query: false
gpu: false
insecure_tls: false
ip_report_period: 1800
report_delay: 4
server: nezha.nyc.mn:443<域名填写你的argo中设置的哪吒面板域名>
skip_connection_count: false
skip_procs_count: false
temperature: false
tls: <哪吒面板的TLS 启用 TLS(true/false)>
use_gitee_to_upgrade: false
use_ipv6_country_code: false
uuid: 5e7bdddf-2557-4710-9096-2cebb524d7b9
EOF
echo "======================"
echo "🚀 启动 Nezha Agent 前台运行"
echo "======================"
# 前台运行,Pterodactyl 容器保持在线
exec ./nezha-agent -c config.yml
1 Like
Don’t like Alpine
Love using Ubuntu
2 Likes
user80
(贺煦修)
47
I won’t play this anymore (if there’s no auto-login keep-alive).
Also, using nodejs or python is lighter.
feixing
(feixing)
49
Just tie it up and it’ll be fine.