diff --git a/.gitignore b/.gitignore
index 5d947ca..1dc7e63 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,10 @@ bin-release/
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.
+
+# Remove old cli sh
+cli_old.sh
+
+.idea
+
+design.txt
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 431912a..83ffde2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,21 @@
-MIT License
-
-Copyright (c) 2021 Suwings
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+MIT License
+
+Copyright (c) 2025 MCSManager
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 4878d4b..e71e2f7 100644
--- a/README.md
+++ b/README.md
@@ -2,16 +2,14 @@
-[Official Website](http://mcsmanager.com/)
+[Official Website](http://mcsmanager.com/)
## What is this?
-The files here are all platform-wide install, delete, update scripts, etc. for MCSManager 9.
+The files here are all platform-wide install, delete, update scripts, etc. for MCSManager.
-The default installation script on the official website is the `setup_en.sh` file of this repository.
+The default installation script on the official website is the `setup.sh` file of Github repository, it contains multiple languages.
-Contains multiple languages.
-
-
+You can also use the following one-click command to perform a quick installation
diff --git a/cli.sh b/cli.sh
deleted file mode 100644
index 7fe12e9..0000000
--- a/cli.sh
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/bash
-printf "\033c"
-
-Red_Error() {
- printf '\033[1;31;40m%b\033[0m\n' "$@"
-}
-
-echo "============= MCSManager 命令行 ===============
-(1) 重启面版服务 (8) 重启守护进程
-(2) 停止面版服务 (9) 停止守护进程
-(3) 启动面版服务 (10) 启动守护进程
-(4) 禁用面版服务 (11) 禁用守护进程
-(5) 启用面版服务 (12) 启用守护进程
-(6) 修改管理密码 (13) 清理面版日志
-(7) 卸载管理面版 (14) 全部重启
-(0) 退出
-==============================================="
-
-read -r -p "[-] 请输入命令编号: " cmd;
-
-if [ "$cmd" ] && [ "$cmd" -gt 0 ] && [ "$cmd" -lt 15 ]; then
- echo "==============================================="
- echo "[-] 正在执行($cmd)..."
- echo "==============================================="
-fi
-
-if [ "$cmd" == 1 ]
-then
- systemctl restart mcsm-web.service
-elif [ "$cmd" == 2 ]
-then
- systemctl stop mcsm-web.service
-elif [ "$cmd" == 3 ]
-then
- systemctl start mcsm-web.service
-elif [ "$cmd" == 4 ]
-then
- systemctl disable mcsm-web.service
-elif [ "$cmd" == 5 ]
-then
- systemctl enable mcsm-web.service
-elif [ "$cmd" == 6 ]
-then
- read -r -p "[+] 请输入新密码: " new1;
-
- if [ "${#new1}" -lt 6 ]; then
- echo "==============================================="
- echo "[x] 密码长度不能小于 6"
- exit
- fi
-
- read -r -p "[+] 请再次输入新密码: " new2;
-
- if [ "$new1" != "$new2" ]; then
- echo "==============================================="
- echo "[x] 两次输入的密码不一致"
- exit
- fi
-
- echo "[-] 修改 MCSManager-Web root 密码..."
- passWord_old=$(awk -F"\"" '/passWord/{print $4}' /opt/mcsmanager/web/data/User/root.json)
- passWord_new=$(echo -n "$new2" | md5sum | cut -d ' ' -f1)
- sed -e "s@$passWord_old@$passWord_new@g" -i /opt/mcsmanager/web/data/User/root.json
-
- echo "[-] 重启 MCSManager-Web 服务..."
- systemctl restart mcsm-web.service
-
- echo "[+] root 密码已更新!"
-elif [ "$cmd" == 7 ]
-then
- Red_Error "[!] 卸载后无法找回数据,请先备份必要数据!"
- read -r -p "[-] 确认已了解以上内容,我确定已备份完成 (输入yes继续卸载): " yes;
- if [ "$yes" != "yes" ]; then
- echo "==============================================="
- echo "已取消!"
- exit
- fi
-
- echo "[-] MCSManager 服务正在运行,停止服务..."
- systemctl stop mcsm-{daemon,web}.service
- systemctl disable mcsm-{daemon,web}.service
-
- echo "[x] 删除 MCSManager 服务"
- rm -f /etc/systemd/system/mcsm-daemon.service
- rm -f /etc/systemd/system/mcsm-web.service
-
- echo "[-] 重载服务配置文件"
- systemctl daemon-reload
-
- echo "[x] 删除 MCSManager 相关文件"
- rm -irf /opt/mcsmanager
-
- echo "[x] 删除 MCSManager-命令行 相关文件"
- rm -f /usr/local/bin/mcsm
- rm -f /opt/mcsm.sh
-
- echo "==============================================="
- echo -e "\033[1;32m卸载完成,感谢使用 MCSManager!\033[0m"
-
-elif [ "$cmd" == 8 ]
-then
- systemctl restart mcsm-daemon.service
-elif [ "$cmd" == 9 ]
-then
- systemctl stop mcsm-daemon.service
-elif [ "$cmd" == 10 ]
-then
- systemctl start mcsm-daemon.service
-elif [ "$cmd" == 11 ]
-then
- systemctl disable mcsm-daemon.service
-elif [ "$cmd" == 12 ]
-then
- systemctl enable mcsm-daemon.service
-elif [ "$cmd" == 13 ]
-then
- rm -ifr /opt/mcsmanager/web/logs
- mkdir -p /opt/mcsmanager/web/logs
- echo "[-] 已清空日志!"
-elif [ "$cmd" == 14 ]
-then
- systemctl restart mcsm-{daemon,web}.service
-else
- echo "==============================================="
- echo "[-] 已取消"
-fi
-
-
diff --git a/daemon/setup.sh b/daemon/setup.sh
new file mode 100644
index 0000000..c5d4c85
--- /dev/null
+++ b/daemon/setup.sh
@@ -0,0 +1,223 @@
+#!/bin/bash
+# Official installation script.
+
+mcsmanager_install_path="/opt/mcsmanager"
+mcsmanager_download_addr="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz"
+package_name="mcsmanager_linux_release.tar.gz"
+node="v20.12.2"
+arch=$(uname -m)
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo "This script must be run as root. Please use \"sudo bash\" instead."
+ exit 1
+fi
+
+printf "\033c"
+
+echo_cyan() {
+ printf '\033[1;36m%b\033[0m\n' "$@"
+}
+echo_red() {
+ printf '\033[1;31m%b\033[0m\n' "$@"
+}
+echo_green() {
+ printf '\033[1;32m%b\033[0m\n' "$@"
+}
+echo_cyan_n() {
+ printf '\033[1;36m%b\033[0m' "$@"
+}
+echo_yellow() {
+ printf '\033[1;33m%b\033[0m\n' "$@"
+}
+
+# script info
+echo_cyan "+----------------------------------------------------------------------
+| MCSManager Installer
++----------------------------------------------------------------------
+"
+
+Red_Error() {
+ echo '================================================='
+ printf '\033[1;31;40m%b\033[0m\n' "$@"
+ echo '================================================='
+ exit 1
+}
+
+Install_Node() {
+ if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then
+ echo_green "Node.js version is up-to-date, skipping installation."
+ return
+ fi
+
+ echo_cyan_n "[+] Install Node.JS environment...\n"
+
+ rm -irf "$node_install_path"
+
+ cd /opt || Red_Error "[x] Failed to enter /opt"
+
+ rm -rf "node-$node-linux-$arch.tar.gz"
+
+ wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release"
+
+ tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node"
+
+ rm -rf "node-$node-linux-$arch.tar.gz"
+
+ if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then
+ echo_green "Success"
+ else
+ Red_Error "[x] Node installation failed!"
+ fi
+
+ echo
+ echo_yellow "=============== Node.JS Version ==============="
+ echo_yellow " node: $("$node_install_path"/bin/node -v)"
+ echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)"
+ echo_yellow "=============== Node.JS Version ==============="
+ echo
+
+ sleep 3
+}
+
+Install_MCSManager() {
+ echo_cyan "[+] Install MCSManager..."
+
+ # stop service
+ systemctl disable --now mcsm-{web,daemon}
+
+ # delete service
+ rm -rf /etc/systemd/system/mcsm-daemon.service
+ systemctl daemon-reload
+
+ mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] Failed to create ${mcsmanager_install_path}"
+
+ # cd /opt/mcsmanager
+ cd "${mcsmanager_install_path}" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}"
+
+ # download MCSManager release
+ wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] Failed to download MCSManager"
+ tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}"
+ rm -rf "${mcsmanager_install_path}/${package_name}"
+
+ # compatible with tar.gz packages of different formats
+ if [ -d "/opt/mcsmanager/mcsmanager" ]; then
+ cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/
+ rm -rf /opt/mcsmanager/mcsmanager
+ fi
+
+ # echo "[→] cd daemon"
+ cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon"
+
+ echo_cyan "[+] Install MCSManager-Daemon dependencies..."
+ env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon"
+
+ echo
+ echo_yellow "=============== MCSManager ==============="
+ echo_green "Daemon: ${mcsmanager_install_path}/daemon"
+ echo_yellow "=============== MCSManager ==============="
+ echo
+ echo_green "[+] MCSManager installation success!"
+
+ chmod -R 755 "$mcsmanager_install_path"
+
+ sleep 3
+}
+
+Create_Service() {
+ echo_cyan "[+] Create MCSManager service..."
+
+ echo "[Unit]
+Description=MCSManager-Daemon
+
+[Service]
+WorkingDirectory=${mcsmanager_install_path}/daemon
+ExecStart=${node_install_path}/bin/node app.js
+ExecReload=/bin/kill -s QUIT \$MAINPID
+ExecStop=/bin/kill -s QUIT \$MAINPID
+Environment=\"PATH=${PATH}\"
+
+[Install]
+WantedBy=multi-user.target
+" >/etc/systemd/system/mcsm-daemon.service
+
+ systemctl daemon-reload
+ systemctl enable --now mcsm-daemon.service
+ echo_green "Registered!"
+
+ sleep 2
+
+ printf "\n\n\n\n"
+
+ echo_yellow "=================================================================="
+ echo_green "Installation is complete! Welcome to the MCSManager!!!"
+ echo_yellow " "
+ echo_cyan_n "Daemon Address: "
+ echo_yellow "ws://:24444 (Cluster)"
+ echo_red "You must expose ports "
+ echo_yellow "24444"
+ echo_red " to use the service properly on the Internet."
+ echo_yellow " "
+ echo_cyan "Usage:"
+ echo_cyan "systemctl start mcsm-daemon.service"
+ echo_cyan "systemctl stop mcsm-daemon.service"
+ echo_cyan "systemctl restart mcsm-daemon.service"
+ echo_yellow " "
+ echo_green "Official Document: https://docs.mcsmanager.com/"
+ echo_yellow "=================================================================="
+}
+
+# Environmental inspection
+if [[ "$arch" == x86_64 ]]; then
+ arch=x64
+ #echo "[-] x64 architecture detected"
+elif [[ $arch == aarch64 ]]; then
+ arch=arm64
+ #echo "[-] 64-bit ARM architecture detected"
+elif [[ $arch == arm ]]; then
+ arch=armv7l
+ #echo "[-] 32-bit ARM architecture detected"
+elif [[ $arch == ppc64le ]]; then
+ arch=ppc64le
+ #echo "[-] IBM POWER architecture detected"
+elif [[ $arch == s390x ]]; then
+ arch=s390x
+ #echo "[-] IBM LinuxONE architecture detected"
+else
+ Red_Error "[x] Sorry, this architecture is not supported yet!\n[x]Please try to install manually: https://github.com/MCSManager/MCSManager#linux"
+fi
+
+# Define the variable Node installation directory
+node_install_path="/opt/node-$node-linux-$arch"
+
+# Check network connection
+echo_cyan "[-] Architecture: $arch"
+
+# Install related software
+echo_cyan_n "[+] Installing dependent software (git, tar, wget)... "
+if [[ -x "$(command -v yum)" ]]; then
+ yum install -y git tar wget
+elif [[ -x "$(command -v apt-get)" ]]; then
+ apt-get install -y git tar wget
+elif [[ -x "$(command -v pacman)" ]]; then
+ pacman -S --noconfirm --needed git tar wget
+elif [[ -x "$(command -v zypper)" ]]; then
+ zypper --non-interactive install git tar wget
+else
+ echo_red "[!] Cannot find your package manager! You may need to install git, tar and wget manually!"
+fi
+
+# Determine whether the relevant software is installed successfully
+if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then
+ echo_green "Success"
+else
+ Red_Error "[x] Failed to find git, tar and wget, please install them manually!"
+fi
+
+# Install the Node environment
+Install_Node
+
+# Install MCSManager
+Install_MCSManager
+
+# Create MCSManager background service
+Create_Service
diff --git a/daemon/setup_cn.sh b/daemon/setup_cn.sh
new file mode 100644
index 0000000..aec9b51
--- /dev/null
+++ b/daemon/setup_cn.sh
@@ -0,0 +1,222 @@
+#!/bin/bash
+# This script file is specifically designed for the Chinese region, and servers in the Chinese region are used to accelerate file downloads.
+
+mcsmanager_install_path="/opt/mcsmanager"
+mcsmanager_download_addr="https://cdn.imlazy.ink:233/files/mcsmanager_linux_release.tar.gz"
+package_name="mcsmanager_linux_release.tar.gz"
+node="v20.12.2"
+arch=$(uname -m)
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo "这个脚本必须使用root权限运行。 请使用 \"sudo bash\" 替代它"
+ exit 1
+fi
+
+printf "\033c"
+
+echo_cyan() {
+ printf '\033[1;36m%b\033[0m\n' "$@"
+}
+echo_red() {
+ printf '\033[1;31m%b\033[0m\n' "$@"
+}
+echo_green() {
+ printf '\033[1;32m%b\033[0m\n' "$@"
+}
+echo_cyan_n() {
+ printf '\033[1;36m%b\033[0m' "$@"
+}
+echo_yellow() {
+ printf '\033[1;33m%b\033[0m\n' "$@"
+}
+
+# script info
+echo_cyan "+----------------------------------------------------------------------
+| MCSManager Daemon安装脚本 (MCSManager Installer)
++----------------------------------------------------------------------
+"
+
+Red_Error() {
+ echo '================================================='
+ printf '\033[1;31;40m%b\033[0m\n' "$@"
+ echo '================================================='
+ exit 1
+}
+
+Install_Node() {
+ if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then
+ echo_green "Node.js version is up-to-date, skipping installation."
+ return
+ fi
+
+ echo_cyan_n "[+] 安装 Node.JS...\n"
+
+ rm -irf "$node_install_path"
+
+ cd /opt || Red_Error "[x] 未能进入 /opt"
+
+ rm -rf "node-$node-linux-$arch.tar.gz"
+
+ # wget "https://nodejs.org/dist/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to download node release"
+ wget "https://registry.npmmirror.com/-/binary/node/$node/node-$node-linux-$arch.tar.gz" || Red_Error "[x] 未能下载node"
+
+ tar -zxf "node-$node-linux-$arch.tar.gz" || Red_Error "[x] Failed to untar node"
+
+ rm -rf "node-$node-linux-$arch.tar.gz"
+
+ if [[ -f "$node_install_path"/bin/node ]] && [[ "$("$node_install_path"/bin/node -v)" == "$node" ]]; then
+ echo_green "完成"
+ else
+ Red_Error "[x] Node 安装失败!"
+ fi
+
+ echo
+ echo_yellow "=============== Node.JS Version ==============="
+ echo_yellow " node: $("$node_install_path"/bin/node -v)"
+ echo_yellow " npm: v$(env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)"
+ echo_yellow "=============== Node.JS Version ==============="
+ echo
+
+ sleep 3
+}
+
+Install_MCSManager() {
+ echo_cyan "[+] 安装 MCSManager..."
+
+ # stop service
+ systemctl disable --now mcsm-{web,daemon}
+
+ # delete service
+ rm -rf /etc/systemd/system/mcsm-daemon.service
+ systemctl daemon-reload
+
+ mkdir -p "${mcsmanager_install_path}" || Red_Error "[x] 未能创建 ${mcsmanager_install_path}"
+
+ # cd /opt/mcsmanager
+ cd "${mcsmanager_install_path}" || Red_Error "[x] 未能进入 ${mcsmanager_install_path}"
+
+ # download MCSManager release
+ wget "${mcsmanager_download_addr}" -O "${package_name}" || Red_Error "[x] 未能下载 MCSManager"
+ tar -zxf ${package_name} -o || Red_Error "[x] Failed to untar ${package_name}"
+ rm -rf "${mcsmanager_install_path}/${package_name}"
+
+ # compatible with tar.gz packages of different formats
+ if [ -d "/opt/mcsmanager/mcsmanager" ]; then
+ cp -rf /opt/mcsmanager/mcsmanager/* /opt/mcsmanager/
+ rm -rf /opt/mcsmanager/mcsmanager
+ fi
+
+ # echo "[→] cd daemon"
+ cd "${mcsmanager_install_path}/daemon" || Red_Error "[x] Failed to enter ${mcsmanager_install_path}/daemon"
+
+ echo_cyan "[+] 安装 MCSManager-Daemon 依赖库..."
+ env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com --production --no-fund --no-audit &>/dev/null || Red_Error "[x] Failed to npm install in ${mcsmanager_install_path}/daemon"
+
+ echo
+ echo_yellow "=============== MCSManager ==============="
+ echo_green "Daemon: ${mcsmanager_install_path}/daemon"
+ echo_yellow "=============== MCSManager ==============="
+ echo
+ echo_green "[+] MCSManager 安装完成!"
+
+ chmod -R 755 "$mcsmanager_install_path"
+
+ sleep 3
+}
+
+Create_Service() {
+ echo_cyan "[+] 创建 MCSManager 服务..."
+
+ echo "[Unit]
+Description=MCSManager-Daemon
+
+[Service]
+WorkingDirectory=${mcsmanager_install_path}/daemon
+ExecStart=${node_install_path}/bin/node app.js
+ExecReload=/bin/kill -s QUIT \$MAINPID
+ExecStop=/bin/kill -s QUIT \$MAINPID
+Environment=\"PATH=${PATH}\"
+
+[Install]
+WantedBy=multi-user.target
+" >/etc/systemd/system/mcsm-daemon.service
+
+ systemctl daemon-reload
+ systemctl enable --now mcsm-daemon.service
+ echo_green "Registered!"
+
+ sleep 2
+
+ printf "\n\n\n\n"
+
+ echo_yellow "=================================================================="
+ echo_green "安装完成,欢迎使用 MCSManager !"
+ echo_yellow " "
+ echo_cyan_n "被控守护进程地址: "
+ echo_yellow "ws://:24444 (Cluster)"
+ echo_red "默认情况下,你必须开放 24444 端口才能确保面板工作正常!"
+ echo_yellow " "
+ echo_cyan "面板开关指令:"
+ echo_cyan "systemctl start mcsm-daemon.service"
+ echo_cyan "systemctl stop mcsm-daemon.service"
+ echo_cyan "systemctl restart mcsm-daemon.service"
+ echo_yellow " "
+ echo_green "官方文档: https://docs.mcsmanager.com/"
+ echo_yellow "=================================================================="
+}
+
+# Environmental inspection
+if [[ "$arch" == x86_64 ]]; then
+ arch=x64
+ #echo "[-] x64 architecture detected"
+elif [[ $arch == aarch64 ]]; then
+ arch=arm64
+ #echo "[-] 64-bit ARM architecture detected"
+elif [[ $arch == arm ]]; then
+ arch=armv7l
+ #echo "[-] 32-bit ARM architecture detected"
+elif [[ $arch == ppc64le ]]; then
+ arch=ppc64le
+ #echo "[-] IBM POWER architecture detected"
+elif [[ $arch == s390x ]]; then
+ arch=s390x
+ #echo "[-] IBM LinuxONE architecture detected"
+else
+ Red_Error "[x] 对不起,这个架构目前还不受支持!\n[x]请尝试手动安装: https://github.com/MCSManager/MCSManager#linux"
+fi
+
+# Define the variable Node installation directory
+node_install_path="/opt/node-$node-linux-$arch"
+
+# Check network connection
+echo_cyan "[-] 架构: $arch"
+
+# Install related software
+echo_cyan_n "[+] 正在安装依赖软件 (git, tar, wget)... "
+if [[ -x "$(command -v yum)" ]]; then
+ yum install -y git tar wget
+elif [[ -x "$(command -v apt-get)" ]]; then
+ apt-get install -y git tar wget
+elif [[ -x "$(command -v pacman)" ]]; then
+ pacman -S --noconfirm --needed git tar wget
+elif [[ -x "$(command -v zypper)" ]]; then
+ zypper --non-interactive install git tar wget
+else
+ echo_red "[!] 找不到你的软件包管理器! 你需要去安装 git, tar 和 wget!"
+fi
+
+# Determine whether the relevant software is installed successfully
+if [[ -x "$(command -v git)" && -x "$(command -v tar)" && -x "$(command -v wget)" ]]; then
+ echo_green "完成"
+else
+ Red_Error "[x] 找不到 git, tar 和 wget, 请先安装它们!"
+fi
+
+# Install the Node environment
+Install_Node
+
+# Install MCSManager
+Install_MCSManager
+
+# Create MCSManager background service
+Create_Service
diff --git a/deb/README.md b/deb/README.md
deleted file mode 100644
index 1312914..0000000
--- a/deb/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-此部分主要为 MCSManager 在 Debian/Ubuntu 系统上的发布版的源码
-
-本部分分为两个模块, `deb` 和 `src`
-`pack`: 编译模块, 此模块内的一级文件夹为架构名称, 编译时除 `一级文件夹\DEBIAN\control` 文件不会改变以外, 其他文件均由 `src` 模块内的所有文件覆盖, 如需编辑源码请见下面的 `src` 模块介绍
-`src`: 源码模块, 此模块内的所有文件在编译阶段会覆盖掉 `pack` 模块内所有文件
-
-如果你需要将此部分源码打包成可以直接使用 `apt` 或 `dpkg` 等工具可直接安装的 `deb` 程序包的话, 你需要先安装 `dpkg`, 然后运行以下命令
-
-```bash
-git clone https://github.com/MCSManager/Script.git
-cd Script/deb/pack
-bash build.sh
-```
-
-当显示 `Build complete` 时证明构建已成功, `build.sh` 同文件夹内应该会出现不同架构的 `deb` 程序包
\ No newline at end of file
diff --git a/deb/pack/amd64/DEBIAN/control b/deb/pack/amd64/DEBIAN/control
deleted file mode 100644
index 14cde5f..0000000
--- a/deb/pack/amd64/DEBIAN/control
+++ /dev/null
@@ -1,9 +0,0 @@
-Package:MCSManager
-Version:9
-Section:stable
-Priority:optional
-Depends:wget,curl,git,tar,sudo
-Suggests:language-pack-zh-hans,fonts-droid-fallback,ttf-wqy-zenhei,ttf-wqy-microhei,fonts-arphic-ukai,fonts-arphic-uming
-Architecture:amd64
-Maintainer:unitwk
-Description:A multilingual, lightweight, out-of-the-box, and multi-instance Minecraft server control panel with Docker support.
diff --git a/deb/pack/amd64/DEBIAN/postinst b/deb/pack/amd64/DEBIAN/postinst
deleted file mode 100644
index 56d465a..0000000
--- a/deb/pack/amd64/DEBIAN/postinst
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## Install Mode
-if [ -d /tmp/mcsmanager/data ]; then
- installMode="upgrade"
-else
- installMode="install"
-fi
-
-## Other
-firewall=""
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho echo "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- else
- firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- [ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- [ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Start ###
-Start
-exit 0
diff --git a/deb/pack/amd64/DEBIAN/preinst b/deb/pack/amd64/DEBIAN/preinst
deleted file mode 100644
index 7a8cac7..0000000
--- a/deb/pack/amd64/DEBIAN/preinst
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="18.12.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho echo "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCN
- CheckNodejs
-
- LEcho echo "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho echo "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho echo "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho echo "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho echo "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho echo "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho echo "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho echo "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho echo "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho echo "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho echo "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho echo "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho echo "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho echo "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-Init
-Install
-exit 0
\ No newline at end of file
diff --git a/deb/pack/amd64/DEBIAN/prerm b/deb/pack/amd64/DEBIAN/prerm
deleted file mode 100644
index 05c41dd..0000000
--- a/deb/pack/amd64/DEBIAN/prerm
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb/pack/arm/DEBIAN/control b/deb/pack/arm/DEBIAN/control
deleted file mode 100644
index 2eb1a9e..0000000
--- a/deb/pack/arm/DEBIAN/control
+++ /dev/null
@@ -1,9 +0,0 @@
-Package:MCSManager
-Version:9
-Section:stable
-Priority:optional
-Depends:wget,curl,git,tar,sudo
-Suggests:language-pack-zh-hans,fonts-droid-fallback,ttf-wqy-zenhei,ttf-wqy-microhei,fonts-arphic-ukai,fonts-arphic-uming
-Architecture:arm
-Maintainer:unitwk
-Description:A multilingual, lightweight, out-of-the-box, and multi-instance Minecraft server control panel with Docker support.
diff --git a/deb/pack/arm/DEBIAN/postinst b/deb/pack/arm/DEBIAN/postinst
deleted file mode 100644
index 56d465a..0000000
--- a/deb/pack/arm/DEBIAN/postinst
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## Install Mode
-if [ -d /tmp/mcsmanager/data ]; then
- installMode="upgrade"
-else
- installMode="install"
-fi
-
-## Other
-firewall=""
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho echo "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- else
- firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- [ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- [ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Start ###
-Start
-exit 0
diff --git a/deb/pack/arm/DEBIAN/preinst b/deb/pack/arm/DEBIAN/preinst
deleted file mode 100644
index 7a8cac7..0000000
--- a/deb/pack/arm/DEBIAN/preinst
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="18.12.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho echo "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCN
- CheckNodejs
-
- LEcho echo "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho echo "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho echo "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho echo "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho echo "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho echo "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho echo "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho echo "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho echo "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho echo "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho echo "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho echo "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho echo "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho echo "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-Init
-Install
-exit 0
\ No newline at end of file
diff --git a/deb/pack/arm/DEBIAN/prerm b/deb/pack/arm/DEBIAN/prerm
deleted file mode 100644
index 05c41dd..0000000
--- a/deb/pack/arm/DEBIAN/prerm
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb/pack/arm64/DEBIAN/control b/deb/pack/arm64/DEBIAN/control
deleted file mode 100644
index 8d30a3c..0000000
--- a/deb/pack/arm64/DEBIAN/control
+++ /dev/null
@@ -1,9 +0,0 @@
-Package:MCSManager
-Version:9
-Section:stable
-Priority:optional
-Depends:wget,curl,git,tar,sudo
-Suggests:language-pack-zh-hans,fonts-droid-fallback,ttf-wqy-zenhei,ttf-wqy-microhei,fonts-arphic-ukai,fonts-arphic-uming
-Architecture:arm64
-Maintainer:unitwk
-Description:A multilingual, lightweight, out-of-the-box, and multi-instance Minecraft server control panel with Docker support.
diff --git a/deb/pack/arm64/DEBIAN/postinst b/deb/pack/arm64/DEBIAN/postinst
deleted file mode 100644
index 56d465a..0000000
--- a/deb/pack/arm64/DEBIAN/postinst
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## Install Mode
-if [ -d /tmp/mcsmanager/data ]; then
- installMode="upgrade"
-else
- installMode="install"
-fi
-
-## Other
-firewall=""
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho echo "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- else
- firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- [ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- [ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Start ###
-Start
-exit 0
diff --git a/deb/pack/arm64/DEBIAN/preinst b/deb/pack/arm64/DEBIAN/preinst
deleted file mode 100644
index 7a8cac7..0000000
--- a/deb/pack/arm64/DEBIAN/preinst
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="18.12.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho echo "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCN
- CheckNodejs
-
- LEcho echo "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho echo "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho echo "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho echo "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho echo "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho echo "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho echo "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho echo "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho echo "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho echo "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho echo "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho echo "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho echo "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho echo "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-Init
-Install
-exit 0
\ No newline at end of file
diff --git a/deb/pack/arm64/DEBIAN/prerm b/deb/pack/arm64/DEBIAN/prerm
deleted file mode 100644
index 05c41dd..0000000
--- a/deb/pack/arm64/DEBIAN/prerm
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb/pack/build.sh b/deb/pack/build.sh
deleted file mode 100644
index 8b12c1f..0000000
--- a/deb/pack/build.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-
-echo "Building..."
-
-# Find dpkg
-if ! command -v dpkg;then
- echo "Error: dpkg not found"
- exit 1
-fi
-
-# Some prepare work
-[ -f ../src/DEBIAN/postinst.sh ] && mv -f ../src/DEBIAN/postinst.sh ../src/DEBIAN/postinst
-[ -f ../src/DEBIAN/preinst.sh ] && mv -f ../src/DEBIAN/preinst.sh ../src/DEBIAN/preinst
-[ -f ../src/DEBIAN/prerm.sh ] && mv -f ../src/DEBIAN/prerm.sh ../src/DEBIAN/prerm
-
-# Remove old files
-echo "Remove old files..."
-rm -rf ./*/DEBIAN/preinst
-rm -rf ./*/DEBIAN/postinst
-rm -rf ./*/DEBIAN/prerm
-
-echo "Copy new script files..."
-cp -r -v ../src/DEBIAN/* ./amd64/DEBIAN/
-cp -r -v ../src/DEBIAN/* ./arm64/DEBIAN/
-cp -r -v ../src/DEBIAN/* ./arm/DEBIAN/
-cp -r -v ../src/DEBIAN/* ./i386/DEBIAN/
-cp -r -v ../src/DEBIAN/* ./ppc64le/DEBIAN/
-cp -r -v ../src/DEBIAN/* ./s390x/DEBIAN/
-
-# Set Premission
-echo "Set Permission..."
-chmod 775 ./*/DEBIAN/pre*
-chmod 775 ./*/DEBIAN/post*
-chown -R debian ./*
-
-[ -f ../src/DEBIAN/postinst ] && mv -f ../src/DEBIAN/postinst ../src/DEBIAN/postinst.sh
-[ -f ../src/DEBIAN/preinst ] && mv -f ../src/DEBIAN/preinst ../src/DEBIAN/preinst.sh
-[ -f ../src/DEBIAN/prerm ] && mv -f ../src/DEBIAN/prerm ../src/DEBIAN/prerm.sh
-
-# Build
-if ! dpkg -b ./amd64/ MCSManager-amd64.deb; then
- echo "Error: Build amd64 arch deb failed"
- exit 1
-fi
-if ! dpkg -b ./arm/ MCSManager-arm.deb; then
- echo "Error: Build arm arch deb failed"
- exit 1
-fi
-if ! dpkg -b ./arm64/ MCSManager-arm64.deb; then
- echo "Error: Build arm64 arch deb failed"
- exit 1
-fi
-if ! dpkg -b ./i386/ MCSManager-i386.deb; then
- echo "Error: Build i386 arch deb failed"
- exit 1
-fi
-if ! dpkg -b ./ppc64le/ MCSManager-ppc64le.deb; then
- echo "Error: Build ppc64le arch deb failed"
- exit 1
-fi
-if ! dpkg -b ./s390x/ MCSManager-s390x.deb; then
- echo "Error: Build s390x arch deb failed"
- exit 1
-fi
-
-echo "Build complete"
diff --git a/deb/pack/i386/DEBIAN/control b/deb/pack/i386/DEBIAN/control
deleted file mode 100644
index 145a2df..0000000
--- a/deb/pack/i386/DEBIAN/control
+++ /dev/null
@@ -1,9 +0,0 @@
-Package:MCSManager
-Version:9
-Section:stable
-Priority:optional
-Depends:wget,curl,git,tar,sudo
-Suggests:language-pack-zh-hans,fonts-droid-fallback,ttf-wqy-zenhei,ttf-wqy-microhei,fonts-arphic-ukai,fonts-arphic-uming
-Architecture:i386
-Maintainer:unitwk
-Description:A multilingual, lightweight, out-of-the-box, and multi-instance Minecraft server control panel with Docker support.
diff --git a/deb/pack/i386/DEBIAN/postinst b/deb/pack/i386/DEBIAN/postinst
deleted file mode 100644
index 56d465a..0000000
--- a/deb/pack/i386/DEBIAN/postinst
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## Install Mode
-if [ -d /tmp/mcsmanager/data ]; then
- installMode="upgrade"
-else
- installMode="install"
-fi
-
-## Other
-firewall=""
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho echo "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- else
- firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- [ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- [ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Start ###
-Start
-exit 0
diff --git a/deb/pack/i386/DEBIAN/preinst b/deb/pack/i386/DEBIAN/preinst
deleted file mode 100644
index 7a8cac7..0000000
--- a/deb/pack/i386/DEBIAN/preinst
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="18.12.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho echo "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCN
- CheckNodejs
-
- LEcho echo "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho echo "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho echo "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho echo "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho echo "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho echo "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho echo "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho echo "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho echo "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho echo "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho echo "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho echo "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho echo "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho echo "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-Init
-Install
-exit 0
\ No newline at end of file
diff --git a/deb/pack/i386/DEBIAN/prerm b/deb/pack/i386/DEBIAN/prerm
deleted file mode 100644
index 05c41dd..0000000
--- a/deb/pack/i386/DEBIAN/prerm
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb/pack/ppc64le/DEBIAN/control b/deb/pack/ppc64le/DEBIAN/control
deleted file mode 100644
index ba2131e..0000000
--- a/deb/pack/ppc64le/DEBIAN/control
+++ /dev/null
@@ -1,9 +0,0 @@
-Package:MCSManager
-Version:9
-Section:stable
-Priority:optional
-Depends:wget,curl,git,tar,sudo
-Suggests:language-pack-zh-hans,fonts-droid-fallback,ttf-wqy-zenhei,ttf-wqy-microhei,fonts-arphic-ukai,fonts-arphic-uming
-Architecture:ppc64le
-Maintainer:unitwk
-Description:A multilingual, lightweight, out-of-the-box, and multi-instance Minecraft server control panel with Docker support.
diff --git a/deb/pack/ppc64le/DEBIAN/postinst b/deb/pack/ppc64le/DEBIAN/postinst
deleted file mode 100644
index 56d465a..0000000
--- a/deb/pack/ppc64le/DEBIAN/postinst
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## Install Mode
-if [ -d /tmp/mcsmanager/data ]; then
- installMode="upgrade"
-else
- installMode="install"
-fi
-
-## Other
-firewall=""
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho echo "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- else
- firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- [ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- [ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Start ###
-Start
-exit 0
diff --git a/deb/pack/ppc64le/DEBIAN/preinst b/deb/pack/ppc64le/DEBIAN/preinst
deleted file mode 100644
index 7a8cac7..0000000
--- a/deb/pack/ppc64le/DEBIAN/preinst
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="18.12.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho echo "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCN
- CheckNodejs
-
- LEcho echo "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho echo "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho echo "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho echo "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho echo "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho echo "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho echo "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho echo "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho echo "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho echo "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho echo "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho echo "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho echo "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho echo "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-Init
-Install
-exit 0
\ No newline at end of file
diff --git a/deb/pack/ppc64le/DEBIAN/prerm b/deb/pack/ppc64le/DEBIAN/prerm
deleted file mode 100644
index 05c41dd..0000000
--- a/deb/pack/ppc64le/DEBIAN/prerm
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb/pack/s390x/DEBIAN/control b/deb/pack/s390x/DEBIAN/control
deleted file mode 100644
index 2b44ac1..0000000
--- a/deb/pack/s390x/DEBIAN/control
+++ /dev/null
@@ -1,9 +0,0 @@
-Package:MCSManager
-Version:9
-Section:stable
-Priority:optional
-Depends:wget,curl,git,tar,sudo
-Suggests:language-pack-zh-hans,fonts-droid-fallback,ttf-wqy-zenhei,ttf-wqy-microhei,fonts-arphic-ukai,fonts-arphic-uming
-Architecture:s390x
-Maintainer:unitwk
-Description:A multilingual, lightweight, out-of-the-box, and multi-instance Minecraft server control panel with Docker support.
diff --git a/deb/pack/s390x/DEBIAN/postinst b/deb/pack/s390x/DEBIAN/postinst
deleted file mode 100644
index 56d465a..0000000
--- a/deb/pack/s390x/DEBIAN/postinst
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## Install Mode
-if [ -d /tmp/mcsmanager/data ]; then
- installMode="upgrade"
-else
- installMode="install"
-fi
-
-## Other
-firewall=""
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho echo "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- else
- firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- [ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- [ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Start ###
-Start
-exit 0
diff --git a/deb/pack/s390x/DEBIAN/preinst b/deb/pack/s390x/DEBIAN/preinst
deleted file mode 100644
index 7a8cac7..0000000
--- a/deb/pack/s390x/DEBIAN/preinst
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="18.12.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho echo "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCN
- CheckNodejs
-
- LEcho echo "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho echo "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho echo "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho echo "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho echo "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho echo "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho echo "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho echo "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho echo "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho echo "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho echo "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho echo "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho echo "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho echo "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-Init
-Install
-exit 0
\ No newline at end of file
diff --git a/deb/pack/s390x/DEBIAN/prerm b/deb/pack/s390x/DEBIAN/prerm
deleted file mode 100644
index 05c41dd..0000000
--- a/deb/pack/s390x/DEBIAN/prerm
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb/src/DEBIAN/postinst.sh b/deb/src/DEBIAN/postinst.sh
deleted file mode 100644
index 62e21ac..0000000
--- a/deb/src/DEBIAN/postinst.sh
+++ /dev/null
@@ -1,165 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-node="${nodePath}/bin/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## Install Mode
-if [ -d /tmp/mcsmanager/data ]; then
- installMode="upgrade"
-else
- installMode="install"
-fi
-
-## Other
-#firewall=""
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在注册系统服务..." "[-] Registering system service..."
-
- echo "
-[Unit]
-Description=MCSManager Daemon
-
-[Service]
-WorkingDirectory=/opt/mcsmanager/daemon
-ExecStart=${node} app.js
-ExecReload=/bin/kill -s HUP $MAINPID
-ExecStop=/bin/kill -s QUIT $MAINPID
-Environment=\"PATH=${PATH}\"
-
-[Install]
-WantedBy=multi-user.target
-" >/etc/systemd/system/mcsm-daemon.service
-
- echo "
-[Unit]
-Description=MCSManager Web
-
-[Service]
-WorkingDirectory=/opt/mcsmanager/web
-ExecStart=${node} app.js
-ExecReload=/bin/kill -s HUP $MAINPID
-ExecStop=/bin/kill -s QUIT $MAINPID
-Environment=\"PATH=${PATH}\"
-
-[Install]
-WantedBy=multi-user.target
-" >/etc/systemd/system/mcsm-web.service
-
- LEcho cyan "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- #else
- # firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- #[ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- #[ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Start ###
-Start
-exit 0
diff --git a/deb/src/DEBIAN/preinst.sh b/deb/src/DEBIAN/preinst.sh
deleted file mode 100644
index ad9706d..0000000
--- a/deb/src/DEBIAN/preinst.sh
+++ /dev/null
@@ -1,296 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="14.19.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho cyan "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCN
- CheckNodejs
-
- LEcho cyan "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho cyan "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho cyan "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho cyan "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -q -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho cyan "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho cyan "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho cyan "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho cyan "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho cyan "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho cyan "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho cyan "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho cyan "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho cyan "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho cyan "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-LEcho cyan "+----------------------------------------------------------------------
-| MCSManager Installer
-+----------------------------------------------------------------------
-| Copyright © 2022 MCSManager All rights reserved.
-+----------------------------------------------------------------------
-| Shell Install Script by Nuomiaa & CreeperKong
-+----------------------------------------------------------------------
-" "+----------------------------------------------------------------------
-| MCSManager Installer
-+----------------------------------------------------------------------
-| Copyright © 2022 MCSManager All rights reserved.
-+----------------------------------------------------------------------
-| Shell Install Script by Nuomiaa & CreeperKong
-+----------------------------------------------------------------------
-"
-## Try to cheat APT
-Init
-Install
-exit 0
\ No newline at end of file
diff --git a/deb/src/DEBIAN/prerm.sh b/deb/src/DEBIAN/prerm.sh
deleted file mode 100644
index 05c41dd..0000000
--- a/deb/src/DEBIAN/prerm.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb_remove.sh b/deb_remove.sh
deleted file mode 100644
index 05c41dd..0000000
--- a/deb_remove.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Uninstall Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-## Files
-mcsmPath="/opt/mcsmanager"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-### Tools ###
-# Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Main ###
-Start() {
- LEcho cyan "[-] 正在卸载 MCSManager..." "[-] Uninstalling MCSManager..."
-
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
-
- LEcho green "[+] MCSManager 卸载成功!" "[+] MCSManager Uninstalled!"
- return
-}
-
-### Start ###
-Start
-exit 0
\ No newline at end of file
diff --git a/deb_setup.sh b/deb_setup.sh
deleted file mode 100644
index 0f2cfe4..0000000
--- a/deb_setup.sh
+++ /dev/null
@@ -1,447 +0,0 @@
-#!/usr/bin/env bash
-
-#### MCSM Install Script
-#### Made By nuomiaa, CreeperKong, unitwk
-#### Remake By BlueFunny_
-
-### Variables ###
-
-## Files
-mcsmOldPath="/opt/mcsmanager"
-mcsmPath="/opt/mcsmanager"
-nodePath="${mcsmPath}/node"
-
-## Node
-nodeVersion="14.19.1"
-node="${nodePath}/bin/node"
-npm="${node} ${nodePath}/bin/npm"
-
-## Install Mode
-installMode="install"
-
-## URL
-daemonCloneURL="https://github.com/mcsmanager/MCSManager-Daemon-Production.git"
-webCloneURL="https://github.com/mcsmanager/MCSManager-Web-Production.git"
-nodeMirror="https://npmmirror.com/mirrors/node"
-
-## Language
-if [ "$(locale -a | grep "zh_CN")" != "" ]; then
- zh=1
- export LANG="zh_CN.UTF-8"
-else
- zh=0
-fi
-
-## CDN
-CN=0
-
-## Other
-try=1
-
-### Tools ###
-## Localize echo
-LEcho() {
- case $1 in
- red)
- [ "${zh}" == 1 ] && printf '\033[1;31m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31m%b\033[0m\n' "$3"
- ;;
- green)
- [ "${zh}" == 1 ] && printf '\033[1;32m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;32m%b\033[0m\n' "$3"
- ;;
- cyan)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m\n' "$3"
- ;;
- cyan_n)
- [ "${zh}" == 1 ] && printf '\033[1;36m%b\033[0m' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;36m%b\033[0m' "$3"
- ;;
- yellow)
- [ "${zh}" == 1 ] && printf '\033[1;33m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;33m%b\033[0m\n' "$3"
- ;;
- error)
- Clean
- echo '================================================='
- [ "${zh}" == 1 ] && printf '\033[1;31;40m%b\033[0m\n' "$2"
- [ "${zh}" == 0 ] && printf '\033[1;31;40m%b\033[0m\n' "$3"
- echo '================================================='
- exit 1
- ;;
- *)
- [ "${zh}" == 1 ] && echo "$2"
- [ "${zh}" == 0 ] && echo "$3"
- ;;
- esac
- return
-}
-
-### Init ###
-## Check environment
-Init() {
- LEcho cyan "[-] 正在初始化环境..." "[-] Initializing environment..."
-
- # Check functions
- CheckMCSM
- CheckCommand
- CheckCN
- CheckNodejs
-
- LEcho cyan "[-] 环境初始化完成" "[-] Environment initialization completed"
- return
-}
-
-## Check if all necessary software is installed
-CheckCommand() {
- LEcho cyan "[-] 正在检查依赖..." "[-] Checking dependencies..."
-
- # Check git
- if [[ $(command -v git) == "" ]]; then
- LEcho yellow "[-] 未安装 git" "[-] git is not installed"
- LEcho cyan "[-] 正在自动安装 git..." "[-] Automatically installing git..."
- [[ $(command -v apt) != "" ]] && apt install -y git
- [[ $(command -v yum) != "" ]] && yum install -y git
- [[ $(command -v pacman) != "" ]] && pacman -S git
- [[ $(command -v dnf) != "" ]] && dnf install -y git
- if [[ $(command -v git) == "" ]]; then LEcho error "[x] 未能自动安装 git, 请手动安装或重试" "[x] Unable to automatically install git, please manually install or try again"; fi
- fi
-
- # Check curl
- if [ "$(command -v curl)" == "" ]; then
- LEcho yellow "[-] 未安装 curl" "[-] curl is not installed"
- LEcho cyan "[-] 正在自动安装 curl..." "[-] Automatically installing curl..."
- [[ $(command -v apt) != "" ]] && apt install -y curl
- [[ $(command -v yum) != "" ]] && yum install -y curl
- [[ $(command -v pacman) != "" ]] && pacman -S curl
- [[ $(command -v dnf) != "" ]] && dnf install -y curl
- if [[ $(command -v curl) == "" ]]; then LEcho error "[x] 未能自动安装 curl, 请手动安装或重试" "[x] Unable to automatically install curl, please manually install or try again"; fi
- fi
-
- # Check wget
- if [ "$(command -v wget)" == "" ]; then
- LEcho yellow "[-] 未安装 wget" "[-] wget is not installed"
- LEcho cyan "[-] 正在自动安装 wget..." "[-] Automatically installing wget..."
- [[ $(command -v apt) != "" ]] && apt install -y wget
- [[ $(command -v yum) != "" ]] && yum install -y wget
- [[ $(command -v pacman) != "" ]] && pacman -S wget
- [[ $(command -v dnf) != "" ]] && dnf install -y wget
- if [[ $(command -v wget) == "" ]]; then LEcho error "[x] 未能自动安装 wget, 请手动安装或重试" "[x] Unable to automatically install wget, please manually install or try again"; fi
- fi
-
- # Check tar
- if [ "$(command -v tar)" == "" ]; then
- LEcho yellow "[-] 未安装 tar" "[-] tar is not installed"
- LEcho cyan "[-] 正在自动安装 tar..." "[-] Automatically installing tar..."
- [[ $(command -v apt) != "" ]] && apt install -y tar
- [[ $(command -v yum) != "" ]] && yum install -y tar
- [[ $(command -v pacman) != "" ]] && pacman -S tar
- [[ $(command -v dnf) != "" ]] && dnf install -y tar
- if [[ $(command -v tar) == "" ]]; then LEcho error "[x] 未能自动安装 tar, 请手动安装或重试" "[x] Unable to automatically install tar, please manually install or try again"; fi
- fi
-
- # Check npm
- if [ "$(command -v npm)" == "" ]; then
- LEcho yellow "[-] 未安装 npm" "[-] npm is not installed"
- LEcho cyan "[-] 正在自动安装 npm..." "[-] Automatically installing npm..."
- [[ $(command -v apt) != "" ]] && apt install -y npm
- [[ $(command -v yum) != "" ]] && yum install -y npm
- [[ $(command -v pacman) != "" ]] && pacman -S npm
- [[ $(command -v dnf) != "" ]] && dnf install -y npm
- if [[ $(command -v npm) == "" ]]; then LEcho error "[x] 未能自动安装 npm, 请手动安装或重试" "[x] Unable to automatically install npm, please manually install or try again"; fi
- fi
-
- LEcho cyan "[-] 依赖检查完成" "[-] Dependency check completed"
- return
-}
-
-## Check if MCSM is installed
-CheckMCSM() {
- if [ -d ${mcsmOldPath} ]; then
- LEcho yellow "[-] 检测到已安装的 MCSManager, 切换为更新模式..." "[-] MCSManager has been installed, switching to update mode..."
-
- # Switch to update mode
- installMode="upgrade"
-
- # Prepare for backup old data
- mkdir -p /tmp/mcsmanager/data
-
- # A little easteregg
- # Maybe you wanna play Inscryption?
- LEcho cyan "[-] 正在将 旧数据 打包并移动至临时文件夹..." "[-] Packing and moving old data to temporary folder..."
-
- # Backup old data
- if [ -d ${mcsmOldPath}/daemon/data ]; then
- mv -f ${mcsmOldPath}/daemon/data /tmp/mcsmanager/data/daemon
- else
- LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- fi
- if [ -d ${mcsmOldPath}/web/data ]; then
- mv -f ${mcsmOldPath}/web/data /tmp/mcsmanager/data/web
- else
- LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- fi
-
- # Remove old service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove old data
- if [ -d ${mcsmOldPath} ]; then
- rm -rf ${mcsmOldPath}
- fi
-
- # Remove old link
- if [ -L /usr/bin/mcsmanager ]; then
- rm -f /usr/bin/mcsmanager
- fi
- fi
-
- # Prepare for a new install
- mkdir -p ${nodePath}
- return
-}
-
-## Check if the system is Chinese
-CheckCN() {
- if [[ $(curl -m 10 -s https://ipapi.co/json | grep 'China') != "" ]]; then
- LEcho yellow "[!] 根据 'ipapi.co' 提供的信息, 当前服务器可能在中国" "[!] According to the information provided by 'ipapi.co', the current server IP may be in China"
- [ "${zh}" == 1 ] && read -e -r -p "[?] 是否选用中国镜像完成安装? [y/n] " input
- [ "${zh}" == 0 ] && read -e -r -p "[?] Whether to use the Chinese mirror to complete the installation? [y/n] " input
- case ${input} in
- [yY][eE][sS] | [yY])
- LEcho cyan "[-] 选用中国镜像" "[-] Use Chinese mirror"
- CN=1
- ;;
- *)
- LEcho cyan "[-] 不选用中国镜像" "[-] Do not use Chinese mirror"
- ;;
- esac
- fi
- if [ "${CN}" == 1 ]; then
- daemonCloneURL="https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git"
- webCloneURL="https://gitee.com/mcsmanager/MCSManager-Web-Production.git"
- export N_NODE_MIRROR=${nodeMirror}
- fi
- return
-}
-
-## Check nodejs
-CheckNodejs() {
- if ! /usr/local/bin/n -V; then
- if [ "${CN}" == 1 ]; then
- npm i -g n --registry=https://registry.npmmirror.com
- else
- npm i -g n
- fi
- fi
- while true; do
- if /usr/local/bin/n ${nodeVersion} -q -d || [ ${try} == 3 ]; then
- break
- else
- LEcho yellow "[!] 安装 Node.js ${nodeVersion} 失败, 重试中... (${try}/3)" "[!] Failed to install Node.js ${nodeVersion}, retrying... (${try}/3)"
- fi
- sleep 3
- try=${try}+1
- done
- cp -r /usr/local/n/versions/node/${nodeVersion}/* ${nodePath}/
- /usr/local/bin/n rm ${nodeVersion}
- if ! ${node} --version; then
- LEcho error "[x] 未能成功安装最新版本 Node.js" "[x] Failed to install the latest version of Node.js"
- fi
- LEcho yellow "=============== Node Version ===============" "=============== Node Version ==============="
- LEcho yellow "Node 版本: $(${node} --version)" "Node Version: $(${node} --version)"
- LEcho yellow "NPM 版本: $(${npm} --version)" "NPM Version: $(${npm} --version)"
- LEcho yellow "============================================" "============================================"
- return
-}
-
-### Main ###
-## Main Install Function
-Install() {
- LEcho cyan "[-] 正在安装 MCSManager ..." "[-] Installing MCSManager ..."
-
- # Move to MCSM
- cd ${mcsmPath} || LEcho error "[x] 未能成功进入 MCSM 安装目录" "[x] Failed to enter the MCSM installation directory"
-
- # Download MCSM Daemon
- LEcho cyan "[↓] 正在下载 MCSManager Daemon..." "[↓] Downloading MCSManager Daemon..."
- git clone --single-branch -b master --depth 1 ${daemonCloneURL}
- mv -f MCSManager-Daemon-Production daemon
-
- # Download MCSM Web
- LEcho cyan "[↓] 正在下载 MCSManager Web..." "[↓] Downloading MCSManager Web..."
- git clone --single-branch -b master --depth 1 ${webCloneURL}
- mv -f MCSManager-Web-Production web
-
- # Install MCSM Daemon
- LEcho cyan "[+] 正在安装 MCSManager Daemon..." "[+] Installing MCSManager Daemon..."
- cd daemon || LEcho error "[x] 未能成功进入 MCSM Daemon 安装目录" "[x] Failed to enter the MCSM Daemon installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- # Install MCSM Web
- LEcho cyan "[+] 正在安装 MCSManager Web..." "[+] Installing MCSManager Web..."
- cd ../web || LEcho error "[x] 未能成功进入 MCSM Web 安装目录" "[x] Failed to enter the MCSManager Web installation directory"
- if [ "${CN}" == 1 ]; then
- ${npm} i --registry=https://registry.npmmirror.com
- else
- ${npm} i
- fi
-
- LEcho green "[√] MCSManager 安装完成" "[√] MCSManager installation completed"
-
- # Check install mode
- if [ "${installMode}" == "upgrade" ]; then
- LEcho cyan "[-] 正在移动旧数据..." "[-] Moving old data..."
- mv -f /tmp/mcsmanager/data/daemon ${mcsmPath}/daemon/data || LEcho yellow "[-] 未检测到旧版 Daemon 数据, 跳过迁移..." "[-] Old Daemon data was not detected, skipping migration..."
- mv -f /tmp/mcsmanager/data/web ${mcsmPath}/web/data || LEcho yellow "[-] 未检测到旧版 Web 数据, 跳过迁移..." "[-] Old Web data was not detected, skipping migration..."
- rm -rf /tmp/mcsmanager
- LEcho green "[√] 数据迁移完成" "[√] Data migration completed"
- fi
- LEcho cyan "[-] 正在注册系统服务..." "[-] Registering system service..."
-
- echo "
-[Unit]
-Description=MCSManager Daemon
-
-[Service]
-WorkingDirectory=/opt/mcsmanager/daemon
-ExecStart=${node} app.js
-ExecReload=/bin/kill -s HUP $MAINPID
-ExecStop=/bin/kill -s QUIT $MAINPID
-Environment=\"PATH=${PATH}\"
-
-[Install]
-WantedBy=multi-user.target
-" >/etc/systemd/system/mcsm-daemon.service
-
- echo "
-[Unit]
-Description=MCSManager Web
-
-[Service]
-WorkingDirectory=/opt/mcsmanager/web
-ExecStart=${node} app.js
-ExecReload=/bin/kill -s HUP $MAINPID
-ExecStop=/bin/kill -s QUIT $MAINPID
-Environment=\"PATH=${PATH}\"
-
-[Install]
-WantedBy=multi-user.target
-" >/etc/systemd/system/mcsm-web.service
-
- LEcho cyan "[-] 正在启动 MCSManager..." "[-] Starting MCSManager..."
-
- # Start MCSM service
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
- systemctl start mcsm-daemon.service
- systemctl start mcsm-web.service
-
- # Check MCSM service
- if ! systemctl is-active --quiet mcsm-daemon.service || ! systemctl --quiet is-active mcsm-web.service; then
- systemctl status mcsm-{web,daemon}.service
- LEcho error "[x] MCSManager 启动失败" "[x] MCSManager failed to start"
- fi
-
- # Allow ports
- if command -v ufw; then
- ufw allow 23333/tcp
- ufw allow 24444/tcp
- elif command -v iptables-save; then
- iptables -A INPUT -p tcp --dport 23333 -j ACCEPT
- iptables -A INPUT -p tcp --dport 24444 -j ACCEPT
- iptables-save
- #else
- # firewall="problem"
- fi
-
- # Output auth information
- AuthInfo
- return
-}
-
-## Access Information
-AuthInfo() {
- if [ ${installMode} == "upgrade" ]; then
- ip="$(curl -s https://ipconfig.io)"
- port=$(cat ${mcsmPath}/web/data/SystemConfig/config.json | grep "httpPort" | tr -cd '0-9')
- daemonPort=$(cat ${mcsmPath}/daemon/data/Config/global.json | grep "port" | tr -cd '0-9')
- fi
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan "欢迎使用 MCSManager, 您可以通过以下方式访问 MCSManager " "Welcome to MCSManager, you can access it by the following ways"
- LEcho cyan "==================================================================" "=================================================================="
- LEcho cyan_n "控制面板地址: " "Web Service Address: "
-
- [ ${installMode} == "upgrade" ] && LEcho cyan "http://${ip}:${port}" "http://${ip}:${port}"
- [ ${installMode} == "upgrade" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
- #[ ${installMode} == "upgrade" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 ${port} 和 ${daemonPort} 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports ${port} and ${daemonPort} to use the service properly on the Internet."
-
- [ ${installMode} == "install" ] && LEcho cyan "http://localhost:23333" "http://localhost:23333"
- [ ${installMode} == "install" ] && LEcho yellow "若无法访问面板, 请检查 [云防火墙 / 安全组] 是否有放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- #[ ${installMode} == "install" ] && [ ${firewall} == "problem" ] && LEcho red "您的服务器没有安装防火墙, 请自行放行面板 23333 和 24444 端口, 控制面板需要这两个端口才能正常工作" "Your server does not have a firewall installed, please expose ports 23333 and 24444 to use the service properly on the Internet."
-
- LEcho cyan "更多使用说明, 请参考: https://docs.mcsmanager.com/" "More info: https://docs.mcsmanager.com/"
- LEcho cyan "==================================================================" "=================================================================="
- return
-}
-
-### Other ###
-## Clean up
-Clean() {
- # Remove service
- if [ -f /etc/systemd/system/mcsm-daemon.service ]; then
- systemctl is-active --quiet mcsm-daemon && systemctl stop mcsm-daemon
- systemctl disable mcsm-daemon
- rm -f /etc/systemd/system/mcsm-daemon.service
- fi
- if [ -f /etc/systemd/system/mcsm-web.service ]; then
- systemctl is-active --quiet mcsm-web && systemctl stop mcsm-web
- systemctl disable mcsm-web
- rm -f /etc/systemd/system/mcsm-web.service
- fi
- systemctl daemon-reload
-
- # Remove MCSManager
- if [ -d "${mcsmPath}" ]; then
- rm -rf "${mcsmPath}"
- fi
- return
-}
-
-### Start ###
-LEcho cyan "+----------------------------------------------------------------------
-| MCSManager Installer
-+----------------------------------------------------------------------
-| Copyright © 2022 MCSManager All rights reserved.
-+----------------------------------------------------------------------
-| Shell Install Script by Nuomiaa & CreeperKong
-| Remake By BlueFunny_
-+----------------------------------------------------------------------
-" "+----------------------------------------------------------------------
-| MCSManager Installer
-+----------------------------------------------------------------------
-| Copyright © 2022 MCSManager All rights reserved.
-+----------------------------------------------------------------------
-| Shell Install Script by Nuomiaa & CreeperKong
-| Remake By BlueFunny_
-+----------------------------------------------------------------------
-"
-## Try to cheat APT
-Init
-Install
-exit 0
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..320d457
--- /dev/null
+++ b/index.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+ 404 Not Found
+
+
+ 404 Not Found
+
+
+
diff --git a/market-v2.json b/market-v2.json
new file mode 100644
index 0000000..33c22a6
--- /dev/null
+++ b/market-v2.json
@@ -0,0 +1,1614 @@
+{
+ "languages": [
+ {
+ "label": "English",
+ "value": "en_us",
+ "path": "templates-en.json"
+ },
+ {
+ "label": "中文",
+ "value": "zh_cn",
+ "path": "templates-zh.json"
+ }
+ ],
+ "packages": [
+ {
+ "title": "Squad Docker Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "use the official Docker image of Squad Server to quickly get started!",
+ "image": "https://squadovo.cn/img/header.jpg",
+ "gameType": "Squad",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "Intel Core platform、RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./SquadGameServer.sh",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Squad"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:7787/udp",
+ "{mcsm_port2}:15000/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Rust Docker Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run Rust Dedicated Server.",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg",
+ "gameType": "Rust",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Commercial Use Allowed",
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Rust"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:28015/udp",
+ "{mcsm_port2}:28016/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Factorio Docker Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run Factorio Dedicated Server.",
+ "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png",
+ "gameType": "Factorio",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "X86_64、RAM 4G+",
+ "size": "",
+ "targetLink": "",
+ "author": "TPing",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./bin/x64/factorio --start-server-load-latest",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Factorio"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:34197/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://hytale.com/static/images/logo.png",
+ "gameType": "Hytale",
+ "description": "Use Eclipse Temurin Java Docker image to run Hytale Dedicated Server.",
+ "title": "Hytale Docker Server",
+ "category": "hytale",
+ "runtime": "Linux",
+ "hardware": "RAM 4G+",
+ "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-linux-mcsm.zip",
+ "author": "SkyKing_PX",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "type": "hytale",
+ "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip",
+ "stopCommand": "stop",
+ "updateCommand": "./hytale-server-installer-linux",
+ "ie": "UTF-8",
+ "oe": "UTF-8",
+ "processType": "docker",
+ "docker": {
+ "image": "eclipse-temurin:25-jdk",
+ "updateCommandImage": "eclipse-temurin:25-jdk",
+ "ports": [
+ "{mcsm_port1}:5520/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Terraria Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run Terraria Dedicated Server.",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp",
+ "gameType": "Terraria",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./TerrariaServer.bin.x86_64 -port 7777 -autocreate 2 -worldname world1",
+ "stopCommand": "exit",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 105600 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/terraria",
+ "tag": [
+ "terraria"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:7777/tcp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Palworld Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run Palworld Dedicated Server.",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp",
+ "gameType": "Palworld",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./PalServer.sh -port=8211 -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 2394010 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Palworld"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:8211/udp",
+ "{mcsm_port2}:25575/tcp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Project Zomboid",
+ "title-zh": "僵尸毁灭工程",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run Project Zomboid Dedicated Server.",
+ "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行 Project Zomboid 专用服务器。",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp",
+ "gameType": "Zombie Survival",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./start-server.sh",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 380870 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Project Zomboid"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:16261/udp",
+ "{mcsm_port2}:16262/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Satisfactory Docker Server",
+ "title-zh": "幸福工厂 Docker 服务器",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run Satisfactory Dedicated Server.",
+ "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行幸福工厂专用服务器。",
+ "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/526870/header.jpg",
+ "gameType": "Satisfactory",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./FactoryServer.sh",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 1690800 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Satisfactory"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:7777/tcp",
+ "{mcsm_port2}:7777/udp",
+ "{mcsm_port3}:8888/tcp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "7 Days to Die Docker Server",
+ "title-zh": "七日杀 Docker 服务器",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run 7 Days to Die Dedicated Server.",
+ "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行七日杀专用服务器。",
+ "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/251570/header.jpg",
+ "gameType": "7 Days to Die",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "RAM 12G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./startserver.sh -configfile=serverconfig.xml",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 294420 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "7 Days to Die"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:26900/udp",
+ "{mcsm_port2}:26900/tcp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Left 4 Dead 2 Docker Server",
+ "title-zh": "求生之路2 Docker 服务器",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run Left 4 Dead 2 Dedicated Server.",
+ "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行求生之路2专用服务器。",
+ "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/550/header.jpg",
+ "gameType": "Left 4 Dead 2",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "RAM 4G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./srcds_run -game left4dead2 -port 27015 +maxplayers 8 +map c1m4_atrium",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 222860 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Left 4 Dead 2"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:27015/udp",
+ "{mcsm_port2}:27015/tcp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "ARK: Survival Evolved Docker Server",
+ "title-zh": "方舟:生存进化 Docker 服务器",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use the steam-game-runtime Docker image and SteamCMD to run ARK: Survival Evolved Dedicated Server.",
+ "description-zh": "使用 steam-game-runtime Docker 镜像和 SteamCMD 运行方舟:生存进化专用服务器。",
+ "image": "https://cdn.cloudflare.steamstatic.com/steam/apps/346110/header.jpg",
+ "gameType": "ARK: Survival Evolved",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./ShooterGame/Binaries/Linux/ShooterGameServer Ragnarok?listen?Port=7777?QueryPort=27015?MaxPlayers=120?bRawSockets?AllowCrateSpawnsOnTopOfStructures=True -UseBattlEye -nosteamclient -game -server -log",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 376030 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "ARK"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:7777/udp",
+ "{mcsm_port2}:7778/udp",
+ "{mcsm_port3}:27015/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "EndStone MC Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "For Linux, using the official EndStone MC Docker image, one-click to quickly set up the server!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp",
+ "gameType": "Minecraft",
+ "category": "Latest Version",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 2G+",
+ "size": "",
+ "targetLink": "",
+ "author": "EndStone",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "endstone -y -s .",
+ "stopCommand": "stop",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "minecraft/bedrock",
+ "tag": [
+ "bedrock"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "endstone/endstone:latest",
+ "containerName": "endstone-server",
+ "ports": [
+ "{mcsm_port1}:19132/udp"
+ ],
+ "extraVolumes": [],
+ "workingDir": "",
+ "env": [],
+ "changeWorkdir": true
+ }
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.11 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.11",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/39/downloads/paper-1.21.11-39.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.11-39.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.10 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.10",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/117/downloads/paper-1.21.10-117.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-117.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.8 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.8",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.4 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.4",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "50MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.1",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.11",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "55MB",
+ "remark": "Minecraft Purpur",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.11-2538.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.11-2538.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.10",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "55MB",
+ "remark": "Minecraft Purpur",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2535.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2535.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.8",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "55MB",
+ "remark": "Minecraft Purpur",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2497.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2497.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.4 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.4",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.11",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.11",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.10",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.10",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.8",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.8",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.4",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.4",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.1",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.1",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.11",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.11",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.10",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.10",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.8",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.8",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.4",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.4",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.1",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.1",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.11",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.11 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.10",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.10 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.8",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.4 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.4",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.1 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.1",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Standard Vanilla Minecraft 1.21.11 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.11",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Standard Vanilla Minecraft 1.21.10 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.10",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/95495a7f485eedd84ce928cef5e223b757d2f764/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Standard Vanilla Minecraft 1.21.8 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.8",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Standard Vanilla Minecraft 1.21.4 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.4",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Folia Quick Server Setup, Plugin Support",
+ "title": "[Folia] Minecraft 1.21.11",
+ "category": "mc-folia",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Minecraft Folia",
+ "targetLink": "https://fill-data.papermc.io/v1/objects/f4e9c5c374a53d17b6173cac35242c05c12217b656b6cc5dc07354cc37ec4066/folia-1.21.11-11.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/folia",
+ "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.11-11.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Folia Quick Server Setup, Plugin Support",
+ "title": "[Folia] Minecraft 1.21.8",
+ "category": "mc-folia",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Minecraft Folia",
+ "targetLink": "https://fill-data.papermc.io/v1/objects/233843cfd5001b6f658fcab549178d694cc37f0277d004ea295de0a94c57278f/folia-1.21.8-6.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/folia",
+ "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.8-6.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ }
+ ]
+}
diff --git a/market.json b/market.json
new file mode 100644
index 0000000..711c456
--- /dev/null
+++ b/market.json
@@ -0,0 +1,2304 @@
+{
+ "languages": [
+ {
+ "label": "English",
+ "value": "en_us",
+ "path": "templates-en.json"
+ },
+ {
+ "label": "中文",
+ "value": "zh_cn",
+ "path": "templates-zh.json"
+ }
+ ],
+ "packages": [
+ {
+ "language": "zh_cn",
+ "platform": "ALL",
+ "description": " Minecraft 1.21.1 快速开服 ",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp",
+ "gameType": "Minecraft",
+ "title": "[PaperMC] Minecraft 1.21.1 快速开服",
+ "category": "mc-paper",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "250MB",
+ "remark": "包含基础插件,萌新快速开服!低配机器专属!",
+ "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip",
+ "author": "alongw.cn",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "platform": "ALL",
+ "description": " 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/wallpaper.webp",
+ "gameType": "Minecraft",
+ "title": "[PaperMC] Minecraft 1.20.4",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 6G+",
+ "size": "140MB",
+ "remark": "支持插件,最低 8GB 内存要求",
+ "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip",
+ "author": "alongw.cn",
+ "dockerOptional": {
+ "image": "eclipse-temurin:17-jdk",
+ "updateCommandImage": "eclipse-temurin:17-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "泰拉瑞亚服务器",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "适用于 Linux 系统,使用《Terraria》第三方 Docker 镜像,快速开服!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp",
+ "gameType": "Terraria",
+ "category": "最新版本",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "可以商业出租",
+ "Docker 版"
+ ],
+ "setupInfo": {
+ "startCommand": "",
+ "stopCommand": "exit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/terraria",
+ "tag": [
+ "terraria"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "ryshe/terraria:latest",
+ "containerName": "terraria-server",
+ "ports": [
+ "{mcsm_port1}:7777/tcp"
+ ],
+ "extraVolumes": [],
+ "networkMode": "bridge",
+ "cpuUsage": 100,
+ "workingDir": "/root/.local/share/Terraria/Worlds",
+ "env": [],
+ "changeWorkdir": false
+ }
+ }
+ },
+ {
+ "title": "幻兽帕鲁官方服务器",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "本模板使用 Docker 安装,Linux 服务器必须安装 Docker!安装后默认的密码是 123456,修改请前往环境变量处修改。",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp",
+ "gameType": "Palworld",
+ "category": "最新版本",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "可以商业出租",
+ "Docker 版"
+ ],
+ "setupInfo": {
+ "stopCommand": "stop",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Palworld"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "kagurazakanyaa/palworld:latest",
+ "changeWorkdir": false,
+ "networkMode": "bridge",
+ "containerName": "palworld-server",
+ "workingDir": "/opt/palworld/Pal/Saved",
+ "ports": [
+ "{mcsm_port1}:8211/tcp",
+ "{mcsm_port2}:25575/tcp"
+ ],
+ "env": [
+ "SERVER_NAME=Private PalWorld Server",
+ "SERVER_DESC=Private PalWorld Server",
+ "ADMIN_PASSWORD=123456"
+ ]
+ }
+ }
+ },
+ {
+ "title": "僵尸毁灭工程",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "适用于 Linux 系统,使用《僵尸毁灭工程》第三方 Docker 镜像,快速开服!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp",
+ "gameType": "Zombie Survival",
+ "category": "最新版本",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "可以商业出租",
+ "Docker 版"
+ ],
+ "setupInfo": {
+ "startCommand": "",
+ "stopCommand": "stop",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Project Zomboid"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "renegademaster/zomboid-dedicated-server:latest",
+ "containerName": "zomboid-dedicated-server",
+ "ports": [
+ "{mcsm_port2}:16262/udp",
+ "{mcsm_port1}:16261/udp"
+ ],
+ "extraVolumes": [
+ "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid",
+ "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer"
+ ],
+ "workingDir": "",
+ "env": [],
+ "changeWorkdir": false
+ }
+ }
+ },
+ {
+ "title": "EndStone MC Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "For Linux, using the official EndStone MC Docker image, one-click to quickly set up the server!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp",
+ "gameType": "Minecraft",
+ "category": "Latest Version",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 2G+",
+ "size": "",
+ "targetLink": "",
+ "author": "EndStone",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "endstone -y -s .",
+ "stopCommand": "stop",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "minecraft/bedrock",
+ "tag": [
+ "bedrock"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "endstone/endstone:latest",
+ "containerName": "endstone-server",
+ "ports": [
+ "{mcsm_port1}:19132/udp"
+ ],
+ "extraVolumes": [],
+ "workingDir": "",
+ "env": [],
+ "changeWorkdir": true
+ }
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Paper Minecraft 1.21.10 快速开服,性能强,占用少,支持插件,不支持模组",
+ "title": "[PaperMC] Minecraft 1.21.10 快速开服",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "仅包含 Paper 版本",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/84/downloads/paper-1.21.10-84.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-84.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Paper Minecraft 1.21.8 快速开服,性能强,占用少,支持插件,不支持模组",
+ "title": "[PaperMC] Minecraft 1.21.8 快速开服",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "仅包含 Paper 版本",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Paper Minecraft 1.21.1 快速开服,性能强,占用少,支持插件,不支持模组",
+ "title": "[PaperMC] Minecraft 1.21.1 快速开服",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "仅包含 Paper 版本",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp",
+ "gameType": "Minecraft",
+ "title": "[Forge] Minecraft 1.20.1 Java 版 (支持模组)",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:17-jdk",
+ "updateCommandImage": "eclipse-temurin:17-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "platform": "Windows",
+ "description": "Minecraft Forge 1.20.1 服务器,支持 Forge 模组!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp",
+ "gameType": "Minecraft",
+ "title": "[Forge] Minecraft 1.20.1 Java 版 (支持模组)",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:17-jdk",
+ "updateCommandImage": "eclipse-temurin:17-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "platform": "Windows",
+ "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp",
+ "gameType": "Minecraft",
+ "title": "[Forge] Minecraft 1.20.6 Java 版 (支持模组)",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "platform": "Windows",
+ "description": "适用于 Windows 系统,支持 Minecraft Forge 模组,快速开服!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-mod.webp",
+ "gameType": "Minecraft",
+ "title": "[Forge] Minecraft 1.19.2 Java 版 (支持模组)",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:17-jdk",
+ "updateCommandImage": "eclipse-temurin:17-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "Terraria Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "For Linux systems, using a third-party Docker image of Terraria for quick server deployment!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/terraria.webp",
+ "gameType": "Terraria",
+ "category": "Latest Version",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "",
+ "stopCommand": "exit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/terraria",
+ "tag": [
+ "terraria"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "ryshe/terraria:latest",
+ "containerName": "terraria-server",
+ "ports": [
+ "{mcsm_port1}:7777/tcp"
+ ],
+ "extraVolumes": [],
+ "workingDir": "/root/.local/share/Terraria/Worlds",
+ "env": [],
+ "changeWorkdir": false
+ }
+ }
+ },
+ {
+ "title": "Palworld Official Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "This template uses Docker for installation. Docker must be installed on your Linux server! The default password after installation is 123456. To change it, please go to the environment variables.",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/palworld.webp",
+ "gameType": "Palworld",
+ "category": "Latest Version",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "stopCommand": "stop",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Palworld"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "kagurazakanyaa/palworld:latest",
+ "changeWorkdir": false,
+ "networkMode": "bridge",
+ "containerName": "palworld-server",
+ "workingDir": "/opt/palworld/Pal/Saved",
+ "ports": [
+ "{mcsm_port1}:8211/tcp",
+ "{mcsm_port2}:25575/tcp"
+ ],
+ "env": [
+ "SERVER_NAME=Private PalWorld Server",
+ "SERVER_DESC=Private PalWorld Server",
+ "ADMIN_PASSWORD=123456"
+ ]
+ }
+ }
+ },
+ {
+ "title": "Project Zomboid",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "For Linux systems, using a third-party Docker image of Project Zomboid for quick server deployment!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/pzomboid.webp",
+ "gameType": "Zombie Survival",
+ "category": "Latest Version",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "MCSManager",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "",
+ "stopCommand": "stop",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Project Zomboid"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "renegademaster/zomboid-dedicated-server:latest",
+ "containerName": "zomboid-dedicated-server",
+ "ports": [
+ "{mcsm_port2}:16262/udp",
+ "{mcsm_port1}:16261/udp"
+ ],
+ "extraVolumes": [
+ "{mcsm_workspace}/ZomboidConfig|/home/steam/Zomboid",
+ "{mcsm_workspace}/ZomboidDedicatedServer|/home/steam/ZomboidDedicatedServer"
+ ],
+ "workingDir": "",
+ "env": [],
+ "changeWorkdir": false
+ }
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.11 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.11",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/39/downloads/paper-1.21.11-39.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.11-39.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.10 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.10",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/117/downloads/paper-1.21.10-117.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-117.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.8 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.8",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.4 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.4",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "50MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.1 Paper Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PaperMC] Minecraft 1.21.1",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "100MB",
+ "remark": "Minecraft Paper",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/133/downloads/paper-1.21.1-133.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-133.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.11",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "55MB",
+ "remark": "Minecraft Purpur",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.11-2538.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.11-2538.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.10",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "55MB",
+ "remark": "Minecraft Purpur",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2535.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2535.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.8",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "55MB",
+ "remark": "Minecraft Purpur",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2497.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2497.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.4 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.4",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar",
+ "author": "purpurmc.org",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.11",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.11",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.10",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.10",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.8",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.8",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.9/forge-1.21.8-58.1.9-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.8-58.1.9-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.4",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.4",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.8/forge-1.21.4-54.1.8-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.4-54.1.8-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Linux",
+ "title": "[Forge] Minecraft 1.21.1",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/mc-forge.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 Forge Quick Server Setup, Mod Support for Windows",
+ "title": "[Forge] Minecraft 1.21.1",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.6/forge-1.21.1-52.1.6-installer.jar",
+ "author": "minecraftforge.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.1-52.1.6-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.11",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.11",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.10",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.10",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.63/neoforge-21.10.63-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.10.63-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.8",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.8",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.52/neoforge-21.8.52-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.8.52-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.4",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.4",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.155/neoforge-21.4.155-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.4.155-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Linux",
+ "title": "[NeoForge] Minecraft 1.21.1",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 NeoForge Quick Server Setup, Mod Support for Windows",
+ "title": "[NeoForge] Minecraft 1.21.1",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.213/neoforge-21.1.213-installer.jar",
+ "author": "neoforged.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/neoforge",
+ "startCommand": ".\\run.bat",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.1.213-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.11",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.11 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.10",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.10 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.8",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.4 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.4",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Minecraft 1.21.1 Fabric Quick Server Setup, Mod Support",
+ "title": "[FabricMC] Minecraft 1.21.1",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Standard Vanilla Minecraft 1.21.11 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.11",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Standard Vanilla Minecraft 1.21.10 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.10",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/95495a7f485eedd84ce928cef5e223b757d2f764/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Standard Vanilla Minecraft 1.21.8 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.8",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "description": "Standard Vanilla Minecraft 1.21.4 Server Setup (Official) - No Mod/Plugin Support",
+ "title": "[Vanilla] Minecraft 1.21.4",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar",
+ "author": "Mojang Studios",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "森林之子 服务器",
+ "language": "zh_cn",
+ "platform": "Windows",
+ "description": "森林之子服务器,适用于 Windows 系统",
+ "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/1326470/header.jpg?t=1708624856",
+ "remark": "请在防火墙放行8766(UDP) 27016(UDP) 9700(UDP)端口",
+ "gameType": "Sons Of The Forest",
+ "category": "最新版本",
+ "runtime": "Windows 10+",
+ "hardware": "RAM 8G+",
+ "size": "3.5GB",
+ "targetLink": "",
+ "author": "mmyddd",
+ "tags": [
+ "仅适合个人使用",
+ "Windows 版"
+ ],
+ "setupInfo": {
+ "tag": [
+ "SonsOfTheForest"
+ ],
+ "type": "steam/universal",
+ "startCommand": "echo|set /p=\"1326470\" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize",
+ "stopCommand": "^C",
+ "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "SCP秘密实验室 服务器",
+ "language": "zh_cn",
+ "platform": "Windows",
+ "description": "SCP秘密实验室服务器,适用于 Windows 系统",
+ "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719",
+ "remark": "第一次启动需要在控制台配置。服务器设置路径:%APPDATA%/SCP Secret Laboratory/config/{启动时控制台设置的端口}",
+ "gameType": "SCP秘密实验室",
+ "category": "最新版本",
+ "runtime": "Windows 10+",
+ "hardware": "RAM 8G+",
+ "size": "1GB",
+ "targetLink": "",
+ "author": "mmyddd",
+ "tags": [
+ "仅适合个人使用",
+ "Windows 版"
+ ],
+ "setupInfo": {
+ "tag": [
+ "SCP秘密实验室"
+ ],
+ "type": "steam/universal",
+ "startCommand": "LocalAdmin.exe",
+ "stopCommand": "stop",
+ "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 996560 +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "SCP秘密实验室 服务器",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "SCP秘密实验室服务器,适用于 Linux 系统",
+ "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719",
+ "remark": "第一次启动需要在控制台配置。服务器设置路径:/home/{你的用户名}/.config/SCP Secret Laboratory/config/{启动时控制台设置的端口}",
+ "gameType": "SCP秘密实验室",
+ "category": "最新版本",
+ "runtime": "Windows 10+",
+ "hardware": "RAM 8G+",
+ "size": "1GB",
+ "targetLink": "",
+ "author": "mmyddd",
+ "tags": [
+ "仅适合个人使用",
+ "Linux 版"
+ ],
+ "setupInfo": {
+ "tag": [
+ "SCP秘密实验室"
+ ],
+ "type": "steam/universal",
+ "startCommand": "LocalAdmin",
+ "stopCommand": "stop",
+ "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 996560 +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "Sons Of The Forest Official Server",
+ "language": "en_us",
+ "platform": "Windows",
+ "description": "Sons Of The Forest Server for Windows system.",
+ "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/1326470/header.jpg?t=1708624856",
+ "remark": "Please allow port 8766 (UDP) 27016 (UDP) 9700 (UDP) to pass through the firewall.",
+ "gameType": "Sons Of The Forest",
+ "category": "latest",
+ "runtime": "Windows 10+",
+ "hardware": "RAM 8G+",
+ "size": "3.5GB",
+ "targetLink": "",
+ "author": "mmyddd",
+ "tags": [
+ "Windows version"
+ ],
+ "setupInfo": {
+ "tag": [
+ "SonsOfTheForest"
+ ],
+ "type": "steam/universal",
+ "startCommand": "echo|set /p=\"1326470\" > steam_appid.txt & set SteamAppId=1326470 && set SteamGameId=1326470 && SonsOfTheForestDS.exe -userdatapath \"{mcsm_workspace}/userdata\" | consoleparser -colorize",
+ "stopCommand": "^C",
+ "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 2465200 +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "SCP:SL Official Server",
+ "language": "en_us",
+ "platform": "Windows",
+ "description": "SCP:SL Official Server for Windows",
+ "image": "https://shared.cdn.queniuqe.com/store_item_assets/steam/apps/700330/dad38399643cda1a4084b1faff60452427bef8c0/header.jpg?t=1747606719",
+ "remark": "The first startup requires configuration in the console.Server Config Path:%APPDATA%/SCP Secret Laboratory/config/{port}",
+ "gameType": "SCP:SL",
+ "category": "latest",
+ "runtime": "Windows 10+",
+ "hardware": "RAM 8G+",
+ "size": "1GB",
+ "targetLink": "",
+ "author": "mmyddd",
+ "tags": [
+ "Windows version"
+ ],
+ "setupInfo": {
+ "tag": [
+ "SCP:SL"
+ ],
+ "type": "steam/universal",
+ "startCommand": "LocalAdmin.exe",
+ "stopCommand": "stop",
+ "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 996560 +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "EndStone MC 服务端",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "适用于 Linux 系统,使用 EndStone MC 官方 Docker 镜像,一键快速开服!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/endstone_mc.webp",
+ "gameType": "Minecraft",
+ "category": "最新版本",
+ "runtime": "Ubuntu/Centos LTS",
+ "hardware": "RAM 2G+",
+ "size": "",
+ "targetLink": "",
+ "author": "EndStone",
+ "tags": [
+ "可以商业出租",
+ "Docker版"
+ ],
+ "setupInfo": {
+ "startCommand": "endstone -y -s .",
+ "stopCommand": "stop",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "minecraft/bedrock",
+ "tag": [
+ "bedrock"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "updateCommand": "",
+ "docker": {
+ "image": "endstone/endstone:latest",
+ "containerName": "endstone-server",
+ "ports": [
+ "{mcsm_port1}:19132/udp"
+ ],
+ "extraVolumes": [],
+ "workingDir": "",
+ "env": [],
+ "changeWorkdir": true
+ }
+ }
+ },
+ {
+ "title": "战术小队 服务器",
+ "language": "zh_cn",
+ "platform": "Windows",
+ "description": "适用于 Windows 系统的战术小队服务器,快速开服",
+ "image": "https://squadovo.cn/img/header.jpg",
+ "gameType": "Squad",
+ "category": "最新版本",
+ "runtime": "Windows",
+ "hardware": "Intel Core 平台、RAM 8G+",
+ "size": "20GB",
+ "author": "南赛",
+ "tags": [
+ "不完全兼容面板"
+ ],
+ "remark": "需安装 Visual C++ 才可以运行",
+ "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe",
+ "setupInfo": {
+ "type": "steam/universal",
+ "startCommand": "\"SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 -log",
+ "stopCommand": "^C",
+ "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "Squad Server",
+ "language": "en_us",
+ "platform": "Windows",
+ "description": "Squad Server suitable for Windows system, fast server setup",
+ "image": "https://squadovo.cn/img/header.jpg",
+ "gameType": "Squad",
+ "category": "Latest Version",
+ "runtime": "Windows Server",
+ "hardware": "Intel Core platform、RAM 8G+",
+ "size": "20GB",
+ "author": "NanSai",
+ "tags": [
+ "不完全兼容面板"
+ ],
+ "remark": "Need to install Visual C++",
+ "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe",
+ "setupInfo": {
+ "type": "steam/universal",
+ "startCommand": "\"SquadGame/Binaries/Win64/SquadGameServer.exe\" Port=7787 QueryPort=15000 -log",
+ "stopCommand": "^C",
+ "updateCommand": "steamcmd.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 403240 validate +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "人渣 服务器",
+ "language": "zh_cn",
+ "platform": "Windows",
+ "description": "适用于 Windows 系统的人渣服务器,快速开服",
+ "image": "https://api.nansai.cc/img/scum/header_chinese.jpg",
+ "gameType": "SCUM",
+ "category": "最新版本",
+ "runtime": "Windows Server",
+ "hardware": "Intel Core 平台、RAM 8G+",
+ "size": "20GB",
+ "author": "南赛",
+ "tags": [
+ "不完全兼容面板"
+ ],
+ "remark": "需安装 Visual C++ 才可以运行",
+ "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe",
+ "setupInfo": {
+ "type": "steam/universal",
+ "startCommand": "\"SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log",
+ "stopCommand": "^C",
+ "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 3792580 validate +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "SCUM Server",
+ "language": "en_us",
+ "platform": "Windows",
+ "description": "SCUM Server suitable for Windows system, fast server setup",
+ "image": "https://api.nansai.cc/img/scum/header_English.jpg",
+ "gameType": "SCUM",
+ "category": "Latest Version",
+ "runtime": "Windows Server",
+ "hardware": "Intel Core platform、RAM 8G+",
+ "size": "20GB",
+ "author": "NanSai",
+ "tags": [
+ "Incompatible with panel"
+ ],
+ "remark": "need install Visual C++",
+ "targetLink": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/steamcmd.exe",
+ "setupInfo": {
+ "type": "steam/universal",
+ "startCommand": "\"SCUM/Binaries/Win64/SCUMServer.exe\" -port=7779 -log",
+ "stopCommand": "^C",
+ "updateCommand": "SteamCMD.exe +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 3792580 validate +quit",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "title": "战术小队 官方服务器",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "使用《战术小队》官方 Docker 镜像,快速开服!",
+ "image": "https://squadovo.cn/img/header.jpg",
+ "gameType": "Squad",
+ "category": "最新版本",
+ "runtime": "Linux",
+ "hardware": "Intel Core 平台、RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "南赛",
+ "tags": [
+ "可以商业出租",
+ "Docker 版"
+ ],
+ "setupInfo": {
+ "startCommand": "./SquadGameServer.sh",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Squad"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:7787/udp",
+ "{mcsm_port2}:15000/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Squad Docker Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "use the official Docker image of Squad Server to quickly get started!",
+ "image": "https://squadovo.cn/img/header.jpg",
+ "gameType": "Squad",
+ "category": "Latest Version",
+ "runtime": "Linux",
+ "hardware": "Intel Core platform、RAM 8G+",
+ "size": "",
+ "targetLink": "",
+ "author": "Nansai",
+ "tags": [
+ "Commercial Use Allowed",
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./SquadGameServer.sh",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Squad"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:7787/udp",
+ "{mcsm_port2}:15000/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Rust 服务器",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "使用 Rust 第三方 Docker 镜像,快速开服!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg",
+ "gameType": "Rust",
+ "category": "最新版本",
+ "runtime": "Windows/Linux",
+ "hardware": "Intel Core 平台、RAM 16G+",
+ "size": "",
+ "targetLink": "",
+ "author": "南赛",
+ "tags": [
+ "可以商业出租",
+ "Docker 版"
+ ],
+ "setupInfo": {
+ "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Rust"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:28015/udp",
+ "{mcsm_port2}:28016/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Rust Docker Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use Rust third-party Docker images to quickly get started!",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/rust.jpg",
+ "gameType": "Rust",
+ "category": "Latest Version",
+ "runtime": "Windows/Linux",
+ "hardware": "Intel Core platform、RAM 16G+",
+ "size": "",
+ "targetLink": "",
+ "author": "南赛",
+ "tags": [
+ "Commercial Use Allowed",
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./RustDedicated -batchmode -nographics +server.port 28015 +rcon.port 28016",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 258550 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Rust"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:28015/udp",
+ "{mcsm_port2}:28016/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Factorio 服务器",
+ "language": "zh_cn",
+ "platform": "Linux",
+ "description": "使用 Factorio 第三方 Docker 镜像,快速开服!",
+ "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png",
+ "gameType": "Factorio",
+ "category": "最新版本",
+ "runtime": "Windows/Linux",
+ "hardware": "X86_64、RAM 4G+",
+ "size": "",
+ "targetLink": "",
+ "author": "TPing",
+ "tags": [
+ "Docker 版"
+ ],
+ "setupInfo": {
+ "startCommand": "./bin/x64/factorio --start-server-load-latest",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Factorio"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:34197/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "title": "Factorio Docker Server",
+ "language": "en_us",
+ "platform": "Linux",
+ "description": "Use Factorio third-party Docker images to quickly get started!",
+ "image": "https://cdn.factorio.com/assets/img/web/factorio-logo2.png",
+ "gameType": "Factorio",
+ "category": "Latest Version",
+ "runtime": "Windows/Linux",
+ "hardware": "X86_64、RAM 4G+",
+ "size": "",
+ "targetLink": "",
+ "author": "TPing",
+ "tags": [
+ "Docker version"
+ ],
+ "setupInfo": {
+ "startCommand": "./bin/x64/factorio --start-server-load-latest",
+ "stopCommand": "^C",
+ "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 427520 validate\" +quit",
+ "ie": "utf8",
+ "oe": "utf8",
+ "type": "steam/universal",
+ "tag": [
+ "Factorio"
+ ],
+ "fileCode": "utf8",
+ "processType": "docker",
+ "runAs": "steam",
+ "docker": {
+ "image": "githubyumao/steam-game-runtime:latest",
+ "updateCommandImage": "githubyumao/steam-game-runtime:latest",
+ "ports": [
+ "{mcsm_port1}:34197/udp"
+ ],
+ "changeWorkdir": true,
+ "workingDir": "/data",
+ "env": [],
+ "extraVolumes": []
+ }
+ }
+ },
+ {
+ "language": "zh_cn",
+ "description": "使用TShock插件的泰拉瑞亚服务器",
+ "title": "Terraria_windows_x86",
+ "category": "最新版本",
+ "runtime": ".NET 6+",
+ "hardware": "RAM 1G",
+ "targetLink": "https://github.com/Pryaxis/TShock/releases/download/v5.2.4/TShock-5.2.4-for-Terraria-1.4.4.9-win-amd64-Release.zip",
+ "author": "Dawn3901",
+ "setupInfo": {
+ "startCommand": "TShock.Server.exe",
+ "stopCommand": "stop",
+ "ie": "UTF-8",
+ "oe": "UTF-8",
+ "createDatetime": 1767005798835,
+ "lastDatetime": 0,
+ "type": "universal",
+ "tag": [],
+ "endTime": 0,
+ "fileCode": "UTF-8",
+ "processType": "general",
+ "updateCommand": "{mcsm_steamcmd} +login anonymous +force_install_dir \"{mcsm_workspace}\" +app_update 380870 +quit",
+ "actionCommandList": [],
+ "crlf": 1,
+ "category": 0,
+ "enableRcon": false,
+ "terminalOption": {
+ "haveColor": true,
+ "pty": false,
+ "ptyWindowCol": 164,
+ "ptyWindowRow": 40
+ },
+ "eventTask": {
+ "autoStart": false,
+ "autoRestart": false,
+ "autoRestartMaxTimes": 3,
+ "ignore": false
+ },
+ "docker": {
+ "ports": [],
+ "extraVolumes": [],
+ "networkMode": "bridge",
+ "networkAliases": [],
+ "workingDir": "/data",
+ "env": [],
+ "changeWorkdir": true
+ },
+ "pingConfig": {
+ "type": 1
+ },
+ "extraServiceConfig": {}
+ },
+ "gameType": "Terraria",
+ "image": "https://cdn.akamai.steamstatic.com/steam/apps/105600/header.jpg?t=1666290860",
+ "platform": "Windows",
+ "tags": [
+ "TShock",
+ "Terraria"
+ ],
+ "isSummary": false
+ },
+ {
+ "platform": "Windows",
+ "language": "en_us",
+ "image": "https://hytale.com/static/images/logo.png",
+ "gameType": "Hytale",
+ "description": "Hytale Quick Server Setup, Mod Support",
+ "title": "Hytale Server",
+ "category": "hytale",
+ "runtime": "Java 25+",
+ "hardware": "RAM 4G+",
+ "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-win-mcsm.zip",
+ "author": "SkyKing_PX",
+ "setupInfo": {
+ "type": "hytale",
+ "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip",
+ "stopCommand": "stop",
+ "updateCommand": ".\\hytale-server-installer-win.exe",
+ "ie": "UTF-8",
+ "oe": "UTF-8"
+ }
+ },
+ {
+ "platform": "Linux",
+ "language": "en_us",
+ "image": "https://hytale.com/static/images/logo.png",
+ "gameType": "Hytale",
+ "description": "Hytale Quick Server Setup, Mod Support",
+ "title": "Hytale Server",
+ "category": "hytale",
+ "runtime": "Java 25+",
+ "hardware": "RAM 4G+",
+ "targetLink": "https://github.com/SkyKingPX/Hytale-Server-Installer/releases/download/1.0.0/hytale-server-installer-linux-mcsm.zip",
+ "author": "SkyKing_PX",
+ "setupInfo": {
+ "type": "hytale",
+ "startCommand": "java -Xms2G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets Assets.zip",
+ "stopCommand": "stop",
+ "updateCommand": "sudo ./hytale-server-installer-linux",
+ "ie": "UTF-8",
+ "oe": "UTF-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Folia Quick Server Setup, Plugin Support",
+ "title": "[Folia] Minecraft 1.21.11",
+ "category": "mc-folia",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Minecraft Folia",
+ "targetLink": "https://fill-data.papermc.io/v1/objects/f4e9c5c374a53d17b6173cac35242c05c12217b656b6cc5dc07354cc37ec4066/folia-1.21.11-11.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/folia",
+ "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.11-11.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "platform": "ALL",
+ "language": "en_us",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Folia Quick Server Setup, Plugin Support",
+ "title": "[Folia] Minecraft 1.21.8",
+ "category": "mc-folia",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Minecraft Folia",
+ "targetLink": "https://fill-data.papermc.io/v1/objects/233843cfd5001b6f658fcab549178d694cc37f0277d004ea295de0a94c57278f/folia-1.21.8-6.jar",
+ "author": "papermc.io",
+ "dockerOptional": {
+ "image": "eclipse-temurin:21-jdk",
+ "updateCommandImage": "eclipse-temurin:21-jdk"
+ },
+ "setupInfo": {
+ "type": "minecraft/java/folia",
+ "startCommand": "java -Xms4096M -Xmx4096M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -jar folia-1.21.8-6.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/setup.sh b/setup.sh
index c0c6aa4..d75b71c 100644
--- a/setup.sh
+++ b/setup.sh
@@ -1,351 +1,1386 @@
#!/bin/bash
-printf "\033c"
-
-error=""
-node="v14.19.1"
-arch=$(uname -m)
-mcsmanager_install_path="/opt/mcsmanager"
-zh=$([[ $(locale -a) =~ "zh" ]] && echo 1; export LANG=zh_CN.UTF-8 || echo 0)
-
-Red_Error() {
- echo '================================================='
- printf '\033[1;31;40m%b\033[0m\n' "$@"
- echo '================================================='
- exit 1
+# Official MCSManager installation script.
+# This script installs or updates the MCSManager Web and/or Daemon to the latest version.
+# ------------------------------------------------------------------------------
+# Supported Linux distributions:
+# This script supports the following mainstream Linux distributions:
+# - Ubuntu: 18.04, 20.04, 22.04, 24.04
+# - Debian: 10, 11, 12, 13
+# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream
+# - RHEL: 7, 8, 9, 10
+# - Arch Linux: Support planned (TBD)
+# ------------------------------------------------------------------------------
+
+# Target installation directory (can be overridden with --install-dir)
+install_dir="/opt/mcsmanager"
+
+# Primary download URL bas. Full package URL = download_base_url + package_name
+download_base_url="https://github.com/MCSManager/MCSManager/releases/latest/download/"
+
+# Fallback download URL (can also be a local directory or mirror)
+download_fallback_url="https://download.mcsmanager.com/mcsmanager_linux_release.tar.gz"
+
+# Name of the release package to download/detect
+package_name="mcsmanager_linux_release.tar.gz"
+
+# Node.js version to be installed
+# Keep the leading "v"
+node_version="v20.12.2"
+node_version_centos7="v16.20.2"
+
+# Node download base URL - primary
+node_download_url_base="https://nodejs.org/dist/"
+
+# Unoffical build of Node.js, for more ISA support
+node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/"
+
+# Node download URL - fallback.
+# This is the URL points directly to the file, not the base. This can also be a local absolute path.
+# Only supports https:// or http:// for web locations.
+node_download_fallback=""
+
+# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir)
+node_install_dir="$install_dir"
+
+# Temp dir for file extraction
+tmp_dir="/tmp"
+
+# Bypass installed user permission check, override by --force-permission
+force_permission=false
+
+
+# --------------- Global Variables ---------------#
+# DO NOT MODIFY #
+
+
+# Component installation options.
+# For fresh installs, both daemon and web components are installed by default.
+# For updates, behavior depends on detected existing components.
+# Can be overridden with --install daemon/web/all
+install_daemon=true
+install_web=true
+
+# Install MCSM as (default: root).
+# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm
+# To ensure compatibility, only user mcsm is supported.
+install_user="root"
+# Installed user, for permission check
+web_installed=false
+daemon_installed=false
+web_installed_user=""
+daemon_installed_user=""
+
+# Service file locations
+# the final dir = systemd_file + {web/daemon} + ".service"
+systemd_file="/etc/systemd/system/mcsm-"
+# Optional: Override the default installation source file.
+# If --install-source is specified, the installer will use the provided
+# "mcsmanager_linux_release.tar.gz" file instead of downloading it.
+# Only support local absolute path.
+install_source_path=""
+
+# temp path for extracted file(s)
+install_tmp_dir="/opt/mcsmanager/mcsm_abcd"
+
+# dir name for data dir backup
+# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data
+# only valid for when during an update
+backup_prefix="data_bak_"
+
+# System architecture (detected automatically)
+arch=""
+version=""
+distro=""
+
+
+
+# Supported OS versions (map-style structure)
+# Format: supported_os["distro_name"]="version1 version2 version3 ..."
+declare -A supported_os
+supported_os["Ubuntu"]="18 20 22 24"
+supported_os["Debian"]="10 11 12 13"
+supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream"
+supported_os["RHEL"]="7 8 9 10"
+supported_os["Arch"]="rolling"
+
+# Required system commands for installation
+# These will be checked before logic process
+required_commands=(
+ chmod
+ chown
+ wget
+ tar
+ stat
+ useradd
+ usermod
+ date
+)
+
+# Node.js related sections
+# Enable strict version checking (exact match)
+# enabled -> strict requriement for defined node version
+# false -> newer version allowed
+# Older version is NEVER allowed
+strict_node_version_check=true
+
+# Will be set based on actual node status
+install_node=true
+# Remove leading "v" from defined version
+required_node_ver="${node_version#v}"
+
+# Holds absolute path for node & npm
+node_bin_path=""
+npm_bin_path=""
+# Hold Node.js arch name, e.g. x86_64 -> x64
+node_arch=""
+# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch}
+node_path=""
+
+# For installation result
+daemon_key=""
+daemon_port=""
+web_port=""
+daemon_key_config_subpath="data/Config/global.json"
+web_port_config_subpath="data/SystemConfig/config.json"
+
+# Terminal color & style related
+# Default to false, auto check later
+SUPPORTS_COLOR=false
+SUPPORTS_STYLE=false
+# Declare ANSI reset
+RESET="\033[0m"
+
+# Foreground colors
+declare -A FG_COLORS=(
+ [black]="\033[0;30m"
+ [red]="\033[0;31m"
+ [green]="\033[0;32m"
+ [yellow]="\033[0;33m"
+ [blue]="\033[0;34m"
+ [magenta]="\033[0;35m"
+ [cyan]="\033[0;36m"
+ [white]="\033[0;37m"
+)
+
+# Font styles
+declare -A STYLES=(
+ [bold]="\033[1m"
+ [underline]="\033[4m"
+ [italic]="\033[3m" # Often ignored
+ [clear_line]="\r\033[2K"
+ [strikethrough]="\033[9m"
+)
+
+
+### Helper Functions
+# Execution wrapper, avoid unexpected crashes.
+safe_run() {
+ local func="$1"
+ local err_msg="$2"
+ shift 2
+
+ if ! "$func" "$@"; then
+ echo "Error: $err_msg"
+ exit 1
+ fi
}
-echo_red() {
- printf '\033[1;31m%b\033[0m\n' "$@"
+# Function to ensure the script is run as root
+check_root() {
+ # Using Bash's built-in EUID variable
+ if [ -n "$EUID" ]; then
+ if [ "$EUID" -ne 0 ]; then
+ cprint red "Error: This script must be run as root. Please use sudo or switch to the root user."
+ exit 1
+ fi
+ else
+ # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment)
+ if [ "$(id -u)" -ne 0 ]; then
+ cprint red "Error: This script must be run as root. Please use sudo or switch to the root user."
+ exit 1
+ fi
+ fi
}
-echo_green() {
- printf '\033[1;32m%b\033[0m\n' "$@"
+# Function to check whether current terminal support color & style
+detect_terminal_capabilities() {
+ SUPPORTS_COLOR=false
+ SUPPORTS_STYLE=false
+
+ if [ -t 1 ] && command -v tput >/dev/null 2>&1; then
+ if [ "$(tput colors)" -ge 8 ]; then
+ SUPPORTS_COLOR=true
+ fi
+ if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then
+ SUPPORTS_STYLE=true
+ fi
+ fi
+
+ if [ "$SUPPORTS_COLOR" = true ]; then
+ cprint green "[OK] Terminal supports colored output."
+ else
+ cprint yellow "Note: Terminal does not support colored output. Continuing without formatting."
+ fi
+
+ if [ "$SUPPORTS_STYLE" = true ]; then
+ cprint green "[OK] Terminal supports bold and underline formatting."
+ else
+ cprint yellow "Note: Terminal does not support advanced text styles."
+ fi
}
-echo_cyan() {
- printf '\033[1;36m%b\033[0m\n' "$@"
+# Check whether daemon or web is installed
+is_component_installed() {
+ local component_name="$1"
+ local component_path="${install_dir}/${component_name}"
+
+ if [[ -d "$component_path" ]]; then
+ cprint green "Component '$component_name' is already installed at $component_path"
+
+ # Set corresponding global variable
+ if [[ "$component_name" == "daemon" ]]; then
+ daemon_installed=true
+ elif [[ "$component_name" == "web" ]]; then
+ web_installed=true
+ fi
+
+ return 0
+ else
+ cprint yellow "Component '$component_name' is not installed"
+
+ # Set corresponding global variable
+ if [[ "$component_name" == "daemon" ]]; then
+ daemon_installed=false
+ elif [[ "$component_name" == "web" ]]; then
+ web_installed=false
+ fi
+
+ return 1
+ fi
}
-echo_cyan_n() {
- printf '\033[1;36m%b\033[0m' "$@"
+check_component_permission() {
+ local component="$1"
+ local service_file="${systemd_file}${component}.service"
+
+ if [[ ! -f "$service_file" ]]; then
+ cprint yellow "Service file not found: $service_file"
+ return 0 # nothing changed
+ fi
+
+ # Extract the User= line if it exists
+ local user_line
+ user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1)
+
+ local user
+ if [[ -z "$user_line" ]]; then
+ user="root" # default if no User= is defined
+ else
+ user="${user_line#User=}"
+ fi
+
+ # Validate user
+ if [[ "$user" != "root" && "$user" != "mcsm" ]]; then
+ cprint red bold "Unsupported user '$user' in $service_file. Expected 'root' or 'mcsm'."
+ exit 1
+ fi
+
+ # Assign to appropriate global
+ if [[ "$component" == "web" ]]; then
+ web_installed_user="$user"
+ elif [[ "$component" == "daemon" ]]; then
+ daemon_installed_user="$user"
+ fi
+
+ cprint cyan "Detected $component installed as user: $user"
+ return 0
}
-echo_yellow() {
- printf '\033[1;33m%b\033[0m\n' "$@"
+
+
+parse_args() {
+ local explicit_install_flag=false
+
+ while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --install-dir)
+ if [[ -n "$2" ]]; then
+ install_dir="$2"
+ shift 2
+ else
+ echo "Error: --install-dir requires a path argument."
+ exit 1
+ fi
+ ;;
+ --node-install-dir)
+ if [[ -n "$2" ]]; then
+ node_install_dir="$2"
+ shift 2
+ else
+ echo "Error: --node-install-dir requires a path argument."
+ exit 1
+ fi
+ ;;
+ --install)
+ explicit_install_flag=true
+ if [[ -n "$2" && "$2" != --* ]]; then
+ case "$2" in
+ daemon)
+ install_daemon=true
+ is_component_installed "daemon"
+ install_web=false
+ check_component_permission "daemon"
+ ;;
+ web)
+ install_daemon=false
+ is_component_installed "web"
+ install_web=true
+ check_component_permission "web"
+ ;;
+ all)
+ install_daemon=true
+ install_web=true
+ is_component_installed "daemon"
+ is_component_installed "web"
+ check_component_permission "daemon"
+ check_component_permission "web"
+ ;;
+ *)
+ echo "Error: Invalid value for --install. Expected 'daemon', 'web', or 'all'."
+ echo "Usage: --install daemon|web|all"
+ exit 1
+ ;;
+ esac
+ shift 2
+ else
+ echo "Error: --install flag provided but no value. Please specify: daemon, web, or all."
+ echo "Usage: --install daemon|web|all"
+ exit 1
+ fi
+ ;;
+ --user)
+ if [[ -n "$2" ]]; then
+ case "$2" in
+ root)
+ install_user="root"
+ ;;
+ mcsm)
+ install_user="mcsm"
+ ;;
+ *)
+ echo "Error: Invalid user '$2'. Only 'root' and 'mcsm' are supported."
+ echo "Usage: --user root|mcsm"
+ exit 1
+ ;;
+ esac
+ shift 2
+ else
+ echo "Error: --user requires a value (root or mcsm)."
+ exit 1
+ fi
+ ;;
+ --install-source)
+ if [[ -n "$2" ]]; then
+ install_source_path="$2"
+ shift 2
+ else
+ echo "Error: --install-source requires a file path."
+ exit 1
+ fi
+ ;;
+ --force-permission)
+ force_permission=true
+ shift
+ ;;
+ *)
+ echo "Error: Unknown argument: $1"
+ exit 1
+ ;;
+ esac
+ done
+
+ # Auto-detect branch: only run if --install was not explicitly passed
+ if [[ "$explicit_install_flag" == false ]]; then
+ daemon_installed=false
+ web_installed=false
+
+ if is_component_installed "daemon"; then
+ daemon_installed=true
+ check_component_permission "daemon"
+ fi
+ if is_component_installed "web"; then
+ web_installed=true
+ check_component_permission "web"
+ fi
+
+ # When only one component installed, we wanted to process that one only.
+ if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then
+ install_daemon=true
+ install_web=false
+ elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then
+ install_daemon=false
+ install_web=true
+ else
+ install_daemon=true
+ install_web=true
+ fi
+ fi
}
-Install_Node() {
- if [ "$zh" == 1 ];
- then echo_cyan_n "[+] 安装 Node 环境... "
- else echo_cyan_n "[+] Install Node environment... "
+
+# Get Distribution & Architecture Info
+detect_os_info() {
+ distro="Unknown"
+ version="Unknown"
+ arch=$(uname -m)
+
+ # Try primary source
+ if [ -f /etc/os-release ]; then
+ . /etc/os-release
+ distro_id="${ID,,}"
+ version_id="${VERSION_ID,,}"
+
+ case "$distro_id" in
+ ubuntu)
+ distro="Ubuntu"
+ version="$version_id"
+ ;;
+ debian)
+ distro="Debian"
+ version="$version_id"
+ ;;
+ centos)
+ distro="CentOS"
+ version="$version_id"
+ ;;
+ rhel*)
+ distro="RHEL"
+ version="$version_id"
+ ;;
+ arch)
+ distro="Arch"
+ version="rolling"
+ ;;
+ *)
+ distro="${ID:-Unknown}"
+ version="$version_id"
+ ;;
+ esac
fi
- rm -irf "$node_install_path"
+ # Fallbacks for missing or invalid version
+ if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then
+ if [ -f /etc/issue ]; then
+ version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1)
+ if [[ -n "$version_guess" ]]; then
+ version="$version_guess"
+ fi
+ fi
+ fi
- cd /opt || exit
+ # Normalize version: if purely numeric/dotted keep only major; otherwise leave as-is
+ version_full="$version"
+ #if [[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then
+ # version="${version%%.*}"
+ #fi
+ cprint cyan "Detected OS: $distro $version_full"
+ cprint cyan "Detected Architecture: $arch"
+}
- wget -o /dev/null https://npmmirror.com/mirrors/node/"$node"/node-"$node"-linux-"$arch".tar.gz
+version_specific_rules() {
+ # Default: do nothing unless a rule matches
- tar -zxf node-"$node"-linux-"$arch".tar.gz
+ if [[ "$distro" == "CentOS" && "$version" == "7" ]]; then
+ cprint yellow "Detected CentOS 7 — overriding Node.js version."
+ node_version="$node_version_centos7"
+ required_node_ver="${node_version#v}"
+ fi
+}
- rm -rf node-"$node"-linux-"$arch".tar.gz
+# Check if all required commands are available
+check_required_commands() {
+ local missing=0
- if [ -f "$node_install_path"/bin/node ] && [ "$("$node_install_path"/bin/node -v)" == "$node" ]
- then
- if [ "$zh" == 1 ];
- then echo_green "成功"
- else echo_green "Success"
+ for cmd in "${required_commands[@]}"; do
+ if ! command -v "$cmd" >/dev/null 2>&1; then
+ echo "Error: Required command '$cmd' is not available in PATH."
+ missing=1
fi
+ done
+
+ if [ "$missing" -ne 0 ]; then
+ echo "One or more required commands are missing. Please install them and try again."
+ return 1
+ fi
+
+ cprint green "All required commands are available."
+ return 0
+}
+
+# Print with specified color and style, fallback to RESET if not supported.
+# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white
+# Supported styles*: bold|underline|italic|clear_line|strikethrough
+# *Note: some style may not necessarily work on all terminals.
+# Example usage:
+# cprint green bold "Installation completed successfully."
+# cprint red underline "Failed to detect required command: wget"
+# cprint yellow "Warning: Disk space is low."
+# cprint underline "Failed to detect required command: wget"
+# cprint bold green underline"Installation completed successfully."
+
+cprint() {
+ local color=""
+ local text=""
+ local styles=""
+ local disable_prefix=false
+ local disable_newline=false
+
+ while [[ $# -gt 1 ]]; do
+ case "$1" in
+ black|red|green|yellow|blue|magenta|cyan|white)
+ color="$1"
+ ;;
+ bold|underline|italic|clear_line|strikethrough)
+ styles+="${STYLES[$1]}"
+ ;;
+ noprefix)
+ disable_prefix=true
+ ;;
+ nonl)
+ disable_newline=true
+ ;;
+ esac
+ shift
+ done
+
+ text="$1"
+
+ local prefix_text=""
+ if [[ "$disable_prefix" != true ]]; then
+ local timestamp="[$(date +%H:%M:%S)]"
+ local label="[MCSM Installer]"
+ prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} "
+ fi
+
+ local prefix=""
+ if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then
+ prefix+="${FG_COLORS[$color]}"
+ fi
+ if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then
+ prefix="$styles$prefix"
+ fi
+
+ if [[ "$disable_newline" == true ]]; then
+ printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET"
else
- if [ "$zh" == 1 ];
- then
- echo_red "失败"
- Red_Error "[x] Node 安装失败!"
+ printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET"
+ fi
+}
+
+
+
+
+# Permission check before proceed with installation
+permission_barrier() {
+ if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then
+ cprint cyan "No components currently installed — skipping permission check."
+ return 0
+ fi
+
+ for component in web daemon; do
+ local is_installed_var="${component}_installed"
+ local installed_user_var="${component}_installed_user"
+
+ if [[ "${!is_installed_var}" == true ]]; then
+ local installed_user="${!installed_user_var}"
+
+ # Step 0: Ensure installed user is detected
+ if [[ -z "$installed_user" ]]; then
+ cprint red bold "Detected that '$component' is installed but could not determine the user from its systemd service file."
+ cprint red "This may indicate a custom or unsupported service file setup."
+ cprint red "Refusing to proceed to avoid potential conflicts."
+ exit 1
+ fi
+
+ # Step 1: User match check with optional force override
+ if [[ "$installed_user" != "$install_user" ]]; then
+ if [[ "$force_permission" == true ]]; then
+ cprint yellow bold "Permission mismatch for '$component':"
+ cprint yellow "Installed as user: $installed_user"
+ cprint yellow "Target install user: $install_user"
+ cprint yellow "User mismatch, but --force-permission is set. Continuing and updating permissions..."
+ sleep 3
+ else
+ cprint red bold "Permission mismatch for '$component':"
+ cprint red "Installed as user: $installed_user"
+ cprint red "Current install target user: $install_user"
+ cprint red "Unable to proceed due to ownership conflict. Use --force-permission to override and update file permission."
+ exit 1
+ fi
else
- echo_red "Failed"
- Red_Error "[x] Node installation failed!"
+ cprint green bold "Permission check passed: '$installed_user' matches target user."
+ fi
+
fi
+ done
+
+ # Step 2: Directory ownership check
+ local dir_owner
+ dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null)
+
+ if [[ -z "$dir_owner" ]]; then
+ cprint red bold "Unable to determine owner of install_dir: $install_dir"
+ exit 1
+ fi
+
+ if [[ "$dir_owner" != "$install_user" ]]; then
+ if [[ "$force_permission" == true ]]; then
+ cprint yellow bold "Install directory ownership mismatch:"
+ cprint yellow " Directory: $install_dir"
+ cprint yellow " Owned by: $dir_owner"
+ cprint yellow " Expected: $install_user"
+ cprint yellow " --force-permission is set. Continuing despite mismatch."
+ sleep 3
+ else
+ cprint red bold "Install directory ownership mismatch:"
+ cprint red " Directory: $install_dir"
+ cprint red " Owned by: $dir_owner"
+ cprint red " Expected: $install_user"
+ exit 1
+ fi
+ else
+ cprint green bold "Install directory ownership check passed: '$install_dir' is owned by '$install_user'."
fi
- echo
- echo_yellow "=============== Node Version ==============="
- echo_yellow " node: $("$node_install_path"/bin/node -v)"
- echo_yellow " npm: v$(/usr/bin/env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)"
- echo_yellow "=============== Node Version ==============="
- echo
+ cprint green bold "Permissions and ownership validated. Proceeding."
+ return 0
+}
+
- sleep 3
+
+# Map OS arch with actual Node.js Arch name
+# This function should be placed after var arch has been assigned a valid value.
+resolve_node_arch() {
+ case "$arch" in
+ x86_64)
+ node_arch="x64"
+ ;;
+ aarch64)
+ node_arch="arm64"
+ ;;
+ armv7l)
+ node_arch="armv7l"
+ ;;
+ loongarch64)
+ node_arch="loong64"
+ # Use unoffical build
+ node_download_url_base=$node_unoffical_build_url
+ ;;
+ *)
+ cprint red bold "Unsupported architecture for Node.js: $arch"
+ return 1
+ ;;
+ esac
+
+ # Assign node_path based on resolved arch and current version/install dir
+ node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}"
+
+ cprint cyan "Resolved Node.js architecture: $node_arch"
+ cprint cyan "Node.js install path: $node_path"
}
-Install_MCSManager() {
- if [ "$zh" == 1 ];
- then echo_cyan "[+] 安装 MCSManager..."
- else echo_cyan "[+] Install MCSManager..."
+# Check if Node.js at PATH is valid.
+# This function check Node.js version + NPM (if Node.js valid)
+verify_node_at_path() {
+ local node_path="$1"
+ node_bin_path="$node_path/bin/node"
+ npm_bin_path="$node_path/bin/npm"
+
+ # Node binary missing
+ if [ ! -x "$node_bin_path" ]; then
+ return 1
fi
- # 删除服务
- rm -f /etc/systemd/system/mcsm-daemon.service
- rm -f /etc/systemd/system/mcsm-web.service
+ local installed_ver
+ installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')"
- # 重载
- systemctl daemon-reload
-
- # echo "[x] Delete the original MCSManager"
- rm -irf ${mcsmanager_install_path}
+ if [[ -z "$installed_ver" ]]; then
+ return 1
+ fi
- # echo "[+] mkdir -p ${mcsmanager_install_path}"
- mkdir -p ${mcsmanager_install_path} || exit
+ if [ "$strict_node_version_check" = true ]; then
+ if [[ "$installed_ver" != "$required_node_ver" ]]; then
+ return 3
+ fi
+ else
+ local cmp
+ cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1)
+ if [[ "$cmp" != "$required_node_ver" ]]; then
+ return 2
+ fi
+ fi
- # echo "[→] cd ${mcsmanager_install_path}"
- cd ${mcsmanager_install_path} || exit
+ # Check if npm exists and works using node (not $PATH/npm)
+ if [ ! -x "$npm_bin_path" ]; then
+ return 4
+ fi
- if [ "$zh" == 1 ];
- then echo_cyan "[↓] Git 克隆 MCSManager-Daemon..."
- else echo_cyan "[↓] Git clone MCSManager-Daemon..."
+ # Use node to run npm.js directly, in case env is broken
+ local npm_version
+ npm_version="$("$node_bin_path" "$npm_bin_path" --version 2>/dev/null)"
+ if [[ -z "$npm_version" ]]; then
+ return 4
fi
- git clone --single-branch -b master --depth 1 https://gitee.com/mcsmanager/MCSManager-Daemon-Production.git
- # echo "[-] mv MCSManager-Daemon-Production daemon"
- mv MCSManager-Daemon-Production daemon
+ return 0
+}
+
- # echo "[→] cd daemon"
- cd daemon || exit
+# Node.js pre-check. check if we need to install Node.js before installer run.
+# Use postcheck_node_after_install() to check after install.
+check_node_installed() {
+ verify_node_at_path "$node_path"
+ local result=$?
- if [ "$zh" == 1 ];
- then echo_cyan "[+] 安装 MCSManager-Daemon 依赖库..."
- else echo_cyan "[+] Install MCSManager-Daemon dependencies..."
+ case $result in
+ 0)
+ cprint green bold "Node.js and npm found at $node_path (version $required_node_ver or compatible)"
+ install_node=false
+ ;;
+ 1)
+ cprint yellow bold "Node.js binary not found or unusable at $node_path"
+ install_node=true
+ ;;
+ 2)
+ cprint red bold "Node.js version at $node_path is too old. Required: >= $required_node_ver"
+ install_node=true
+ ;;
+ 3)
+ cprint red bold "Node.js version mismatch. Required: $required_node_ver, found something else."
+ install_node=true
+ ;;
+ 4)
+ cprint red bold "Node.js is present but npm is missing or broken."
+ install_node=true
+ ;;
+ *)
+ cprint red bold "Unexpected error in node verification."
+ install_node=true
+ ;;
+ esac
+}
+
+# Node.js post-check. check if Node.js is valid after install.
+postcheck_node_after_install() {
+ verify_node_at_path "$node_path"
+ if [[ $? -ne 0 ]]; then
+ cprint red bold "Node.js installation failed or is invalid at $node_path"
+ return 1
+ else
+ cprint green bold "Node.js is installed and functioning at $node_path"
+ return 0
fi
- /usr/bin/env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com > error
+}
- # echo "[←] cd .."
- cd ..
+# Install Node.js and check
+install_node() {
+ local archive_name="node-${node_version}-linux-${node_arch}.tar.xz"
+ local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}"
+ local archive_path="${node_install_dir}/${archive_name}"
+ local download_url="${node_download_url_base}${node_version}/${archive_name}"
+ local fallback="$node_download_fallback"
- if [ "$zh" == 1 ];
- then echo_cyan "[↓] Git 克隆 MCSManager-Web..."
- else echo_cyan "[↓] Git clone MCSManager-Web..."
+ cprint cyan bold "Installing Node.js $node_version for arch: $node_arch"
+
+ mkdir -p "$node_install_dir" || {
+ cprint red bold "Failed to create node install directory: $node_install_dir"
+ return 1
+ }
+
+ # Download
+ cprint cyan "Downloading Node.js from: $download_url"
+ if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then
+ cprint yellow "Primary download failed. Attempting fallback..."
+
+ if [[ -n "$fallback" ]]; then
+ if [[ "$fallback" =~ ^https?:// ]]; then
+ cprint cyan "Downloading from fallback URL: $fallback"
+ if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then
+ cprint red bold "Fallback download failed from: $fallback"
+ return 1
+ fi
+ elif [ -f "$fallback" ]; then
+ cprint cyan "Copying from local fallback: $fallback"
+ cp "$fallback" "$archive_path" || {
+ cprint red bold "Failed to copy fallback Node.js archive from $fallback"
+ return 1
+ }
+ else
+ cprint red bold "Invalid fallback path: $fallback"
+ return 1
+ fi
+ else
+ cprint red bold "No fallback source configured. Cannot proceed."
+ return 1
+ fi
fi
- git clone --single-branch -b master --depth 1 https://gitee.com/mcsmanager/MCSManager-Web-Production.git
- # echo "[-] mv MCSManager-Web-Production web"
- mv MCSManager-Web-Production web
+ # Extract archive
+ cprint cyan "Extracting Node.js archive..."
+ if ! tar -xf "$archive_path" -C "$node_install_dir"; then
+ cprint red bold "Failed to extract Node.js archive."
+ return 1
+ fi
- # echo "[→] cd web"
- cd web || exit
+ chmod -R a+rx "$target_dir" || {
+ cprint red bold "Failed to set execute permissions on Node.js files."
+ return 1
+ }
- if [ "$zh" == 1 ];
- then echo_cyan "[+] 安装 MCSManager-Web 依赖库..."
- else echo_cyan "[+] Install MCSManager-Web dependencies..."
+ verify_node_at_path "$target_dir"
+ local result=$?
+ if [[ $result -ne 0 ]]; then
+ cprint red bold "Node.js installation failed verification."
+ return 1
fi
- /usr/bin/env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com > error
- echo
- echo_yellow "=============== MCSManager ==============="
- echo_green " Daemon: ${mcsmanager_install_path}/daemon"
- echo_green " Web: ${mcsmanager_install_path}/web"
- echo_yellow "=============== MCSManager ==============="
- echo
- if [ "$zh" == 1 ];
- then echo_green "[+] MCSManager 安装成功!"
- else echo_green "[+] MCSManager installation success!"
+ cprint cyan "Cleaning up archive..."
+ rm -f "$archive_path"
+
+ cprint green bold "Node.js $node_version installed successfully at $target_dir"
+ # Save resolved binary paths to global variables
+ node_bin_path="${target_dir}/bin/node"
+ npm_bin_path="${target_dir}/bin/npm"
+
+ cprint green "Node.js binary: $node_bin_path"
+ cprint green "npm binary: $npm_bin_path"
+ return 0
+}
+
+# Function to download MCSM package. fetch from primary URL first, then fallback URL.
+# This function only put extracted file(s) into install_dir, it does not perform the actual update.
+download_mcsm() {
+ local archive_name="$package_name"
+ local archive_path="${tmp_dir}/${archive_name}"
+ local primary_url="${download_base_url}${archive_name}"
+ local fallback="$download_fallback_url"
+
+ cprint cyan bold "Downloading MCSManager package..."
+
+ # Step 1: Try downloading from primary URL
+ if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then
+ cprint yellow "Primary download failed. Attempting fallback source..."
+
+ if [[ -z "$fallback" ]]; then
+ cprint red bold "No fallback URL or path specified."
+ return 1
+ fi
+
+ if [[ "$fallback" =~ ^https?:// ]]; then
+ if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then
+ cprint red bold "Fallback download failed from $fallback"
+ return 1
+ fi
+ elif [[ -f "$fallback" ]]; then
+ cp "$fallback" "$archive_path" || {
+ cprint red bold "Failed to copy fallback archive from $fallback"
+ return 1
+ }
+ else
+ cprint red bold "Fallback path is invalid: $fallback"
+ return 1
+ fi
fi
- sleep 3
+ # Step 2: Generate extract directory
+ local suffix
+ suffix=$(tr -dc 'a-z0-9' /dev/null; then
+ cprint green "User '$install_user' already exists."
+ else
+ cprint cyan "Creating system user: $install_user (nologin, no password)..."
+ if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then
+ cprint red bold "Failed to create user: $install_user"
+ exit 1
+ fi
+ cprint green "User '$install_user' created."
+ fi
+
-[Service]
-WorkingDirectory=/opt/mcsmanager/daemon
-ExecStart=${node_install_path}/bin/node app.js
-ExecReload=/bin/kill -s HUP $MAINPID
-ExecStop=/bin/kill -s QUIT $MAINPID
-Environment=\"PATH=${PATH}\"
+ # Docker integration
+ if command -v docker &>/dev/null; then
+ cprint cyan "Docker is installed — checking group assignment..."
-[Install]
-WantedBy=multi-user.target
-" > /etc/systemd/system/mcsm-daemon.service
+ if getent group docker &>/dev/null; then
+ if id -nG "$install_user" | grep -qw docker; then
+ cprint green "User '$install_user' is already in the 'docker' group."
+ else
+ cprint cyan "Adding user '$install_user' to 'docker' group..."
+ if usermod -aG docker "$install_user"; then
+ cprint green "Docker group access granted to '$install_user'."
+ else
+ cprint red "Failed to add '$install_user' to 'docker' group. Docker may not be usable by this user."
+ fi
+ fi
+ else
+ cprint red "Docker installed but 'docker' group not found. Skipping group assignment."
+ fi
+ else
+ cprint yellow "Docker not installed — skipping Docker group configuration."
+ fi
+
+ return 0
+}
+# Function to stop MCSM services if they exist
+stop_mcsm_services() {
+ cprint yellow bold "Attempting to stop mcsm-web and mcsm-daemon services..."
+
+ # Attempt to stop mcsm-web
+ cprint blue "Stopping mcsm-web..."
+ if systemctl stop mcsm-web; then
+ cprint green "mcsm-web stopped successfully."
+ else
+ cprint red bold "Warning: Failed to stop mcsm-web (may not exist or already stopped)."
+ fi
+
+ # Attempt to stop mcsm-daemon
+ cprint blue "Stopping mcsm-daemon..."
+ if systemctl stop mcsm-daemon; then
+ cprint green "mcsm-daemon stopped successfully."
+ else
+ cprint red bold "Warning: Failed to stop mcsm-daemon (may not exist or already stopped)."
+ fi
+}
+# Prepare file & permissions before install.
+mcsm_install_prepare() {
+
+ # Stop service if existed
+ stop_mcsm_services
+
+ if [[ ! -d "$install_tmp_dir" ]]; then
+ cprint red bold "install_tmp_dir does not exist: $install_tmp_dir"
+ exit 1
+ fi
+
+ cprint cyan "Changing ownership of $install_tmp_dir to user '$install_user'..."
+ chown -R "$install_user":"$install_user" "$install_tmp_dir" || {
+ cprint red bold "Failed to change ownership of $install_tmp_dir"
+ cleanup_install_tmp
+ exit 1
+ }
+
+ # Normalize install_dir to ensure it ends with a slash
+ [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/"
+
+ if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then
+ cprint cyan "No existing components detected — skipping data backup/cleanup."
+ return 0
+ fi
+
+ cprint green bold "Existing components prepared successfully."
+ return 0
+}
+
+# Install or update a component
+install_component() {
+ local component="$1"
+ local target_path="${install_dir}${component}"
+ local backup_data_path="${install_dir}${backup_prefix}${component}"
+ local source_path="${install_tmp_dir}/mcsmanager/${component}"
+
+ cprint cyan bold "Installing/Updating component: $component"
+
+ # Step 1: Move new component to install_dir
+ if [[ ! -d "$source_path" ]]; then
+ cprint red bold "Source directory not found: $source_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ cprint cyan "Removing node_modules folder: $target_path/node_modules/"
+ if [[ -d "$target_path/node_modules/" ]]; then
+ rm -rf "$target_path/node_modules/"
+ fi
+
+ if cp -a "$source_path"/. "$target_path"; then
+ cprint green "Updated files from $source_path → $target_path"
+ rm -rf "$source_path"
+ else
+ cprint red bold "Failed to update files from $source_path → $target_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+ cprint green "Moved $component to $target_path"
+
+
+ # Step 3: Install NPM dependencies
+ if [[ ! -x "$npm_bin_path" ]]; then
+ cprint red bold "npm binary not found or not executable: $npm_bin_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ cprint cyan "Installing dependencies for $component using npm..."
+ pushd "$target_path" >/dev/null || {
+ cprint red bold "Failed to change directory to $target_path"
+ cleanup_install_tmp
+ exit 1
+ }
- echo "
+ if ! "$node_bin_path" "$npm_bin_path" install --no-audit --no-fund --loglevel=warn; then
+ cprint red bold "NPM dependency installation failed for $component"
+ popd >/dev/null
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ popd >/dev/null
+ cprint green bold "Component '$component' installed/updated successfully."
+}
+
+# Create systemd service for a given component.
+# This will overwrite the existing service file.
+create_systemd_service() {
+ local component="$1"
+ local service_path="${systemd_file}${component}.service"
+ local working_dir="${install_dir}${component}"
+ local exec="${node_bin_path} app.js"
+
+ if [[ ! -d "$working_dir" ]]; then
+ cprint red bold "Component directory not found: $working_dir"
+ cleanup_install_tmp
+ return 1
+ fi
+
+ cprint cyan "Creating systemd service for '$component'..."
+
+ cat > "$service_path" < /etc/systemd/system/mcsm-web.service
-
- # 重载
- systemctl daemon-reload
-
- # 创建 Daemon 服务
- systemctl enable mcsm-daemon.service --now
-
- # 创建 Web 服务
- systemctl enable mcsm-web.service --now
-
- sleep 3
-
- printf "\033c"
- echo_yellow "=================================================================="
- if [ "$zh" == 1 ];
- then
- echo_green "欢迎使用 MCSManager,您可以通过以下方式访问:"
- echo_yellow "=================================================================="
- echo_cyan_n "控制面板地址: "; echo_yellow "http://localhost:23333"
- echo_red "若无法访问面板,请检查防火墙/安全组是否有放行面板 23333 和 24444 端口,控制面板需要这两个端口才能正常工作。"
- echo_yellow "=================================================================="
- echo_cyan "重启 systemctl restart mcsm-{daemon,web}.service"
- echo_cyan "禁用 systemctl disable mcsm-{daemon,web}.service"
- echo_cyan "启用 systemctl enable mcsm-{daemon,web}.service"
- echo_cyan "启动 systemctl start mcsm-{daemon,web}.service"
- echo_cyan "停止 systemctl stop mcsm-{daemon,web}.service"
- echo_cyan "更多使用说明,请参考:https://docs.mcsmanager.com/"
- else
- echo_green "Welcome to MCSManager, you can access it by the following ways:"
- echo_yellow "=================================================================="
- echo_cyan_n "Web Service Address: "; echo_yellow "http://localhost:23333"
- echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- echo_yellow "=================================================================="
- echo_cyan "systemctl restart mcsm-{daemon,web}.service"
- echo_cyan "systemctl disable mcsm-{daemon,web}.service"
- echo_cyan "systemctl enable mcsm-{daemon,web}.service"
- echo_cyan "systemctl start mcsm-{daemon,web}.service"
- echo_cyan "systemctl stop mcsm-{daemon,web}.service"
- echo_cyan "More info: https://docs.mcsmanager.com/"
- fi
- echo_yellow "=================================================================="
+EOF
-
+ if [[ $? -ne 0 ]]; then
+ cprint red bold "Failed to write service file: $service_path"
+ cleanup_install_tmp
+ return 1
+ fi
+ chmod 644 "$service_path"
+ cprint green "Created systemd unit: $service_path"
+ return 0
}
+# Extract daemon key and/or http port
+extract_component_info() {
+ # DAEMON SECTION
+ if [[ "$install_daemon" == true ]]; then
+ local daemon_service="mcsm-daemon.service"
+ local daemon_path="${install_dir}/daemon"
+ local daemon_config_path="${daemon_path}/${daemon_key_config_subpath}"
+
+ cprint cyan bold "Starting daemon service..."
+ if systemctl restart "$daemon_service"; then
+ cprint green "Daemon service started."
+
+ sleep 3 # Allow service to init and write configs
-# ----------------- 程序启动 -----------------
-
-# 删除 Shell 脚本自身
-rm -f "$0"
-
-# 检查执行用户权限
-if [ "$(whoami)" != "root" ]; then
- if [ "$zh" == 1 ];
- then Red_Error "[x] 请使用 root 权限执行 MCSManager 安装命令!"
- else Red_Error "[x] Please execute the MCSManager installation command with root permission!"
- fi
-fi
-
-echo_cyan "+----------------------------------------------------------------------
-| MCSManager Installer
-+----------------------------------------------------------------------
-| Copyright © 2022 MCSManager All rights reserved.
-+----------------------------------------------------------------------
-| Shell Install Script by Nuomiaa & CreeperKong
-+----------------------------------------------------------------------
-"
-
-# 环境检查
-if [ "$arch" == x86_64 ]; then
- arch=x64
- #echo "[-] x64 architecture detected"
-elif [ $arch == aarch64 ]; then
- arch=arm64
- #echo "[-] 64-bit ARM architecture detected"
-elif [ $arch == arm ]; then
- arch=armv7l
- #echo "[-] 32-bit ARM architecture detected"
-elif [ $arch == ppc64le ]; then
- arch=ppc64le
- #echo "[-] IBM POWER architecture detected"
-elif [ $arch == s390x ]; then
- arch=s390x
- #echo "[-] IBM LinuxONE architecture detected"
-else
- if [ "$zh" == 1 ];
- then Red_Error "[x] 抱歉,暂不支持您的 体系架构($arch)!"
- else Red_Error "[x] Sorry, this architecture is not supported yet!"
- fi
- exit
-fi
-
-# 定义变量 Node 安装目录
-node_install_path="/opt/node-$node-linux-$arch"
-
-# 检查网络连接
-if [ "$zh" == 1 ];
- then
- echo_cyan "[-] 体系架构:$arch"
+ if [[ -f "$daemon_config_path" ]]; then
+ daemon_key=$(grep -oP '"key"\s*:\s*"\K[^"]+' "$daemon_config_path")
+ daemon_port=$(grep -oP '"port"\s*:\s*\K[0-9]+' "$daemon_config_path")
+
+ if [[ -n "$daemon_key" ]]; then
+ cprint green "Extracted daemon key: $daemon_key"
+ else
+ cprint red "Failed to extract daemon key from: $daemon_config_path"
+ fi
+
+ if [[ -n "$daemon_port" ]]; then
+ cprint green "Extracted daemon port: $daemon_port"
+ else
+ cprint red "Failed to extract daemon port from: $daemon_config_path"
+ fi
else
- echo_cyan "[-] Architecture: $arch"
-fi
-
-# MCSManager 已安装
-if [ -d "$mcsmanager_install_path" ]; then
- printf "\033c"
- if [ "$zh" == 1 ];
- then echo_red "----------------------------------------------------
-检查到已有 MCSManager 安装在 \"$mcsmanager_install_path\"
-继续安装会删除原有 MCSManager 面版的所有数据!
-----------------------------------------------------
-将在 10 秒后继续安装,取消请按 Ctrl + Z/C 键!"
- else echo_red "----------------------------------------------------
-MCSManager is installed at \"$mcsmanager_install_path\"
-Continuing the installation will delete the original MCSManager!
-----------------------------------------------------
-Installation will continue in 10 seconds, press Ctrl + Z/C to cancel!"
- fi
- sleep 10
-fi
-
-# 安装相关软件
-if [ "$zh" == 1 ];
- then echo_cyan_n "[-] 安装相关软件(git,tar)... "
- else echo_cyan_n "[+] Installing dependent software(git,tar)... "
-fi
-if [ -x "$(command -v yum)" ]; then yum install -y git tar > error;
-elif [ -x "$(command -v apt-get)" ]; then apt-get install -y git tar > error;
-elif [ -x "$(command -v pacman)" ]; then pacman -Syu --noconfirm git tar > error;
-elif [ -x "$(command -v zypper)" ]; then zypper --non-interactive install git tar > error;
-fi
-
-# 判断相关软件是否安装成功
-if [[ -x "$(command -v git)" && -x "$(command -v tar)" ]]
- then
- if [ "$zh" == 1 ];
- then echo_green "成功"
- else echo_green "Success"
+ cprint red "Daemon config file not found: $daemon_config_path"
+ fi
+ else
+ cprint red bold "Failed to start daemon service: $daemon_service"
fi
- else
- if [ "$zh" == 1 ];
- then echo_red "失败"
- else echo_red "Failed"
+ fi
+
+ # WEB SECTION
+ if [[ "$install_web" == true ]]; then
+ local web_service="mcsm-web.service"
+ local web_path="${install_dir}/web"
+ local web_config_path="${web_path}/${web_port_config_subpath}"
+
+ cprint cyan bold "Starting web service..."
+ if systemctl restart "$web_service"; then
+ cprint green "Web service started."
+
+ sleep 3 # Allow time to populate config
+
+ if [[ -f "$web_config_path" ]]; then
+ web_port=$(grep -oP '"httpPort"\s*:\s*\K[0-9]+' "$web_config_path")
+ if [[ -n "$web_port" ]]; then
+ cprint green "Extracted web port: $web_port"
+ else
+ cprint red "Failed to extract web port from: $web_config_path"
+ fi
+ else
+ cprint red "Web config file not found: $web_config_path"
+ fi
+ else
+ cprint red bold "Failed to start web service: $web_service"
fi
- echo "$error"
- if [ "$zh" == 1 ];
- then Red_Error "[x] 相关软件安装失败,请手动安装 git 和 tar 软件包!"
- else Red_Error "[x] Related software installation failed, please install git and tar packages manually!"
+ fi
+}
+
+cleanup_install_tmp() {
+ if [[ -n "$install_tmp_dir" && -d "$install_tmp_dir" ]]; then
+ if rm -rf "$install_tmp_dir"; then
+ cprint green "Cleaned up temporary install folder: $install_tmp_dir"
+ else
+ cprint red "Failed to remove temporary folder: $install_tmp_dir"
fi
- exit
-fi
+ fi
+}
+
+print_install_result() {
+ # Clear the screen
+ clear || true
+
+ # Print ASCII banner
+ cprint white noprefix "______ _______________________ ___"
+ cprint white noprefix "___ |/ /_ ____/_ ___/__ |/ /_____ _____________ _______ _____________"
+ cprint white noprefix "__ /|_/ /_ / _____ \__ /|_/ /_ __ \`/_ __ \ __ \`/_ __ \`/ _ \_ ___/"
+ cprint white noprefix "_ / / / / /___ ____/ /_ / / / / /_/ /_ / / / /_/ /_ /_/ // __/ /"
+ cprint white noprefix "/_/ /_/ \____/ /____/ /_/ /_/ \__,_/ /_/ /_/\__,_/ _\__, / \___//_/"
+ echo ""
+ # status summary
+ cprint yellow noprefix "Installed/Updated Component(s):"
+ if [[ "$install_daemon" == true && -n "$daemon_key" && -n "$daemon_port" ]]; then
+ cprint white noprefix "Daemon"
+ elif [[ "$install_daemon" == true ]]; then
+ cprint white noprefix nonl "Daemon "
+ cprint yellow noprefix "(partial, config not fully detected)"
+ fi
+
+ if [[ "$install_web" == true && -n "$web_port" ]]; then
+ cprint white noprefix "Web"
+ elif [[ "$install_web" == true ]]; then
+ cprint white noprefix nonl "Web "
+ cprint yellow noprefix "(partial, config not fully detected)"
+ fi
+
+ echo ""
+
+ # Local IP detection
+ local ip_address
+ ip_address=$(hostname -I 2>/dev/null | awk '{print $1}')
+ [[ -z "$ip_address" ]] && ip_address="YOUR-IP"
+ # Daemon info
+ if [[ "$install_daemon" == true ]]; then
+ local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}"
+ local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}"
-# 安装 Node 环境
-Install_Node
+ cprint yellow noprefix "Daemon Address:"
+ cprint white noprefix " $daemon_address"
+ cprint yellow noprefix "Daemon Key:"
+ cprint white noprefix " $daemon_key_display"
+ echo ""
+ fi
+
+ # Web info
+ if [[ "$install_web" == true ]]; then
+ local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}"
+ cprint yellow noprefix "HTTP Web Interface:"
+ cprint white noprefix nonl " $web_address "
+ cprint yellow noprefix "(open in browser)"
+ echo ""
+ fi
+
+ # Port guidance
+ cprint yellow noprefix "NOTE:"
+ cprint white noprefix " Make sure to expose the above ports through your firewall."
+ cprint white noprefix " If accessing from outside your network, you may need to configure port forwarding on your router."
+ echo ""
+
+ # Service management help
+ cprint yellow noprefix "Service Management Commands:"
+ if [[ "$install_daemon" == true ]]; then
+ cprint white noprefix nonl " systemctl start "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl stop "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl restart "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl status "
+ cprint yellow noprefix "mcsm-daemon.service"
+ fi
+ if [[ "$install_web" == true ]]; then
+ cprint white noprefix nonl " systemctl start "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl stop "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl restart "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl status "
+ cprint yellow noprefix "mcsm-web.service"
+ fi
+ echo ""
+
+ # Official doc
+ cprint yellow noprefix "Official Documentation:"
+ cprint white noprefix " https://docs.mcsmanager.com/"
+ echo ""
+
+ # HTTPS support
+ cprint yellow noprefix "Need HTTPS?"
+ cprint white noprefix " To enable secure HTTPS access, configure a reverse proxy:"
+ cprint white noprefix " https://docs.mcsmanager.com/ops/proxy_https.html"
+ echo ""
+
+ if [[ "$force_permission" == true ]]; then
+ cprint red noprefix "[Important] You chose to override permission during install."
+ cprint red noprefix " You may need to run: chown -R $install_user to update permission manually."
+ fi
+
+ # Closing message
+ cprint green noprefix "Installation completed. Enjoy managing your servers with MCSManager!"
+ echo ""
+}
+
+install_mcsm() {
+ local components=()
+
+ if [[ "$install_web" == true ]]; then
+ install_component "web"
+ create_systemd_service "web"
+ components+=("web")
+ fi
+
+ if [[ "$install_daemon" == true ]]; then
+ install_component "daemon"
+ create_systemd_service "daemon"
+ components+=("daemon")
+ fi
+
+ # Reload systemd after any service file changes
+ if (( ${#components[@]} > 0 )); then
+ cprint cyan "Reloading systemd daemon..."
+ # systemctl daemon-reexec
+ systemctl daemon-reload
+
+ for comp in "${components[@]}"; do
+ local svc="mcsm-${comp}.service"
+
+ cprint cyan "Enabling service: $svc"
+ if systemctl enable "$svc" &>/dev/null; then
+ cprint green "Enabled service: $svc"
+ else
+ cprint red bold "Failed to enable service: $svc"
+ cleanup_install_tmp
+ exit 1
+ fi
+ done
+ fi
+
+ # Clean tmp dir
+ cleanup_install_tmp
+ # Extract installed component info
+ safe_run extract_component_info "Failed to extract runtime info from installed services"
+ safe_run print_install_result "Failed to print installation result"
+
+}
-# 安装 MCSManager
-Install_MCSManager
+main() {
+ trap 'echo "Unexpected error occurred."; exit 99' ERR
+ safe_run detect_terminal_capabilities "Failed to detect terminal capabilities"
+ safe_run check_root "Script must be run as root"
+ safe_run parse_args "Failed to parse arguments" "$@"
+ safe_run detect_os_info "Failed to detect OS"
+ safe_run version_specific_rules "Failed to apply distro/version specific rules"
-# 创建 MCSManager 后台服务
-Create_Service
+ # To be moved to a master pre check function.
+ safe_run resolve_node_arch "Failed to resolve Node.js architecture"
+
+ safe_run check_required_commands "Missing required system commands"
+
+ safe_run check_node_installed "Failed to detect Node.js or npm at expected path. Node.js will be installed."
+ if [ "$install_node" = true ]; then
+ safe_run install_node "Node.js installation failed"
+ fi
+
+ safe_run permission_barrier "Permission validation failed — aborting install"
+
+ safe_run prepare_user "Failed to prepare user permission."
+
+ safe_run download_mcsm "Failed to acquire MCSManager source"
+ safe_run mcsm_install_prepare "Error while preparing for installation"
+
+ safe_run install_mcsm "Failed to install MCSManager"
+}
+main "$@"
\ No newline at end of file
diff --git a/setup_cn.sh b/setup_cn.sh
new file mode 100644
index 0000000..7450d9b
--- /dev/null
+++ b/setup_cn.sh
@@ -0,0 +1,1384 @@
+#!/bin/bash
+# MCSManager官方安装脚本.
+# 这个脚本将会把MCSManager服务端和节点服务端更新/安装至最新发布版本.
+# ------------------------------------------------------------------------------
+# 受支持的Linux:
+# 此脚本支持以下Linux发行版:
+# - Ubuntu: 18.04, 20.04, 22.04, 24.04
+# - Debian: 10, 11, 12, 13
+# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream
+# - RHEL: 7, 8, 9, 10
+# - Arch Linux: Support planned (TBD)
+# ------------------------------------------------------------------------------
+
+# Target installation directory (can be overridden with --install-dir)
+install_dir="/opt/mcsmanager"
+
+# Primary download URL bas. Full package URL = download_base_url + package_name
+download_base_url="https://cdn.imlazy.ink:233/files/"
+
+# Fallback download URL (can also be a local directory or mirror)
+download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz"
+
+# Name of the release package to download/detect
+package_name="mcsmanager_linux_release.tar.gz"
+
+# Node.js version to be installed
+# Keep the leading "v"
+node_version="v20.12.2"
+node_version_centos7="v16.20.2"
+
+# Node download base URL - primary
+node_download_url_base="https://nodejs.org/dist/"
+
+# Unoffical build of Node.js, for more ISA support
+node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/"
+
+# Node download URL - fallback.
+# This is the URL points directly to the file, not the base. This can also be a local absolute path.
+# Only supports https:// or http:// for web locations.
+node_download_fallback=""
+
+# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir)
+node_install_dir="$install_dir"
+
+# Temp dir for file extraction
+tmp_dir="/tmp"
+
+# Bypass installed user permission check, override by --force-permission
+force_permission=false
+
+
+# --------------- Global Variables ---------------#
+# DO NOT MODIFY #
+
+
+# Component installation options.
+# For fresh installs, both daemon and web components are installed by default.
+# For updates, behavior depends on detected existing components.
+# Can be overridden with --install daemon/web/all
+install_daemon=true
+install_web=true
+
+# Install MCSM as (default: root).
+# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm
+# To ensure compatibility, only user mcsm is supported.
+install_user="root"
+# Installed user, for permission check
+web_installed=false
+daemon_installed=false
+web_installed_user=""
+daemon_installed_user=""
+
+# Service file locations
+# the final dir = systemd_file + {web/daemon} + ".service"
+systemd_file="/etc/systemd/system/mcsm-"
+# Optional: Override the default installation source file.
+# If --install-source is specified, the installer will use the provided
+# "mcsmanager_linux_release.tar.gz" file instead of downloading it.
+# Only support local absolute path.
+install_source_path=""
+
+# temp path for extracted file(s)
+install_tmp_dir="/opt/mcsmanager/mcsm_abcd"
+
+# dir name for data dir backup
+# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data
+# only valid for when during an update
+backup_prefix="data_bak_"
+
+# System architecture (detected automatically)
+arch=""
+version=""
+distro=""
+
+
+
+# Supported OS versions (map-style structure)
+# Format: supported_os["distro_name"]="version1 version2 version3 ..."
+declare -A supported_os
+supported_os["Ubuntu"]="18 20 22 24"
+supported_os["Debian"]="10 11 12 13"
+supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream"
+supported_os["RHEL"]="7 8 9 10"
+supported_os["Arch"]="rolling"
+
+# Required system commands for installation
+# These will be checked before logic process
+required_commands=(
+ chmod
+ chown
+ wget
+ tar
+ stat
+ useradd
+ usermod
+ date
+)
+
+# Node.js related sections
+# Enable strict version checking (exact match)
+# enabled -> strict requriement for defined node version
+# false -> newer version allowed
+# Older version is NEVER allowed
+strict_node_version_check=true
+
+# Will be set based on actual node status
+install_node=true
+# Remove leading "v" from defined version
+required_node_ver="${node_version#v}"
+
+# Holds absolute path for node & npm
+node_bin_path=""
+npm_bin_path=""
+# Hold Node.js arch name, e.g. x86_64 -> x64
+node_arch=""
+# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch}
+node_path=""
+
+# For installation result
+daemon_key=""
+daemon_port=""
+web_port=""
+daemon_key_config_subpath="data/Config/global.json"
+web_port_config_subpath="data/SystemConfig/config.json"
+
+# Terminal color & style related
+# Default to false, auto check later
+SUPPORTS_COLOR=false
+SUPPORTS_STYLE=false
+# Declare ANSI reset
+RESET="\033[0m"
+
+# Foreground colors
+declare -A FG_COLORS=(
+ [black]="\033[0;30m"
+ [red]="\033[0;31m"
+ [green]="\033[0;32m"
+ [yellow]="\033[0;33m"
+ [blue]="\033[0;34m"
+ [magenta]="\033[0;35m"
+ [cyan]="\033[0;36m"
+ [white]="\033[0;37m"
+)
+
+# Font styles
+declare -A STYLES=(
+ [bold]="\033[1m"
+ [underline]="\033[4m"
+ [italic]="\033[3m" # Often ignored
+ [clear_line]="\r\033[2K"
+ [strikethrough]="\033[9m"
+)
+
+
+### Helper Functions
+# Execution wrapper, avoid unexpected crashes.
+safe_run() {
+ local func="$1"
+ local err_msg="$2"
+ shift 2
+
+ if ! "$func" "$@"; then
+ echo "Error: $err_msg"
+ exit 1
+ fi
+}
+
+# Function to ensure the script is run as root
+check_root() {
+ # Using Bash's built-in EUID variable
+ if [ -n "$EUID" ]; then
+ if [ "$EUID" -ne 0 ]; then
+ cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo."
+ exit 1
+ fi
+ else
+ # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment)
+ if [ "$(id -u)" -ne 0 ]; then
+ cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo."
+ exit 1
+ fi
+ fi
+}
+
+# Function to check whether current terminal support color & style
+detect_terminal_capabilities() {
+ SUPPORTS_COLOR=false
+ SUPPORTS_STYLE=false
+
+ if [ -t 1 ] && command -v tput >/dev/null 2>&1; then
+ if [ "$(tput colors)" -ge 8 ]; then
+ SUPPORTS_COLOR=true
+ fi
+ if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then
+ SUPPORTS_STYLE=true
+ fi
+ fi
+
+ if [ "$SUPPORTS_COLOR" = true ]; then
+ cprint green "[OK] 这个终端支持彩色输出."
+ else
+ cprint yellow "注:终端不支持彩色输出。不格式化继续."
+ fi
+
+ if [ "$SUPPORTS_STYLE" = true ]; then
+ cprint green "[OK] 终端支持粗体和下划线格式."
+ else
+ cprint yellow "注意:终端不支持高级文本样式."
+ fi
+}
+
+# Check whether daemon or web is installed
+is_component_installed() {
+ local component_name="$1"
+ local component_path="${install_dir}/${component_name}"
+
+ if [[ -d "$component_path" ]]; then
+ cprint green "组件 '$component_name' 已经被安装在 $component_path"
+
+ # Set corresponding global variable
+ if [[ "$component_name" == "daemon" ]]; then
+ daemon_installed=true
+ elif [[ "$component_name" == "web" ]]; then
+ web_installed=true
+ fi
+
+ return 0
+ else
+ cprint yellow "组件 '$component_name' 未被安装"
+
+ # Set corresponding global variable
+ if [[ "$component_name" == "daemon" ]]; then
+ daemon_installed=false
+ elif [[ "$component_name" == "web" ]]; then
+ web_installed=false
+ fi
+
+ return 1
+ fi
+}
+
+check_component_permission() {
+ local component="$1"
+ local service_file="${systemd_file}${component}.service"
+
+ if [[ ! -f "$service_file" ]]; then
+ cprint yellow "找不到服务文件: $service_file"
+ return 0 # nothing changed
+ fi
+
+ # Extract the User= line if it exists
+ local user_line
+ user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1)
+
+ local user
+ if [[ -z "$user_line" ]]; then
+ user="root" # default if no User= is defined
+ else
+ user="${user_line#User=}"
+ fi
+
+ # Validate user
+ if [[ "$user" != "root" && "$user" != "mcsm" ]]; then
+ cprint red bold "不支持的用户 '$user' 在 $service_file. 使用 'root' 或 'mcsm'."
+ exit 1
+ fi
+
+ # Assign to appropriate global
+ if [[ "$component" == "web" ]]; then
+ web_installed_user="$user"
+ elif [[ "$component" == "daemon" ]]; then
+ daemon_installed_user="$user"
+ fi
+
+ cprint cyan "已删除 $component 以用户身份安装: $user"
+ return 0
+}
+
+
+
+parse_args() {
+ local explicit_install_flag=false
+
+ while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --install-dir)
+ if [[ -n "$2" ]]; then
+ install_dir="$2"
+ shift 2
+ else
+ echo "错误:--install-dir需要一个路径参数."
+ exit 1
+ fi
+ ;;
+ --node-install-dir)
+ if [[ -n "$2" ]]; then
+ node_install_dir="$2"
+ shift 2
+ else
+ echo "错误:--node-install-dir需要一个路径参数."
+ exit 1
+ fi
+ ;;
+ --install)
+ explicit_install_flag=true
+ if [[ -n "$2" && "$2" != --* ]]; then
+ case "$2" in
+ daemon)
+ install_daemon=true
+ is_component_installed "daemon"
+ install_web=false
+ check_component_permission "daemon"
+ ;;
+ web)
+ install_daemon=false
+ is_component_installed "web"
+ install_web=true
+ check_component_permission "web"
+ ;;
+ all)
+ install_daemon=true
+ install_web=true
+ is_component_installed "daemon"
+ is_component_installed "web"
+ check_component_permission "daemon"
+ check_component_permission "web"
+ ;;
+ *)
+ echo "错误:--install的值无效。期望‘daemon’, ‘web’或‘all’."
+ echo "Usage: --install daemon|web|all"
+ exit 1
+ ;;
+ esac
+ shift 2
+ else
+ echo "错误:提供了--install标志,但没有值。请指定:daemon、web或all."
+ echo "使用方法: --install daemon|web|all"
+ exit 1
+ fi
+ ;;
+ --user)
+ if [[ -n "$2" ]]; then
+ case "$2" in
+ root)
+ install_user="root"
+ ;;
+ mcsm)
+ install_user="mcsm"
+ ;;
+ *)
+ echo "错误:无效用户 '$2'. 只有 'root' 和 'mcsm' 受支持."
+ echo "使用方法: --user root|mcsm"
+ exit 1
+ ;;
+ esac
+ shift 2
+ else
+ echo "错误:--user需要一个值 (root 或 mcsm)."
+ exit 1
+ fi
+ ;;
+ --install-source)
+ if [[ -n "$2" ]]; then
+ install_source_path="$2"
+ shift 2
+ else
+ echo "错误:--install-source需要文件路径."
+ exit 1
+ fi
+ ;;
+ --force-permission)
+ force_permission=true
+ shift
+ ;;
+ *)
+ echo "错误:未知参数t: $1"
+ exit 1
+ ;;
+ esac
+ done
+
+ # Auto-detect branch: only run if --install was not explicitly passed
+ if [[ "$explicit_install_flag" == false ]]; then
+ daemon_installed=false
+ web_installed=false
+
+ if is_component_installed "daemon"; then
+ daemon_installed=true
+ check_component_permission "daemon"
+ fi
+ if is_component_installed "web"; then
+ web_installed=true
+ check_component_permission "web"
+ fi
+
+ # When only one component installed, we wanted to process that one only.
+ if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then
+ install_daemon=true
+ install_web=false
+ elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then
+ install_daemon=false
+ install_web=true
+ else
+ install_daemon=true
+ install_web=true
+ fi
+ fi
+}
+
+
+# Get Distribution & Architecture Info
+detect_os_info() {
+ distro="Unknown"
+ version="Unknown"
+ arch=$(uname -m)
+
+ # Try primary source
+ if [ -f /etc/os-release ]; then
+ . /etc/os-release
+ distro_id="${ID,,}"
+ version_id="${VERSION_ID,,}"
+
+ case "$distro_id" in
+ ubuntu)
+ distro="Ubuntu"
+ version="$version_id"
+ ;;
+ debian)
+ distro="Debian"
+ version="$version_id"
+ ;;
+ centos)
+ distro="CentOS"
+ version="$version_id"
+ ;;
+ rhel*)
+ distro="RHEL"
+ version="$version_id"
+ ;;
+ arch)
+ distro="Arch"
+ version="rolling"
+ ;;
+ *)
+ distro="${ID:-Unknown}"
+ version="$version_id"
+ ;;
+ esac
+ fi
+
+ # Fallbacks for missing or invalid version
+ if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then
+ if [ -f /etc/issue ]; then
+ version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1)
+ if [[ -n "$version_guess" ]]; then
+ version="$version_guess"
+ fi
+ fi
+ fi
+
+ # Normalize version: keep only major version
+ version_full="$version"
+ cprint cyan "检测到操作系统: $distro $version_full"
+ cprint cyan "检测到架构: $arch"
+}
+
+version_specific_rules() {
+ # Default: do nothing unless a rule matches
+
+ if [[ "$distro" == "CentOS" && "$version" == "7" ]]; then
+ cprint yellow "Detected CentOS 7 — overriding Node.js version."
+ node_version="$node_version_centos7"
+ required_node_ver="${node_version#v}"
+ fi
+}
+
+# Check if all required commands are available
+check_required_commands() {
+ local missing=0
+
+ for cmd in "${required_commands[@]}"; do
+ if ! command -v "$cmd" >/dev/null 2>&1; then
+ echo "错误:必需的命令 '$cmd' 在PATH中不可用."
+ missing=1
+ fi
+ done
+
+ if [ "$missing" -ne 0 ]; then
+ echo "缺少一个或多个必需的命令。请安装后再试."
+ return 1
+ fi
+
+ cprint green "所有必需的命令都可用."
+ return 0
+}
+
+# Print with specified color and style, fallback to RESET if not supported.
+# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white
+# Supported styles*: bold|underline|italic|clear_line|strikethrough
+# *Note: some style may not necessarily work on all terminals.
+# Example usage:
+# cprint green bold "Installation completed successfully."
+# cprint red underline "Failed to detect required command: wget"
+# cprint yellow "Warning: Disk space is low."
+# cprint underline "Failed to detect required command: wget"
+# cprint bold green underline"Installation completed successfully."
+
+cprint() {
+ local color=""
+ local text=""
+ local styles=""
+ local disable_prefix=false
+ local disable_newline=false
+
+ while [[ $# -gt 1 ]]; do
+ case "$1" in
+ black|red|green|yellow|blue|magenta|cyan|white)
+ color="$1"
+ ;;
+ bold|underline|italic|clear_line|strikethrough)
+ styles+="${STYLES[$1]}"
+ ;;
+ noprefix)
+ disable_prefix=true
+ ;;
+ nonl)
+ disable_newline=true
+ ;;
+ esac
+ shift
+ done
+
+ text="$1"
+
+ local prefix_text=""
+ if [[ "$disable_prefix" != true ]]; then
+ local timestamp="[$(date +%H:%M:%S)]"
+ local label="[MCSM Installer]"
+ prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} "
+ fi
+
+ local prefix=""
+ if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then
+ prefix+="${FG_COLORS[$color]}"
+ fi
+ if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then
+ prefix="$styles$prefix"
+ fi
+
+ if [[ "$disable_newline" == true ]]; then
+ printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET"
+ else
+ printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET"
+ fi
+}
+
+
+
+
+# Permission check before proceed with installation
+permission_barrier() {
+ if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then
+ cprint cyan "当前没有安装组件-跳过权限检查."
+ return 0
+ fi
+
+ for component in web daemon; do
+ local is_installed_var="${component}_installed"
+ local installed_user_var="${component}_installed_user"
+
+ if [[ "${!is_installed_var}" == true ]]; then
+ local installed_user="${!installed_user_var}"
+
+ # Step 0: Ensure installed user is detected
+ if [[ -z "$installed_user" ]]; then
+ cprint red bold "检测到 '$component' 已安装,但无法从其systemd服务文件确定用户."
+ cprint red "这可能表示自定义或不支持的服务文件设置."
+ cprint red "拒绝执行以避免潜在的冲突."
+ exit 1
+ fi
+
+ # Step 1: User match check with optional force override
+ if [[ "$installed_user" != "$install_user" ]]; then
+ if [[ "$force_permission" == true ]]; then
+ cprint yellow bold "权限不匹配 '$component':"
+ cprint yellow "以用户身份安装: $installed_user"
+ cprint yellow "目标安装用户: $install_user"
+ cprint yellow "用户不匹配,但设置了--force-permission。继续和更新权限…"
+ sleep 3
+ else
+ cprint red bold "权限不匹配 '$component':"
+ cprint red "以用户身份安装: $installed_user"
+ cprint red "目标安装用户: $install_user"
+ cprint red "用户不匹配,但设置了--force-permission。继续和更新权限..."
+ exit 1
+ fi
+ else
+ cprint green bold "权限检查已通过: '$installed_user' 匹配目标用户."
+ fi
+
+ fi
+ done
+
+ # Step 2: Directory ownership check
+ local dir_owner
+ dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null)
+
+ if [[ -z "$dir_owner" ]]; then
+ cprint red bold "无法确定安装目录的所有者: $install_dir"
+ exit 1
+ fi
+
+ if [[ "$dir_owner" != "$install_user" ]]; then
+ if [[ "$force_permission" == true ]]; then
+ cprint yellow bold "安装目录所有权不匹配:"
+ cprint yellow " 目录: $install_dir"
+ cprint yellow " 归: $dir_owner"
+ cprint yellow " 预期: $install_user"
+ cprint yellow " --force-permission设置。尽管不匹配,但继续."
+ sleep 3
+ else
+ cprint red bold "安装目录所有权不匹配:"
+ cprint red " 目录: $install_dir"
+ cprint red " 归: $dir_owner"
+ cprint red " 预期: $install_user"
+ exit 1
+ fi
+ else
+ cprint green bold "安装目录所有权检查通过: '$install_dir' is owned by '$install_user'."
+ fi
+
+ cprint green bold "验证了权限和所有权。继续."
+ return 0
+}
+
+
+
+# Map OS arch with actual Node.js Arch name
+# This function should be placed after var arch has been assigned a valid value.
+resolve_node_arch() {
+ case "$arch" in
+ x86_64)
+ node_arch="x64"
+ ;;
+ aarch64)
+ node_arch="arm64"
+ ;;
+ armv7l)
+ node_arch="armv7l"
+ ;;
+ loongarch64)
+ node_arch="loong64"
+ # Use unoffical build
+ node_download_url_base=$node_unoffical_build_url
+ ;;
+ *)
+ cprint red bold "Node.js不支持的架构: $arch"
+ return 1
+ ;;
+ esac
+
+ # Assign node_path based on resolved arch and current version/install dir
+ node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}"
+
+ cprint cyan "解析了Node.js架构: $node_arch"
+ cprint cyan "Node.js安装路径: $node_path"
+}
+
+# Check if Node.js at PATH is valid.
+# This function check Node.js version + NPM (if Node.js valid)
+verify_node_at_path() {
+ local node_path="$1"
+ node_bin_path="$node_path/bin/node"
+ npm_bin_path="$node_path/bin/npm"
+
+ # Node binary missing
+ if [ ! -x "$node_bin_path" ]; then
+ return 1
+ fi
+
+ local installed_ver
+ installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')"
+
+ if [[ -z "$installed_ver" ]]; then
+ return 1
+ fi
+
+ if [ "$strict_node_version_check" = true ]; then
+ if [[ "$installed_ver" != "$required_node_ver" ]]; then
+ return 3
+ fi
+ else
+ local cmp
+ cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1)
+ if [[ "$cmp" != "$required_node_ver" ]]; then
+ return 2
+ fi
+ fi
+
+ # Check if npm exists and works using node (not $PATH/npm)
+ if [ ! -x "$npm_bin_path" ]; then
+ return 4
+ fi
+
+ # Use node to run npm.js directly, in case env is broken
+ local npm_version
+ npm_version="$("$node_bin_path" "$npm_bin_path" --version 2>/dev/null)"
+ if [[ -z "$npm_version" ]]; then
+ return 4
+ fi
+
+ return 0
+}
+
+
+# Node.js pre-check. check if we need to install Node.js before installer run.
+# Use postcheck_node_after_install() to check after install.
+check_node_installed() {
+ verify_node_at_path "$node_path"
+ local result=$?
+
+ case $result in
+ 0)
+ cprint green bold "Node.js和npm在 $node_path (版本 $required_node_ver 或兼容)"
+ install_node=false
+ ;;
+ 1)
+ cprint yellow bold "Node.js二进制文件未找到或无法使用 $node_path"
+ install_node=true
+ ;;
+ 2)
+ cprint red bold "Node.js版本 $node_path 太老. 要求: >= $required_node_ver"
+ install_node=true
+ ;;
+ 3)
+ cprint red bold "Node.js版本不匹配。要求: $required_node_ver, 发现了其他的Node.js版本."
+ install_node=true
+ ;;
+ 4)
+ cprint red bold "Node.js存在,但npm缺失或损坏."
+ install_node=true
+ ;;
+ *)
+ cprint red bold "Node验证中出现意外错误."
+ install_node=true
+ ;;
+ esac
+}
+
+# Node.js post-check. check if Node.js is valid after install.
+postcheck_node_after_install() {
+ verify_node_at_path "$node_path"
+ if [[ $? -ne 0 ]]; then
+ cprint red bold "Node.js安装失败或无效 $node_path"
+ return 1
+ else
+ cprint green bold "Node.js的安装和运行在 $node_path"
+ return 0
+ fi
+}
+
+# Install Node.js and check
+install_node() {
+ local archive_name="node-${node_version}-linux-${node_arch}.tar.xz"
+ local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}"
+ local archive_path="${node_install_dir}/${archive_name}"
+ local download_url="${node_download_url_base}${node_version}/${archive_name}"
+ local fallback="$node_download_fallback"
+
+ cprint cyan bold "安装Node.js $node_version 架构: $node_arch"
+
+ mkdir -p "$node_install_dir" || {
+ cprint red bold "创建Node安装目录失败: $node_install_dir"
+ return 1
+ }
+
+ # Download
+ cprint cyan "下载Node.js: $download_url"
+ if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then
+ cprint yellow "主下载失败。尝试备用下载……"
+
+ if [[ -n "$fallback" ]]; then
+ if [[ "$fallback" =~ ^https?:// ]]; then
+ cprint cyan "从备用URL下载: $fallback"
+ if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then
+ cprint red bold "备用下载失败: $fallback"
+ return 1
+ fi
+ elif [ -f "$fallback" ]; then
+ cprint cyan "从本地备份进行复制: $fallback"
+ cp "$fallback" "$archive_path" || {
+ cprint red bold "复制备用Node.js存档失败 $fallback"
+ return 1
+ }
+ else
+ cprint red bold "无效的备用路径: $fallback"
+ return 1
+ fi
+ else
+ cprint red bold "没有配置备用源。不能继续进行."
+ return 1
+ fi
+ fi
+
+ # Extract archive
+ cprint cyan "提取Node.js存档..."
+ if ! tar -xf "$archive_path" -C "$node_install_dir"; then
+ cprint red bold "提取Node.js文件失败."
+ return 1
+ fi
+
+ chmod -R a+rx "$target_dir" || {
+ cprint red bold "在Node.js文件上设置执行权限失败."
+ return 1
+ }
+
+ verify_node_at_path "$target_dir"
+ local result=$?
+ if [[ $result -ne 0 ]]; then
+ cprint red bold "Node.js安装验证失败."
+ return 1
+ fi
+
+ cprint cyan "清理文件……"
+ rm -f "$archive_path"
+
+ cprint green bold "Node.js $node_version 安装成功 $target_dir"
+ # Save resolved binary paths to global variables
+ node_bin_path="${target_dir}/bin/node"
+ npm_bin_path="${target_dir}/bin/npm"
+
+ cprint green "Node.js 二进制文件: $node_bin_path"
+ cprint green "npm 二进制文件: $npm_bin_path"
+ return 0
+}
+
+# Function to download MCSM package. fetch from primary URL first, then fallback URL.
+# This function only put extracted file(s) into install_dir, it does not perform the actual update.
+download_mcsm() {
+ local archive_name="$package_name"
+ local archive_path="${tmp_dir}/${archive_name}"
+ local primary_url="${download_base_url}${archive_name}"
+ local fallback="$download_fallback_url"
+
+ cprint cyan bold "下载MCSManager安装包…"
+
+ # Step 1: Try downloading from primary URL
+ if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then
+ cprint yellow "主下载失败。尝试备用资源…"
+
+ if [[ -z "$fallback" ]]; then
+ cprint red bold "没有指定备用URL或路径."
+ return 1
+ fi
+
+ if [[ "$fallback" =~ ^https?:// ]]; then
+ if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then
+ cprint red bold "备用下载失败 $fallback"
+ return 1
+ fi
+ elif [[ -f "$fallback" ]]; then
+ cp "$fallback" "$archive_path" || {
+ cprint red bold "未能复制备用文件 $fallback"
+ return 1
+ }
+ else
+ cprint red bold "备用路径无效: $fallback"
+ return 1
+ fi
+ fi
+
+ # Step 2: Generate extract directory
+ local suffix
+ suffix=$(tr -dc 'a-z0-9' /dev/null; then
+ cprint green "用户 '$install_user' 已经存在."
+ else
+ cprint cyan "创建系统用户: $install_user (无登录,无密码)..."
+ if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then
+ cprint red bold "创建用户失败: $install_user"
+ exit 1
+ fi
+ cprint green "用户 '$install_user' 已创建."
+ fi
+
+
+ # Docker integration
+ if command -v docker &>/dev/null; then
+ cprint cyan "Docker已被安装 -检查组分配…"
+
+ if getent group docker &>/dev/null; then
+ if id -nG "$install_user" | grep -qw docker; then
+ cprint green "用户 '$install_user' 已经在“docker”组中."
+ else
+ cprint cyan "添加用户 '$install_user' 到 'docker' 组..."
+ if usermod -aG docker "$install_user"; then
+ cprint green "授予的Docker组访问权限 '$install_user'."
+ else
+ cprint red "未能添加 '$install_user' 给“Docker”组。这个用户可能无法使用Docker."
+ fi
+ fi
+ else
+ cprint red "安装了Docker,但没有找到Docker组。跳过组分配."
+ fi
+ else
+ cprint yellow "未安装Docker -跳过Docker组配置."
+ fi
+
+ return 0
+}
+# Function to stop MCSM services if they exist
+stop_mcsm_services() {
+ cprint yellow bold "试图停止mcsm-web和mcsm-daemon服务..."
+
+ # Attempt to stop mcsm-web
+ cprint blue "正在停止 mcsm-web..."
+ if systemctl stop mcsm-web; then
+ cprint green "mcsm-web 已停止."
+ else
+ cprint red bold "警告:未能停止mcsm-web(可能不存在或已停止)."
+ fi
+
+ # Attempt to stop mcsm-daemon
+ cprint blue "正在停止 mcsm-daemon..."
+ if systemctl stop mcsm-daemon; then
+ cprint green "mcsm-daemon 已停止."
+ else
+ cprint red bold "警告:未能停止mcsm-daemon(可能不存在或已停止)."
+ fi
+}
+# Prepare file & permissions before install.
+mcsm_install_prepare() {
+
+ # Stop service if existed
+ stop_mcsm_services
+
+ if [[ ! -d "$install_tmp_dir" ]]; then
+ cprint red bold "临时安装目录不存在: $install_tmp_dir"
+ exit 1
+ fi
+
+ cprint cyan "改变所有权 $install_tmp_dir 到用户 '$install_user'..."
+ chown -R "$install_user":"$install_user" "$install_tmp_dir" || {
+ cprint red bold "所有权变更失败 $install_tmp_dir"
+ cleanup_install_tmp
+ exit 1
+ }
+
+ # Normalize install_dir to ensure it ends with a slash
+ [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/"
+
+ if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then
+ cprint cyan "没有检测到现有组件-跳过数据备份/清理."
+ return 0
+ fi
+
+ cprint green bold "已成功准备现有组件."
+ return 0
+}
+
+# Install or update a component
+install_component() {
+ local component="$1"
+ local target_path="${install_dir}${component}"
+ local backup_data_path="${install_dir}${backup_prefix}${component}"
+ local source_path="${install_tmp_dir}/mcsmanager/${component}"
+
+ cprint cyan bold "安装/更新组件: $component"
+
+ # Step 1: Move new component to install_dir
+ if [[ ! -d "$source_path" ]]; then
+ cprint red bold "找不到源目录: $source_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ cprint cyan "删除依赖库文件 $target_path/node_modules/"
+ if [[ -d "$target_path/node_modules/" ]]; then
+ rm -rf "$target_path/node_modules/"
+ fi
+
+ if cp -a "$source_path"/. "$target_path"; then
+ cprint green "更新的文件 $source_path → $target_path"
+ rm -rf "$source_path"
+ else
+ cprint red bold "更新文件失败 $source_path → $target_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+ cprint green "已移动 $component 到 $target_path"
+
+
+ # Step 3: Install NPM dependencies
+ if [[ ! -x "$npm_bin_path" ]]; then
+ cprint red bold "找不到npm二进制文件或无法执行: $npm_bin_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ cprint cyan "正在使用npm安装依赖库 $component ..."
+ pushd "$target_path" >/dev/null || {
+ cprint red bold "更改目录失败 $target_path"
+ cleanup_install_tmp
+ exit 1
+ }
+
+
+ if ! "$node_bin_path" "$npm_bin_path" install --registry=https://registry.npmmirror.com --no-audit --no-fund --loglevel=warn; then
+ cprint red bold "NPM依赖项安装失败 $component"
+ popd >/dev/null
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ popd >/dev/null
+ cprint green bold "组件 '$component' 安装/更新成功."
+}
+
+# Create systemd service for a given component.
+# This will overwrite the existing service file.
+create_systemd_service() {
+ local component="$1"
+ local service_path="${systemd_file}${component}.service"
+ local working_dir="${install_dir}${component}"
+ local exec="${node_bin_path} app.js"
+
+ if [[ ! -d "$working_dir" ]]; then
+ cprint red bold "找不到组件目录: $working_dir"
+ cleanup_install_tmp
+ return 1
+ fi
+
+ cprint cyan "创建systemd服务 '$component'..."
+
+ cat > "$service_path" </dev/null | awk '{print $1}')
+ [[ -z "$ip_address" ]] && ip_address="你的IP"
+
+ # Daemon info
+ if [[ "$install_daemon" == true ]]; then
+ local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}"
+ local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}"
+
+ cprint yellow noprefix "守护进程地址:"
+ cprint white noprefix " $daemon_address"
+ cprint yellow noprefix "守护进程秘钥:"
+ cprint white noprefix " $daemon_key_display"
+ echo ""
+ fi
+
+ # Web info
+ if [[ "$install_web" == true ]]; then
+ local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}"
+ cprint yellow noprefix "HTTP面板地址:"
+ cprint white noprefix nonl " $web_address "
+ cprint yellow noprefix "(在你的浏览器中打开)"
+ echo ""
+ fi
+
+ # Port guidance
+ cprint yellow noprefix "注意:"
+ cprint white noprefix " 确保防火墙放行上述端口."
+ cprint white noprefix " 如果从外部网络访问,您可能需要在路由器上配置端口转发."
+ echo ""
+
+ # Service management help
+ cprint yellow noprefix "MCSManager管理命令:"
+ if [[ "$install_daemon" == true ]]; then
+ cprint white noprefix nonl " systemctl start "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl stop "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl restart "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl status "
+ cprint yellow noprefix "mcsm-daemon.service"
+ fi
+ if [[ "$install_web" == true ]]; then
+ cprint white noprefix nonl " systemctl start "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl stop "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl restart "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl status "
+ cprint yellow noprefix "mcsm-web.service"
+ fi
+ echo ""
+
+ # Official doc
+ cprint yellow noprefix "官方文档:"
+ cprint white noprefix " https://docs.mcsmanager.com/zh_cn/"
+ echo ""
+
+ # HTTPS support
+ cprint yellow noprefix "需要HTTPS?"
+ cprint white noprefix " 为了开启HTTPS安全访问,需要配置反向代理:"
+ cprint white noprefix " https://docs.mcsmanager.com/zh_cn/ops/proxy_https.html"
+ echo ""
+
+ if [[ "$force_permission" == true ]]; then
+ cprint red noprefix "[重点] 您选择在安装期间重写权限."
+ cprint red noprefix " 你可能需要运行: chown -R $install_user 手动更新权限."
+ fi
+
+ # Closing message
+ cprint green noprefix "安装完成。享受使用MCSManager管理服务器的乐趣!"
+ echo ""
+}
+
+install_mcsm() {
+ local components=()
+
+ if [[ "$install_web" == true ]]; then
+ install_component "web"
+ create_systemd_service "web"
+ components+=("web")
+ fi
+
+ if [[ "$install_daemon" == true ]]; then
+ install_component "daemon"
+ create_systemd_service "daemon"
+ components+=("daemon")
+ fi
+
+ # Reload systemd after any service file changes
+ if (( ${#components[@]} > 0 )); then
+ cprint cyan "重新加载systemd守护进程..."
+ # systemctl daemon-reexec
+ systemctl daemon-reload
+
+ for comp in "${components[@]}"; do
+ local svc="mcsm-${comp}.service"
+
+ cprint cyan "启用服务: $svc"
+ if systemctl enable "$svc" &>/dev/null; then
+ cprint green "已启用服务: $svc"
+ else
+ cprint red bold "启用服务失败: $svc"
+ cleanup_install_tmp
+ exit 1
+ fi
+ done
+ fi
+
+ # Clean tmp dir
+ cleanup_install_tmp
+ # Extract installed component info
+ safe_run extract_component_info "未能从已安装的服务中提取运行时信息"
+ safe_run print_install_result "未能打印安装结果"
+
+}
+
+main() {
+ trap 'echo "发生意外错误."; exit 99' ERR
+ safe_run detect_terminal_capabilities "检测终端功能失败"
+ safe_run check_root "脚本必须以root身份运行"
+ safe_run parse_args "解析参数失败" "$@"
+ safe_run detect_os_info "OS检测失败"
+ safe_run version_specific_rules "Failed to apply distro/version specific rules"
+
+ # To be moved to a master pre check function.
+ safe_run resolve_node_arch "解析Node.js架构失败"
+
+ safe_run check_required_commands "缺少必要的系统命令"
+
+ safe_run check_node_installed "在预期目录上检测到Node.js或npm失败。Node.js将被安装."
+ if [ "$install_node" = true ]; then
+ safe_run install_node "Node.js安装失败"
+ fi
+
+ safe_run permission_barrier "权限验证失败-中止安装"
+
+ safe_run prepare_user "准备用户权限失败。处理步骤."
+
+ safe_run download_mcsm "获取MCSManager源失败。处理步骤"
+ safe_run mcsm_install_prepare "准备安装时出错"
+
+ safe_run install_mcsm "未能安装 MCSManager"
+}
+main "$@"
diff --git a/setup_cn_test.sh b/setup_cn_test.sh
new file mode 100644
index 0000000..ffbf7f0
--- /dev/null
+++ b/setup_cn_test.sh
@@ -0,0 +1,1374 @@
+#!/bin/bash
+# MCSManager官方安装脚本.
+# 这个脚本将会把MCSManager服务端和节点服务端更新/安装至最新发布版本.
+# ------------------------------------------------------------------------------
+# 受支持的Linux:
+# 此脚本支持以下Linux发行版:
+# - Ubuntu: 18.04, 20.04, 22.04, 24.04
+# - Debian: 10, 11, 12, 13
+# - CentOS: 7, 8 Stream, 9 Stream, 10 Stream
+# - RHEL: 7, 8, 9, 10
+# - Arch Linux: Support planned (TBD)
+# ------------------------------------------------------------------------------
+
+# Target installation directory (can be overridden with --install-dir)
+install_dir="/opt/mcsmanager"
+
+# Primary download URL bas. Full package URL = download_base_url + package_name
+download_base_url="https://cdn.imlazy.ink:233/files/"
+
+# Fallback download URL (can also be a local directory or mirror)
+download_fallback_url="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz"
+
+# Name of the release package to download/detect
+package_name="mcsmanager_linux_release.tar.gz"
+
+# Node.js version to be installed
+# Keep the leading "v"
+node_version="v20.12.2"
+
+# Node download base URL - primary
+node_download_url_base="https://nodejs.org/dist/"
+
+# Unoffical build of Node.js, for more ISA support
+node_unoffical_build_url="https://unofficial-builds.nodejs.org/download/release/"
+
+# Node download URL - fallback.
+# This is the URL points directly to the file, not the base. This can also be a local absolute path.
+# Only supports https:// or http:// for web locations.
+node_download_fallback=""
+
+# Node.js installation path (defaults to the MCSManager installation path. Can be overridden with --node-install-dir)
+node_install_dir="$install_dir"
+
+# Temp dir for file extraction
+tmp_dir="/tmp"
+
+# Bypass installed user permission check, override by --force-permission
+force_permission=false
+
+
+# --------------- Global Variables ---------------#
+# DO NOT MODIFY #
+
+
+# Component installation options.
+# For fresh installs, both daemon and web components are installed by default.
+# For updates, behavior depends on detected existing components.
+# Can be overridden with --install daemon/web/all
+install_daemon=true
+install_web=true
+
+# Install MCSM as (default: root).
+# To install as a general user (e.g., "mcsm"), use the --user option: --user mcsm
+# To ensure compatibility, only user mcsm is supported.
+install_user="root"
+# Installed user, for permission check
+web_installed=false
+daemon_installed=false
+web_installed_user=""
+daemon_installed_user=""
+
+# Service file locations
+# the final dir = systemd_file + {web/daemon} + ".service"
+systemd_file="/etc/systemd/system/mcsm-"
+# Optional: Override the default installation source file.
+# If --install-source is specified, the installer will use the provided
+# "mcsmanager_linux_release.tar.gz" file instead of downloading it.
+# Only support local absolute path.
+install_source_path=""
+
+# temp path for extracted file(s)
+install_tmp_dir="/opt/mcsmanager/mcsm_abcd"
+
+# dir name for data dir backup
+# e.g. /opt/mcsmanager/daemon/data -> /opt/mcsmanager/data_bak_data
+# only valid for when during an update
+backup_prefix="data_bak_"
+
+# System architecture (detected automatically)
+arch=""
+version=""
+distro=""
+
+
+
+# Supported OS versions (map-style structure)
+# Format: supported_os["distro_name"]="version1 version2 version3 ..."
+declare -A supported_os
+supported_os["Ubuntu"]="18 20 22 24"
+supported_os["Debian"]="10 11 12 13"
+supported_os["CentOS"]="7 8 8-stream 9-stream 10-stream"
+supported_os["RHEL"]="7 8 9 10"
+supported_os["Arch"]="rolling"
+
+# Required system commands for installation
+# These will be checked before logic process
+required_commands=(
+ chmod
+ chown
+ wget
+ tar
+ stat
+ useradd
+ usermod
+ date
+)
+
+# Node.js related sections
+# Enable strict version checking (exact match)
+# enabled -> strict requriement for defined node version
+# false -> newer version allowed
+# Older version is NEVER allowed
+strict_node_version_check=true
+
+# Will be set based on actual node status
+install_node=true
+# Remove leading "v" from defined version
+required_node_ver="${node_version#v}"
+
+# Holds absolute path for node & npm
+node_bin_path=""
+npm_bin_path=""
+# Hold Node.js arch name, e.g. x86_64 -> x64
+node_arch=""
+# Hold Node.js intallation path, e.g. ${node_install_dir}/node-${node_version}-linux-${arch}
+node_path=""
+
+# For installation result
+daemon_key=""
+daemon_port=""
+web_port=""
+daemon_key_config_subpath="data/Config/global.json"
+web_port_config_subpath="data/SystemConfig/config.json"
+
+# Terminal color & style related
+# Default to false, auto check later
+SUPPORTS_COLOR=false
+SUPPORTS_STYLE=false
+# Declare ANSI reset
+RESET="\033[0m"
+
+# Foreground colors
+declare -A FG_COLORS=(
+ [black]="\033[0;30m"
+ [red]="\033[0;31m"
+ [green]="\033[0;32m"
+ [yellow]="\033[0;33m"
+ [blue]="\033[0;34m"
+ [magenta]="\033[0;35m"
+ [cyan]="\033[0;36m"
+ [white]="\033[0;37m"
+)
+
+# Font styles
+declare -A STYLES=(
+ [bold]="\033[1m"
+ [underline]="\033[4m"
+ [italic]="\033[3m" # Often ignored
+ [clear_line]="\r\033[2K"
+ [strikethrough]="\033[9m"
+)
+
+
+### Helper Functions
+# Execution wrapper, avoid unexpected crashes.
+safe_run() {
+ local func="$1"
+ local err_msg="$2"
+ shift 2
+
+ if ! "$func" "$@"; then
+ echo "Error: $err_msg"
+ exit 1
+ fi
+}
+
+# Function to ensure the script is run as root
+check_root() {
+ # Using Bash's built-in EUID variable
+ if [ -n "$EUID" ]; then
+ if [ "$EUID" -ne 0 ]; then
+ cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo."
+ exit 1
+ fi
+ else
+ # Fallback to using id -u if EUID is unavailable (e.g., non-Bash shell or misconfigured environment)
+ if [ "$(id -u)" -ne 0 ]; then
+ cprint red "错误: 这个脚本只能运行在root或sudo模式下,请尝试切换用户或者使用sudo."
+ exit 1
+ fi
+ fi
+}
+
+# Function to check whether current terminal support color & style
+detect_terminal_capabilities() {
+ SUPPORTS_COLOR=false
+ SUPPORTS_STYLE=false
+
+ if [ -t 1 ] && command -v tput >/dev/null 2>&1; then
+ if [ "$(tput colors)" -ge 8 ]; then
+ SUPPORTS_COLOR=true
+ fi
+ if tput bold >/dev/null 2>&1 && tput smul >/dev/null 2>&1; then
+ SUPPORTS_STYLE=true
+ fi
+ fi
+
+ if [ "$SUPPORTS_COLOR" = true ]; then
+ cprint green "[OK] 这个终端支持彩色输出."
+ else
+ cprint yellow "注:终端不支持彩色输出。不格式化继续."
+ fi
+
+ if [ "$SUPPORTS_STYLE" = true ]; then
+ cprint green "[OK] 终端支持粗体和下划线格式."
+ else
+ cprint yellow "注意:终端不支持高级文本样式."
+ fi
+}
+
+# Check whether daemon or web is installed
+is_component_installed() {
+ local component_name="$1"
+ local component_path="${install_dir}/${component_name}"
+
+ if [[ -d "$component_path" ]]; then
+ cprint green "组件 '$component_name' 已经被安装在 $component_path"
+
+ # Set corresponding global variable
+ if [[ "$component_name" == "daemon" ]]; then
+ daemon_installed=true
+ elif [[ "$component_name" == "web" ]]; then
+ web_installed=true
+ fi
+
+ return 0
+ else
+ cprint yellow "组件 '$component_name' 未被安装"
+
+ # Set corresponding global variable
+ if [[ "$component_name" == "daemon" ]]; then
+ daemon_installed=false
+ elif [[ "$component_name" == "web" ]]; then
+ web_installed=false
+ fi
+
+ return 1
+ fi
+}
+
+check_component_permission() {
+ local component="$1"
+ local service_file="${systemd_file}${component}.service"
+
+ if [[ ! -f "$service_file" ]]; then
+ cprint yellow "找不到服务文件: $service_file"
+ return 0 # nothing changed
+ fi
+
+ # Extract the User= line if it exists
+ local user_line
+ user_line=$(grep -E '^User=' "$service_file" 2>/dev/null | head -1)
+
+ local user
+ if [[ -z "$user_line" ]]; then
+ user="root" # default if no User= is defined
+ else
+ user="${user_line#User=}"
+ fi
+
+ # Validate user
+ if [[ "$user" != "root" && "$user" != "mcsm" ]]; then
+ cprint red bold "不支持的用户 '$user' 在 $service_file. 使用 'root' 或 'mcsm'."
+ exit 1
+ fi
+
+ # Assign to appropriate global
+ if [[ "$component" == "web" ]]; then
+ web_installed_user="$user"
+ elif [[ "$component" == "daemon" ]]; then
+ daemon_installed_user="$user"
+ fi
+
+ cprint cyan "已删除 $component 以用户身份安装: $user"
+ return 0
+}
+
+
+
+parse_args() {
+ local explicit_install_flag=false
+
+ while [[ $# -gt 0 ]]; do
+ case "$1" in
+ --install-dir)
+ if [[ -n "$2" ]]; then
+ install_dir="$2"
+ shift 2
+ else
+ echo "错误:--install-dir需要一个路径参数."
+ exit 1
+ fi
+ ;;
+ --node-install-dir)
+ if [[ -n "$2" ]]; then
+ node_install_dir="$2"
+ shift 2
+ else
+ echo "错误:--node-install-dir需要一个路径参数."
+ exit 1
+ fi
+ ;;
+ --install)
+ explicit_install_flag=true
+ if [[ -n "$2" && "$2" != --* ]]; then
+ case "$2" in
+ daemon)
+ install_daemon=true
+ is_component_installed "daemon"
+ install_web=false
+ check_component_permission "daemon"
+ ;;
+ web)
+ install_daemon=false
+ is_component_installed "web"
+ install_web=true
+ check_component_permission "web"
+ ;;
+ all)
+ install_daemon=true
+ install_web=true
+ is_component_installed "daemon"
+ is_component_installed "web"
+ check_component_permission "daemon"
+ check_component_permission "web"
+ ;;
+ *)
+ echo "错误:--install的值无效。期望‘daemon’, ‘web’或‘all’."
+ echo "Usage: --install daemon|web|all"
+ exit 1
+ ;;
+ esac
+ shift 2
+ else
+ echo "错误:提供了--install标志,但没有值。请指定:daemon、web或all."
+ echo "使用方法: --install daemon|web|all"
+ exit 1
+ fi
+ ;;
+ --user)
+ if [[ -n "$2" ]]; then
+ case "$2" in
+ root)
+ install_user="root"
+ ;;
+ mcsm)
+ install_user="mcsm"
+ ;;
+ *)
+ echo "错误:无效用户 '$2'. 只有 'root' 和 'mcsm' 受支持."
+ echo "使用方法: --user root|mcsm"
+ exit 1
+ ;;
+ esac
+ shift 2
+ else
+ echo "错误:--user需要一个值 (root 或 mcsm)."
+ exit 1
+ fi
+ ;;
+ --install-source)
+ if [[ -n "$2" ]]; then
+ install_source_path="$2"
+ shift 2
+ else
+ echo "错误:--install-source需要文件路径."
+ exit 1
+ fi
+ ;;
+ --force-permission)
+ force_permission=true
+ shift
+ ;;
+ *)
+ echo "错误:未知参数t: $1"
+ exit 1
+ ;;
+ esac
+ done
+
+ # Auto-detect branch: only run if --install was not explicitly passed
+ if [[ "$explicit_install_flag" == false ]]; then
+ daemon_installed=false
+ web_installed=false
+
+ if is_component_installed "daemon"; then
+ daemon_installed=true
+ check_component_permission "daemon"
+ fi
+ if is_component_installed "web"; then
+ web_installed=true
+ check_component_permission "web"
+ fi
+
+ # When only one component installed, we wanted to process that one only.
+ if [[ "$daemon_installed" == true && "$web_installed" == false ]]; then
+ install_daemon=true
+ install_web=false
+ elif [[ "$daemon_installed" == false && "$web_installed" == true ]]; then
+ install_daemon=false
+ install_web=true
+ else
+ install_daemon=true
+ install_web=true
+ fi
+ fi
+}
+
+
+# Get Distribution & Architecture Info
+detect_os_info() {
+ distro="Unknown"
+ version="Unknown"
+ arch=$(uname -m)
+
+ # Try primary source
+ if [ -f /etc/os-release ]; then
+ . /etc/os-release
+ distro_id="${ID,,}"
+ version_id="${VERSION_ID,,}"
+
+ case "$distro_id" in
+ ubuntu)
+ distro="Ubuntu"
+ version="$version_id"
+ ;;
+ debian)
+ distro="Debian"
+ version="$version_id"
+ ;;
+ centos)
+ distro="CentOS"
+ version="$version_id"
+ ;;
+ rhel*)
+ distro="RHEL"
+ version="$version_id"
+ ;;
+ arch)
+ distro="Arch"
+ version="rolling"
+ ;;
+ *)
+ distro="${ID:-Unknown}"
+ version="$version_id"
+ ;;
+ esac
+ fi
+
+ # Fallbacks for missing or invalid version
+ if [[ -z "$version" || "$version" == "unknown" || "$version" == "" ]]; then
+ if [ -f /etc/issue ]; then
+ version_guess=$(grep -oP '[0-9]+(\.[0-9]+)*' /etc/issue | head -1)
+ if [[ -n "$version_guess" ]]; then
+ version="$version_guess"
+ fi
+ fi
+ fi
+
+ # Normalize version: keep only major version
+ version_full="$version"
+ cprint cyan "检测到操作系统: $distro $version_full"
+ cprint cyan "检测到架构: $arch"
+}
+
+# Check if all required commands are available
+check_required_commands() {
+ local missing=0
+
+ for cmd in "${required_commands[@]}"; do
+ if ! command -v "$cmd" >/dev/null 2>&1; then
+ echo "错误:必需的命令 '$cmd' 在PATH中不可用."
+ missing=1
+ fi
+ done
+
+ if [ "$missing" -ne 0 ]; then
+ echo "缺少一个或多个必需的命令。请安装后再试."
+ return 1
+ fi
+
+ cprint green "所有必需的命令都可用."
+ return 0
+}
+
+# Print with specified color and style, fallback to RESET if not supported.
+# Supported colors*: black|red|green|yellow|blue|magenta|cyan|white
+# Supported styles*: bold|underline|italic|clear_line|strikethrough
+# *Note: some style may not necessarily work on all terminals.
+# Example usage:
+# cprint green bold "Installation completed successfully."
+# cprint red underline "Failed to detect required command: wget"
+# cprint yellow "Warning: Disk space is low."
+# cprint underline "Failed to detect required command: wget"
+# cprint bold green underline"Installation completed successfully."
+
+cprint() {
+ local color=""
+ local text=""
+ local styles=""
+ local disable_prefix=false
+ local disable_newline=false
+
+ while [[ $# -gt 1 ]]; do
+ case "$1" in
+ black|red|green|yellow|blue|magenta|cyan|white)
+ color="$1"
+ ;;
+ bold|underline|italic|clear_line|strikethrough)
+ styles+="${STYLES[$1]}"
+ ;;
+ noprefix)
+ disable_prefix=true
+ ;;
+ nonl)
+ disable_newline=true
+ ;;
+ esac
+ shift
+ done
+
+ text="$1"
+
+ local prefix_text=""
+ if [[ "$disable_prefix" != true ]]; then
+ local timestamp="[$(date +%H:%M:%S)]"
+ local label="[MCSM Installer]"
+ prefix_text="${FG_COLORS[white]}$timestamp $label${RESET} "
+ fi
+
+ local prefix=""
+ if [[ -n "$color" && "$SUPPORTS_COLOR" = true ]]; then
+ prefix+="${FG_COLORS[$color]}"
+ fi
+ if [[ "$SUPPORTS_STYLE" = true || "$styles" == *"${STYLES[clear_line]}"* ]]; then
+ prefix="$styles$prefix"
+ fi
+
+ if [[ "$disable_newline" == true ]]; then
+ printf "%b%b%s%b" "$prefix_text" "$prefix" "$text" "$RESET"
+ else
+ printf "%b%b%s%b\n" "$prefix_text" "$prefix" "$text" "$RESET"
+ fi
+}
+
+
+
+
+# Permission check before proceed with installation
+permission_barrier() {
+ if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then
+ cprint cyan "当前没有安装组件-跳过权限检查."
+ return 0
+ fi
+
+ for component in web daemon; do
+ local is_installed_var="${component}_installed"
+ local installed_user_var="${component}_installed_user"
+
+ if [[ "${!is_installed_var}" == true ]]; then
+ local installed_user="${!installed_user_var}"
+
+ # Step 0: Ensure installed user is detected
+ if [[ -z "$installed_user" ]]; then
+ cprint red bold "检测到 '$component' 已安装,但无法从其systemd服务文件确定用户."
+ cprint red "这可能表示自定义或不支持的服务文件设置."
+ cprint red "拒绝执行以避免潜在的冲突."
+ exit 1
+ fi
+
+ # Step 1: User match check with optional force override
+ if [[ "$installed_user" != "$install_user" ]]; then
+ if [[ "$force_permission" == true ]]; then
+ cprint yellow bold "权限不匹配 '$component':"
+ cprint yellow "以用户身份安装: $installed_user"
+ cprint yellow "目标安装用户: $install_user"
+ cprint yellow "用户不匹配,但设置了--force-permission。继续和更新权限…"
+ sleep 3
+ else
+ cprint red bold "权限不匹配 '$component':"
+ cprint red "以用户身份安装: $installed_user"
+ cprint red "目标安装用户: $install_user"
+ cprint red "用户不匹配,但设置了--force-permission。继续和更新权限..."
+ exit 1
+ fi
+ else
+ cprint green bold "权限检查已通过: '$installed_user' 匹配目标用户."
+ fi
+
+ fi
+ done
+
+ # Step 2: Directory ownership check
+ local dir_owner
+ dir_owner=$(stat -c '%U' "$install_dir" 2>/dev/null)
+
+ if [[ -z "$dir_owner" ]]; then
+ cprint red bold "无法确定安装目录的所有者: $install_dir"
+ exit 1
+ fi
+
+ if [[ "$dir_owner" != "$install_user" ]]; then
+ if [[ "$force_permission" == true ]]; then
+ cprint yellow bold "安装目录所有权不匹配:"
+ cprint yellow " 目录: $install_dir"
+ cprint yellow " 归: $dir_owner"
+ cprint yellow " 预期: $install_user"
+ cprint yellow " --force-permission设置。尽管不匹配,但继续."
+ sleep 3
+ else
+ cprint red bold "安装目录所有权不匹配:"
+ cprint red " 目录: $install_dir"
+ cprint red " 归: $dir_owner"
+ cprint red " 预期: $install_user"
+ exit 1
+ fi
+ else
+ cprint green bold "安装目录所有权检查通过: '$install_dir' is owned by '$install_user'."
+ fi
+
+ cprint green bold "验证了权限和所有权。继续."
+ return 0
+}
+
+
+
+# Map OS arch with actual Node.js Arch name
+# This function should be placed after var arch has been assigned a valid value.
+resolve_node_arch() {
+ case "$arch" in
+ x86_64)
+ node_arch="x64"
+ ;;
+ aarch64)
+ node_arch="arm64"
+ ;;
+ armv7l)
+ node_arch="armv7l"
+ ;;
+ loongarch64)
+ node_arch="loong64"
+ # Use unoffical build
+ node_download_url_base=$node_unoffical_build_url
+ ;;
+ *)
+ cprint red bold "Node.js不支持的架构: $arch"
+ return 1
+ ;;
+ esac
+
+ # Assign node_path based on resolved arch and current version/install dir
+ node_path="${node_install_dir}/node-${node_version}-linux-${node_arch}"
+
+ cprint cyan "解析了Node.js架构: $node_arch"
+ cprint cyan "Node.js安装路径: $node_path"
+}
+
+# Check if Node.js at PATH is valid.
+# This function check Node.js version + NPM (if Node.js valid)
+verify_node_at_path() {
+ local node_path="$1"
+ node_bin_path="$node_path/bin/node"
+ npm_bin_path="$node_path/bin/npm"
+
+ # Node binary missing
+ if [ ! -x "$node_bin_path" ]; then
+ return 1
+ fi
+
+ local installed_ver
+ installed_ver="$("$node_bin_path" -v 2>/dev/null | sed 's/^v//')"
+
+ if [[ -z "$installed_ver" ]]; then
+ return 1
+ fi
+
+ if [ "$strict_node_version_check" = true ]; then
+ if [[ "$installed_ver" != "$required_node_ver" ]]; then
+ return 3
+ fi
+ else
+ local cmp
+ cmp=$(printf "%s\n%s\n" "$required_node_ver" "$installed_ver" | sort -V | head -1)
+ if [[ "$cmp" != "$required_node_ver" ]]; then
+ return 2
+ fi
+ fi
+
+ # Check if npm exists and works using node (not $PATH/npm)
+ if [ ! -x "$npm_bin_path" ]; then
+ return 4
+ fi
+
+ # Use node to run npm.js directly, in case env is broken
+ local npm_version
+ npm_version="$("$node_bin_path" "$npm_bin_path" --version 2>/dev/null)"
+ if [[ -z "$npm_version" ]]; then
+ return 4
+ fi
+
+ return 0
+}
+
+
+# Node.js pre-check. check if we need to install Node.js before installer run.
+# Use postcheck_node_after_install() to check after install.
+check_node_installed() {
+ verify_node_at_path "$node_path"
+ local result=$?
+
+ case $result in
+ 0)
+ cprint green bold "Node.js和npm在 $node_path (版本 $required_node_ver 或兼容)"
+ install_node=false
+ ;;
+ 1)
+ cprint yellow bold "Node.js二进制文件未找到或无法使用 $node_path"
+ install_node=true
+ ;;
+ 2)
+ cprint red bold "Node.js版本 $node_path 太老. 要求: >= $required_node_ver"
+ install_node=true
+ ;;
+ 3)
+ cprint red bold "Node.js版本不匹配。要求: $required_node_ver, 发现了其他的Node.js版本."
+ install_node=true
+ ;;
+ 4)
+ cprint red bold "Node.js存在,但npm缺失或损坏."
+ install_node=true
+ ;;
+ *)
+ cprint red bold "Node验证中出现意外错误."
+ install_node=true
+ ;;
+ esac
+}
+
+# Node.js post-check. check if Node.js is valid after install.
+postcheck_node_after_install() {
+ verify_node_at_path "$node_path"
+ if [[ $? -ne 0 ]]; then
+ cprint red bold "Node.js安装失败或无效 $node_path"
+ return 1
+ else
+ cprint green bold "Node.js的安装和运行在 $node_path"
+ return 0
+ fi
+}
+
+# Install Node.js and check
+install_node() {
+ local archive_name="node-${node_version}-linux-${node_arch}.tar.xz"
+ local target_dir="${node_install_dir}/node-${node_version}-linux-${node_arch}"
+ local archive_path="${node_install_dir}/${archive_name}"
+ local download_url="${node_download_url_base}${node_version}/${archive_name}"
+ local fallback="$node_download_fallback"
+
+ cprint cyan bold "安装Node.js $node_version 架构: $node_arch"
+
+ mkdir -p "$node_install_dir" || {
+ cprint red bold "创建Node安装目录失败: $node_install_dir"
+ return 1
+ }
+
+ # Download
+ cprint cyan "下载Node.js: $download_url"
+ if ! wget --progress=bar:force -O "$archive_path" "$download_url"; then
+ cprint yellow "主下载失败。尝试备用下载……"
+
+ if [[ -n "$fallback" ]]; then
+ if [[ "$fallback" =~ ^https?:// ]]; then
+ cprint cyan "从备用URL下载: $fallback"
+ if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then
+ cprint red bold "备用下载失败: $fallback"
+ return 1
+ fi
+ elif [ -f "$fallback" ]; then
+ cprint cyan "从本地备份进行复制: $fallback"
+ cp "$fallback" "$archive_path" || {
+ cprint red bold "复制备用Node.js存档失败 $fallback"
+ return 1
+ }
+ else
+ cprint red bold "无效的备用路径: $fallback"
+ return 1
+ fi
+ else
+ cprint red bold "没有配置备用源。不能继续进行."
+ return 1
+ fi
+ fi
+
+ # Extract archive
+ cprint cyan "提取Node.js存档..."
+ if ! tar -xf "$archive_path" -C "$node_install_dir"; then
+ cprint red bold "提取Node.js文件失败."
+ return 1
+ fi
+
+ chmod -R a+rx "$target_dir" || {
+ cprint red bold "在Node.js文件上设置执行权限失败."
+ return 1
+ }
+
+ verify_node_at_path "$target_dir"
+ local result=$?
+ if [[ $result -ne 0 ]]; then
+ cprint red bold "Node.js安装验证失败."
+ return 1
+ fi
+
+ cprint cyan "清理文件……"
+ rm -f "$archive_path"
+
+ cprint green bold "Node.js $node_version 安装成功 $target_dir"
+ # Save resolved binary paths to global variables
+ node_bin_path="${target_dir}/bin/node"
+ npm_bin_path="${target_dir}/bin/npm"
+
+ cprint green "Node.js 二进制文件: $node_bin_path"
+ cprint green "npm 二进制文件: $npm_bin_path"
+ return 0
+}
+
+# Function to download MCSM package. fetch from primary URL first, then fallback URL.
+# This function only put extracted file(s) into install_dir, it does not perform the actual update.
+download_mcsm() {
+ local archive_name="$package_name"
+ local archive_path="${tmp_dir}/${archive_name}"
+ local primary_url="${download_base_url}${archive_name}"
+ local fallback="$download_fallback_url"
+
+ cprint cyan bold "下载MCSManager安装包…"
+
+ # Step 1: Try downloading from primary URL
+ if ! wget --progress=bar:force -O "$archive_path" "$primary_url"; then
+ cprint yellow "主下载失败。尝试备用资源…"
+
+ if [[ -z "$fallback" ]]; then
+ cprint red bold "没有指定备用URL或路径."
+ return 1
+ fi
+
+ if [[ "$fallback" =~ ^https?:// ]]; then
+ if ! wget --progress=bar:force -O "$archive_path" "$fallback"; then
+ cprint red bold "备用下载失败 $fallback"
+ return 1
+ fi
+ elif [[ -f "$fallback" ]]; then
+ cp "$fallback" "$archive_path" || {
+ cprint red bold "未能复制备用文件 $fallback"
+ return 1
+ }
+ else
+ cprint red bold "备用路径无效: $fallback"
+ return 1
+ fi
+ fi
+
+ # Step 2: Generate extract directory
+ local suffix
+ suffix=$(tr -dc 'a-z0-9' /dev/null; then
+ cprint green "用户 '$install_user' 已经存在."
+ else
+ cprint cyan "创建系统用户: $install_user (无登录,无密码)..."
+ if ! useradd --system --home "$install_dir" --shell /usr/sbin/nologin "$install_user"; then
+ cprint red bold "创建用户失败: $install_user"
+ exit 1
+ fi
+ cprint green "用户 '$install_user' 已创建."
+ fi
+
+
+ # Docker integration
+ if command -v docker &>/dev/null; then
+ cprint cyan "Docker已被安装 -检查组分配…"
+
+ if getent group docker &>/dev/null; then
+ if id -nG "$install_user" | grep -qw docker; then
+ cprint green "用户 '$install_user' 已经在“docker”组中."
+ else
+ cprint cyan "添加用户 '$install_user' 到 'docker' 组..."
+ if usermod -aG docker "$install_user"; then
+ cprint green "授予的Docker组访问权限 '$install_user'."
+ else
+ cprint red "未能添加 '$install_user' 给“Docker”组。这个用户可能无法使用Docker."
+ fi
+ fi
+ else
+ cprint red "安装了Docker,但没有找到Docker组。跳过组分配."
+ fi
+ else
+ cprint yellow "未安装Docker -跳过Docker组配置."
+ fi
+
+ return 0
+}
+# Function to stop MCSM services if they exist
+stop_mcsm_services() {
+ cprint yellow bold "试图停止mcsm-web和mcsm-daemon服务..."
+
+ # Attempt to stop mcsm-web
+ cprint blue "正在停止 mcsm-web..."
+ if systemctl stop mcsm-web; then
+ cprint green "mcsm-web 已停止."
+ else
+ cprint red bold "警告:未能停止mcsm-web(可能不存在或已停止)."
+ fi
+
+ # Attempt to stop mcsm-daemon
+ cprint blue "正在停止 mcsm-daemon..."
+ if systemctl stop mcsm-daemon; then
+ cprint green "mcsm-daemon 已停止."
+ else
+ cprint red bold "警告:未能停止mcsm-daemon(可能不存在或已停止)."
+ fi
+}
+# Prepare file & permissions before install.
+mcsm_install_prepare() {
+
+ # Stop service if existed
+ stop_mcsm_services
+
+ if [[ ! -d "$install_tmp_dir" ]]; then
+ cprint red bold "临时安装目录不存在: $install_tmp_dir"
+ exit 1
+ fi
+
+ cprint cyan "改变所有权 $install_tmp_dir 到用户 '$install_user'..."
+ chown -R "$install_user":"$install_user" "$install_tmp_dir" || {
+ cprint red bold "所有权变更失败 $install_tmp_dir"
+ cleanup_install_tmp
+ exit 1
+ }
+
+ # Normalize install_dir to ensure it ends with a slash
+ [[ "${install_dir}" != */ ]] && install_dir="${install_dir}/"
+
+ if [[ "$web_installed" == false && "$daemon_installed" == false ]]; then
+ cprint cyan "没有检测到现有组件-跳过数据备份/清理."
+ return 0
+ fi
+
+ cprint green bold "已成功准备现有组件."
+ return 0
+}
+
+# Install or update a component
+install_component() {
+ local component="$1"
+ local target_path="${install_dir}${component}"
+ local backup_data_path="${install_dir}${backup_prefix}${component}"
+ local source_path="${install_tmp_dir}/mcsmanager/${component}"
+
+ cprint cyan bold "安装/更新组件: $component"
+
+ # Step 1: Move new component to install_dir
+ if [[ ! -d "$source_path" ]]; then
+ cprint red bold "找不到源目录: $source_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+
+# [20:49:07] [MCSM Installer] 安装/更新组件: web
+# [20:49:07] [MCSM Installer] 更新的文件 /opt/mcsmanager/mcsm_9gha/mcsmanager/web → /opt/mcsmanager/web
+# [20:49:07] [MCSM Installer] 已移动 web 到 /opt/mcsmanager/web
+ cprint cyan "删除依赖库文件 $target_path/node_modules/"
+ if [[ -d "$target_path/node_modules/" ]]; then
+ rm -rf "$target_path/node_modules/"
+ fi
+
+ if cp -a "$source_path"/. "$target_path"; then
+ cprint green "更新的文件 $source_path → $target_path"
+ rm -rf "$source_path"
+ else
+ cprint red bold "更新文件失败 $source_path → $target_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+ cprint green "已移动 $component 到 $target_path"
+
+
+ # Step 3: Install NPM dependencies
+ if [[ ! -x "$npm_bin_path" ]]; then
+ cprint red bold "找不到npm二进制文件或无法执行: $npm_bin_path"
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ cprint cyan "正在使用npm安装依赖库 $component ..."
+ pushd "$target_path" >/dev/null || {
+ cprint red bold "更改目录失败 $target_path"
+ cleanup_install_tmp
+ exit 1
+ }
+
+
+ if ! "$node_bin_path" "$npm_bin_path" install --registry=https://registry.npmmirror.com --no-audit --no-fund --loglevel=warn; then
+ cprint red bold "NPM依赖项安装失败 $component"
+ popd >/dev/null
+ cleanup_install_tmp
+ exit 1
+ fi
+
+ popd >/dev/null
+ cprint green bold "组件 '$component' 安装/更新成功."
+}
+
+# Create systemd service for a given component.
+# This will overwrite the existing service file.
+create_systemd_service() {
+ local component="$1"
+ local service_path="${systemd_file}${component}.service"
+ local working_dir="${install_dir}${component}"
+ local exec="${node_bin_path} app.js"
+
+ if [[ ! -d "$working_dir" ]]; then
+ cprint red bold "找不到组件目录: $working_dir"
+ cleanup_install_tmp
+ return 1
+ fi
+
+ cprint cyan "创建systemd服务 '$component'..."
+
+ cat > "$service_path" </dev/null | awk '{print $1}')
+ [[ -z "$ip_address" ]] && ip_address="你的IP"
+
+ # Daemon info
+ if [[ "$install_daemon" == true ]]; then
+ local daemon_address="ws://$ip_address:${daemon_port:-Failed to Retrieve from Config file}"
+ local daemon_key_display="${daemon_key:-Failed to Retrieve from Config file}"
+
+ cprint yellow noprefix "守护进程地址:"
+ cprint white noprefix " $daemon_address"
+ cprint yellow noprefix "守护进程秘钥:"
+ cprint white noprefix " $daemon_key_display"
+ echo ""
+ fi
+
+ # Web info
+ if [[ "$install_web" == true ]]; then
+ local web_address="http://$ip_address:${web_port:-Failed to Retrieve from Config file}"
+ cprint yellow noprefix "HTTP面板地址:"
+ cprint white noprefix nonl " $web_address "
+ cprint yellow noprefix "(在你的浏览器中打开)"
+ echo ""
+ fi
+
+ # Port guidance
+ cprint yellow noprefix "注意:"
+ cprint white noprefix " 确保防火墙放行上述端口."
+ cprint white noprefix " 如果从外部网络访问,您可能需要在路由器上配置端口转发."
+ echo ""
+
+ # Service management help
+ cprint yellow noprefix "MCSManager管理命令:"
+ if [[ "$install_daemon" == true ]]; then
+ cprint white noprefix nonl " systemctl start "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl stop "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl restart "
+ cprint yellow noprefix "mcsm-daemon.service"
+ cprint white noprefix nonl " systemctl status "
+ cprint yellow noprefix "mcsm-daemon.service"
+ fi
+ if [[ "$install_web" == true ]]; then
+ cprint white noprefix nonl " systemctl start "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl stop "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl restart "
+ cprint yellow noprefix "mcsm-web.service"
+ cprint white noprefix nonl " systemctl status "
+ cprint yellow noprefix "mcsm-web.service"
+ fi
+ echo ""
+
+ # Official doc
+ cprint yellow noprefix "官方文档:"
+ cprint white noprefix " https://docs.mcsmanager.com/zh_cn/"
+ echo ""
+
+ # HTTPS support
+ cprint yellow noprefix "需要HTTPS?"
+ cprint white noprefix " 为了开启HTTPS安全访问,需要配置反向代理:"
+ cprint white noprefix " https://docs.mcsmanager.com/zh_cn/ops/proxy_https.html"
+ echo ""
+
+ if [[ "$force_permission" == true ]]; then
+ cprint red noprefix "[重点] 您选择在安装期间重写权限."
+ cprint red noprefix " 你可能需要运行: chown -R $install_user 手动更新权限."
+ fi
+
+ # Closing message
+ cprint green noprefix "安装完成。享受使用MCSManager管理服务器的乐趣!"
+ echo ""
+}
+
+install_mcsm() {
+ local components=()
+
+ if [[ "$install_web" == true ]]; then
+ install_component "web"
+ create_systemd_service "web"
+ components+=("web")
+ fi
+
+ if [[ "$install_daemon" == true ]]; then
+ install_component "daemon"
+ create_systemd_service "daemon"
+ components+=("daemon")
+ fi
+
+ # Reload systemd after any service file changes
+ if (( ${#components[@]} > 0 )); then
+ cprint cyan "重新加载systemd守护进程..."
+ # systemctl daemon-reexec
+ systemctl daemon-reload
+
+ for comp in "${components[@]}"; do
+ local svc="mcsm-${comp}.service"
+
+ cprint cyan "启用服务: $svc"
+ if systemctl enable "$svc" &>/dev/null; then
+ cprint green "已启用服务: $svc"
+ else
+ cprint red bold "启用服务失败: $svc"
+ cleanup_install_tmp
+ exit 1
+ fi
+ done
+ fi
+
+ # Clean tmp dir
+ cleanup_install_tmp
+ # Extract installed component info
+ safe_run extract_component_info "未能从已安装的服务中提取运行时信息"
+ safe_run print_install_result "未能打印安装结果"
+
+}
+
+main() {
+ trap 'echo "发生意外错误."; exit 99' ERR
+ safe_run detect_terminal_capabilities "检测终端功能失败"
+ safe_run check_root "脚本必须以root身份运行"
+ safe_run parse_args "解析参数失败" "$@"
+ safe_run detect_os_info "OS检测失败"
+ # To be moved to a master pre check function.
+ safe_run resolve_node_arch "解析Node.js架构失败"
+
+ safe_run check_required_commands "缺少必要的系统命令"
+
+ safe_run check_node_installed "在预期目录上检测到Node.js或npm失败。Node.js将被安装."
+ if [ "$install_node" = true ]; then
+ safe_run install_node "Node.js安装失败"
+ fi
+
+ safe_run permission_barrier "权限验证失败-中止安装"
+
+ safe_run prepare_user "准备用户权限失败。处理步骤."
+
+ safe_run download_mcsm "获取MCSManager源失败。处理步骤"
+ safe_run mcsm_install_prepare "准备安装时出错"
+
+ safe_run install_mcsm "未能安装 MCSManager"
+}
+main "$@"
diff --git a/setup_en.sh b/setup_en.sh
deleted file mode 100644
index dd41f55..0000000
--- a/setup_en.sh
+++ /dev/null
@@ -1,269 +0,0 @@
-#!/bin/bash
-printf "\033c"
-
-error=""
-node="v14.19.1"
-arch=$(uname -m)
-mcsmanager_install_path="/opt/mcsmanager"
-
-Red_Error() {
- echo '================================================='
- printf '\033[1;31;40m%b\033[0m\n' "$@"
- echo '================================================='
- exit 1
-}
-
-echo_red() {
- printf '\033[1;31m%b\033[0m\n' "$@"
-}
-
-echo_green() {
- printf '\033[1;32m%b\033[0m\n' "$@"
-}
-
-echo_cyan() {
- printf '\033[1;36m%b\033[0m\n' "$@"
-}
-
-echo_cyan_n() {
- printf '\033[1;36m%b\033[0m' "$@"
-}
-
-echo_yellow() {
- printf '\033[1;33m%b\033[0m\n' "$@"
-}
-
-Install_Node() {
- echo_cyan_n "[+] Install Node environment... "
-
- rm -irf "$node_install_path"
-
- cd /opt || exit
-
- wget -o /dev/null https://nodejs.org/dist/"$node"/node-"$node"-linux-"$arch".tar.gz
-
- tar -zxf node-"$node"-linux-"$arch".tar.gz
-
- rm -rf node-"$node"-linux-"$arch".tar.gz
-
- if [ -f "$node_install_path"/bin/node ] && [ "$("$node_install_path"/bin/node -v)" == "$node" ]
- then
- echo_green "Success"
- else
- echo_red "Failed"
- Red_Error "[x] Node installation failed!"
- fi
-
- echo
- echo_yellow "=============== Node Version ==============="
- echo_yellow " node: $("$node_install_path"/bin/node -v)"
- echo_yellow " npm: v$(/usr/bin/env "$node_install_path"/bin/node "$node_install_path"/bin/npm -v)"
- echo_yellow "=============== Node Version ==============="
- echo
-
- sleep 3
-}
-
-Install_MCSManager() {
- echo_cyan "[+] Install MCSManager..."
-
- # delete service
- rm -f /etc/systemd/system/mcsm-daemon.service
- rm -f /etc/systemd/system/mcsm-web.service
-
- # reload
- systemctl daemon-reload
-
- # echo "[x] Delete the original MCSManager"
- rm -irf ${mcsmanager_install_path}
-
- # echo "[+] mkdir -p ${mcsmanager_install_path}"
- mkdir -p ${mcsmanager_install_path} || exit
-
- # echo "[→] cd ${mcsmanager_install_path}"
- cd ${mcsmanager_install_path} || exit
-
- echo_cyan "[↓] Git clone MCSManager-Daemon..."
- git clone --single-branch -b master --depth 1 https://github.com/MCSManager/MCSManager-Daemon-Production.git
-
- # echo "[-] mv MCSManager-Daemon-Production daemon"
- mv MCSManager-Daemon-Production daemon
-
- # echo "[→] cd daemon"
- cd daemon || exit
-
- echo_cyan "[+] Install MCSManager-Daemon dependencies..."
- /usr/bin/env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com > error
-
- # echo "[←] cd .."
- cd ..
-
- echo_cyan "[↓] Git clone MCSManager-Web..."
- git clone --single-branch -b master --depth 1 https://github.com/MCSManager/MCSManager-Web-Production.git
-
- # echo "[-] mv MCSManager-Web-Production web"
- mv MCSManager-Web-Production web
-
- # echo "[→] cd web"
- cd web || exit
-
- echo_cyan "[+] Install MCSManager-Web dependencies..."
- /usr/bin/env "$node_install_path"/bin/node "$node_install_path"/bin/npm install --registry=https://registry.npmmirror.com > error
-
- echo
- echo_yellow "=============== MCSManager ==============="
- echo_green " Daemon: ${mcsmanager_install_path}/daemon"
- echo_green " Web: ${mcsmanager_install_path}/web"
- echo_yellow "=============== MCSManager ==============="
- echo
- echo_green "[+] MCSManager installation success!"
-
- sleep 3
-}
-
-Create_Service() {
- echo_cyan "[+] Create MCSManager service..."
-
- echo "
-[Unit]
-Description=MCSManager Daemon
-
-[Service]
-WorkingDirectory=/opt/mcsmanager/daemon
-ExecStart=${node_install_path}/bin/node app.js
-ExecReload=/bin/kill -s HUP $MAINPID
-ExecStop=/bin/kill -s QUIT $MAINPID
-Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-
-[Install]
-WantedBy=multi-user.target
-" > /etc/systemd/system/mcsm-daemon.service
-
- echo "
-[Unit]
-Description=MCSManager Web
-
-[Service]
-WorkingDirectory=/opt/mcsmanager/web
-ExecStart=${node_install_path}/bin/node app.js
-ExecReload=/bin/kill -s HUP $MAINPID
-ExecStop=/bin/kill -s QUIT $MAINPID
-Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-
-[Install]
-WantedBy=multi-user.target
-" > /etc/systemd/system/mcsm-web.service
-
- systemctl daemon-reload
- systemctl enable mcsm-daemon.service --now
- systemctl enable mcsm-web.service --now
-
- sleep 3
-
- printf "\033c"
- echo_yellow "=================================================================="
- echo_green "Welcome to MCSManager, you can access it by the following ways:"
- echo_yellow "=================================================================="
- echo_cyan_n "Daemon Service Address: "; echo_yellow "http://localhost:24444"
- echo_cyan_n "Web Service Address: "; echo_yellow "http://localhost:23333"
- echo_cyan_n "Username: "; echo_yellow "root"
- echo_cyan_n "Password: "; echo_yellow "123456"
- echo_red "You must expose ports 23333 and 24444 to use the service properly on the Internet."
- echo_yellow "=================================================================="
- echo_cyan "systemctl restart mcsm-{daemon,web}.service"
- echo_cyan "systemctl disable mcsm-{daemon,web}.service"
- echo_cyan "systemctl enable mcsm-{daemon,web}.service"
- echo_cyan "systemctl start mcsm-{daemon,web}.service"
- echo_cyan "systemctl stop mcsm-{daemon,web}.service"
- echo_cyan "More info: https://docs.mcsmanager.com/"
- echo_yellow "=================================================================="
-
-
-}
-
-
-# ----------------- Program Start -----------------
-
-# delete the shell script itself
-rm -f "$0"
-
-# Check execute user permissions
-if [ "$(whoami)" != "root" ]; then
- Red_Error "[x] Please execute the MCSManager installation command with root permission!"
-fi
-
-echo_cyan "+----------------------------------------------------------------------
-| MCSManager Installer
-+----------------------------------------------------------------------
-| Copyright © 2022 MCSManager All rights reserved.
-+----------------------------------------------------------------------
-| Shell Install Script by Nuomiaa & CreeperKong
-+----------------------------------------------------------------------
-"
-
-# Environmental inspection
-if [ "$arch" == x86_64 ]; then
- arch=x64
- #echo "[-] x64 architecture detected"
-elif [ $arch == aarch64 ]; then
- arch=arm64
- #echo "[-] 64-bit ARM architecture detected"
-elif [ $arch == arm ]; then
- arch=armv7l
- #echo "[-] 32-bit ARM architecture detected"
-elif [ $arch == ppc64le ]; then
- arch=ppc64le
- #echo "[-] IBM POWER architecture detected"
-elif [ $arch == s390x ]; then
- arch=s390x
- #echo "[-] IBM LinuxONE architecture detected"
-else
- Red_Error "[x] Sorry, this architecture is not supported yet!"
- exit
-fi
-
-# Define the variable Node installation directory
-node_install_path="/opt/node-$node-linux-$arch"
-
-# Check network connection
-echo_cyan "[-] Architecture: $arch"
-
-# MCSManager Installed
-if [ -d "$mcsmanager_install_path" ]; then
- printf "\033c"
- echo_red "----------------------------------------------------
-MCSManager is installed at \"$mcsmanager_install_path\"
-Continuing the installation will delete the original MCSManager!
-----------------------------------------------------
-Installation will continue in 10 seconds, press Ctrl + Z/C to cancel!"
- sleep 10
-fi
-
-# Install related software
-echo_cyan_n "[+] Installing dependent software(git,tar)... "
-if [ -x "$(command -v yum)" ]; then yum install -y git tar > error;
-elif [ -x "$(command -v apt-get)" ]; then apt-get install -y git tar > error;
-elif [ -x "$(command -v pacman)" ]; then pacman -Syu --noconfirm git tar > error;
-elif [ -x "$(command -v zypper)" ]; then zypper --non-interactive install git tar > error;
-fi
-
-# Determine whether the relevant software is installed successfully
-if [[ -x "$(command -v git)" && -x "$(command -v tar)" ]]
- then
- echo_green "Success"
- else
- echo_red "Failed"
- echo "$error"
- Red_Error "[x] Related software installation failed, please install git and tar packages manually!"
- exit
-fi
-
-
-# Install the Node environment
-Install_Node
-
-# Install MCSManager
-Install_MCSManager
-
-# Create MCSManager background service
-Create_Service
diff --git a/setup_macOS.sh b/setup_macOS.sh
new file mode 100644
index 0000000..ebbc02f
--- /dev/null
+++ b/setup_macOS.sh
@@ -0,0 +1,263 @@
+#!/bin/bash
+
+INSTALL_DIR="$(cd "$(dirname "$0")" || exit; pwd -P)"
+MCSM_DIR="$INSTALL_DIR/mcsmanager"
+
+echo "=================================================="
+echo " MCSManager Installation Script (macOS)"
+echo "=================================================="
+echo "Install directory: $INSTALL_DIR"
+echo "Note: Homebrew and Node.js are required."
+echo "=================================================="
+
+echo "Automatically checking and installing required dependencies (brew, node, npm, curl, tar, pm2)..."
+
+if ! command -v brew &> /dev/null; then
+ echo "Homebrew not found, installing Homebrew..."
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+ if [ -x "/opt/homebrew/bin/brew" ]; then
+ eval "$(/opt/homebrew/bin/brew shellenv)"
+ export PATH="/opt/homebrew/bin:$PATH"
+ elif [ -x "/usr/local/bin/brew" ]; then
+ eval "$(/usr/local/bin/brew shellenv)"
+ export PATH="/usr/local/bin:$PATH"
+ fi
+ if ! command -v brew &> /dev/null; then
+ echo "Error: Homebrew installation failed."
+ exit 1
+ fi
+fi
+
+if ! command -v node &> /dev/null; then
+ echo "Node.js not found, installing Node.js via Homebrew..."
+ brew install node
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v node &> /dev/null; then
+ echo "Error: Node.js installation failed."
+ exit 1
+ fi
+fi
+
+if ! command -v npm &> /dev/null; then
+ echo "npm not found, reinstalling Node.js via Homebrew..."
+ brew install node
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v npm &> /dev/null; then
+ echo "Error: npm installation failed."
+ exit 1
+ fi
+fi
+
+if ! command -v curl &> /dev/null; then
+ echo "curl not found, installing curl via Homebrew..."
+ brew install curl
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v curl &> /dev/null; then
+ echo "Error: curl installation failed."
+ exit 1
+ fi
+fi
+
+if ! command -v tar &> /dev/null; then
+ echo "tar not found, installing tar via Homebrew..."
+ brew install tar
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v tar &> /dev/null; then
+ echo "Error: tar installation failed."
+ exit 1
+ fi
+fi
+
+if ! command -v pm2 &> /dev/null; then
+ echo "PM2 not found, installing PM2 globally..."
+ npm install -g pm2
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v pm2 &> /dev/null; then
+ echo "Error: PM2 installation failed. Please run 'npm install -g pm2' manually."
+ exit 1
+ fi
+ echo "PM2 installed successfully."
+else
+ echo "PM2 is already installed."
+fi
+echo "All dependencies checked and installed."
+
+echo "Please select installation mode:"
+echo "1) Install Web Panel + Node (Daemon) (recommended)"
+echo "2) Install Node (Daemon) only"
+read -p "Enter your choice (1 or 2): " choice
+if [[ "$choice" != "1" && "$choice" != "2" ]]; then
+ echo "Invalid input. Please rerun the script and select 1 or 2."
+ exit 1
+fi
+
+echo "Using install directory: $INSTALL_DIR"
+if [ ! -w "$INSTALL_DIR" ]; then
+ echo "Error: $INSTALL_DIR is not writable. Please check permissions."
+ exit 1
+fi
+echo "Directory permission check passed."
+
+MCSM_TAR_URL="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz"
+MCSM_TAR_FILE="$INSTALL_DIR/mcsmanager_linux_release.tar.gz"
+
+echo "Downloading MCSManager Release ($MCSM_TAR_URL) to $MCSM_TAR_FILE"
+curl -L -f "$MCSM_TAR_URL" -o "$MCSM_TAR_FILE"
+if [ $? -ne 0 ]; then
+ echo "Error: Download failed. Please check your network or the URL."
+ exit 1
+fi
+echo "Download successful."
+
+echo "Extracting $MCSM_TAR_FILE to $INSTALL_DIR"
+tar -zxf "$MCSM_TAR_FILE" -C "$INSTALL_DIR"
+if [ $? -ne 0 ]; then
+ echo "Error: Extraction failed."
+ rm -rf "$MCSM_DIR"
+ exit 1
+fi
+
+if [ ! -d "$MCSM_DIR" ]; then
+ echo "Error: Extraction failed. Directory $MCSM_DIR not found."
+ exit 1
+fi
+echo "Extraction successful."
+
+echo "Removing downloaded archive: $MCSM_TAR_FILE"
+rm "$MCSM_TAR_FILE"
+
+echo "Changing to directory: $MCSM_DIR"
+cd "$MCSM_DIR"
+if [ $? -ne 0 ]; then
+ echo "Error: Failed to change directory to $MCSM_DIR."
+ exit 1
+fi
+
+echo "Running ./install.sh to install dependencies..."
+bash ./install.sh
+if [ $? -ne 0 ]; then
+ echo "Error: ./install.sh failed. Please check the output."
+ exit 1
+fi
+echo "Dependency installation completed."
+
+echo "Starting MCSManager processes with PM2..."
+
+echo "Stopping and deleting old PM2 processes (if any)..."
+pm2 stop MCSManager-Daemon &> /dev/null
+pm2 delete MCSManager-Daemon &> /dev/null
+pm2 stop MCSManager-Web &> /dev/null
+pm2 delete MCSManager-Web &> /dev/null
+sleep 1
+
+echo "Starting MCSManager Daemon..."
+pm2 start ./start-daemon.sh --name "MCSManager-Daemon" --output "$MCSM_DIR/daemon_output.log" --error "$MCSM_DIR/daemon_error.log"
+sleep 3
+if ! pm2 status | grep -q "MCSManager-Daemon"; then
+ echo "Error: PM2 failed to start MCSManager-Daemon."
+ pm2 logs MCSManager-Daemon
+ exit 1
+fi
+echo "MCSManager Daemon started with PM2."
+echo "Check Daemon status: pm2 status MCSManager-Daemon"
+echo "Check Daemon logs: pm2 logs MCSManager-Daemon"
+echo "Daemon default port: 24444"
+
+if [ "$choice" == "1" ]; then
+ echo ""
+ echo "Starting MCSManager Web Panel..."
+ pm2 start ./start-web.sh --name "MCSManager-Web" --output "$MCSM_DIR/web_output.log" --error "$MCSM_DIR/web_error.log"
+ sleep 3
+ if ! pm2 status | grep -q "MCSManager-Web"; then
+ echo "Error: PM2 failed to start MCSManager-Web."
+ pm2 logs MCSManager-Web
+ echo "Please check the MCSManager-Web issue manually."
+ else
+ echo "MCSManager Web Panel started with PM2."
+ echo "Check Web status: pm2 status MCSManager-Web"
+ echo "Check Web logs: pm2 logs MCSManager-Web"
+ echo "Web default port: 23333"
+ fi
+fi
+
+echo ""
+echo "Configuring PM2 startup (using launchd)..."
+startup_cmd=$(pm2 startup launchd | grep 'sudo' | sed 's/^.*\(sudo.*\)$/\1/')
+if [ -n "$startup_cmd" ]; then
+ echo "Executing PM2 startup command automatically. Please enter your password below (not visible):"
+ eval $startup_cmd
+ if [ $? -eq 0 ]; then
+ echo "PM2 startup configuration completed automatically."
+ else
+ echo "Failed to execute PM2 startup command automatically. Please run the following command manually:"
+ echo " $startup_cmd"
+ fi
+else
+ echo "Failed to get PM2 startup command automatically. Please run 'pm2 startup launchd' and follow the instructions."
+fi
+
+echo ""
+echo "=================================================="
+if [ "$choice" == "1" ]; then
+ echo " MCSManager Web Panel + Node installation completed!"
+else
+ echo " MCSManager Node (Daemon) installation completed!"
+fi
+echo "=================================================="
+echo "Install directory: $INSTALL_DIR"
+echo ""
+
+GLOBAL_JSON="$MCSM_DIR/daemon/data/Config/global.json"
+if [ -f "$GLOBAL_JSON" ]; then
+ NODE_KEY=$(grep '"key"' "$GLOBAL_JSON" | head -n1 | sed 's/.*"key": *"\([^"]*\)".*/\1/')
+ if [ -n "$NODE_KEY" ]; then
+ echo "Please copy the following remote node key for connecting this node:"
+ echo "Node Key: $NODE_KEY"
+ else
+ echo "Failed to automatically get node key, please check $GLOBAL_JSON manually."
+ fi
+else
+ echo "File $GLOBAL_JSON not found, unable to get node key."
+fi
+
+echo ""
+echo "--- PM2 Command Reference ---"
+echo "Check all MCSManager process status:"
+echo " pm2 status"
+echo ""
+echo "--- Daemon (Node) ---"
+echo "Process name: MCSManager-Daemon"
+echo "Log files: $MCSM_DIR/daemon_output.log, $MCSM_DIR/daemon_error.log"
+echo "Start Daemon: pm2 start MCSManager-Daemon"
+echo "Stop Daemon: pm2 stop MCSManager-Daemon"
+echo "Restart Daemon: pm2 restart MCSManager-Daemon"
+echo "Delete Daemon (remove from PM2): pm2 delete MCSManager-Daemon"
+echo "View Daemon logs: pm2 logs MCSManager-Daemon"
+echo "View Daemon live logs: pm2 logs MCSManager-Daemon --follow"
+echo ""
+
+if [ "$choice" == "1" ]; then
+ echo "--- Web Panel ---"
+ echo "Process name: MCSManager-Web"
+ echo "Log files: $MCSM_DIR/web_output.log, $MCSM_DIR/web_error.log"
+ echo "Start Web: pm2 start MCSManager-Web"
+ echo "Stop Web: pm2 stop MCSManager-Web"
+ echo "Restart Web: pm2 restart MCSManager-Web"
+ echo "Delete Web (remove from PM2): pm2 delete MCSManager-Web"
+ echo "View Web logs: pm2 logs MCSManager-Web"
+ echo "View Web live logs: pm2 logs MCSManager-Web --follow"
+ echo ""
+ echo "Default access: http://localhost:23333"
+fi
+
+echo "--- IMPORTANT: Complete PM2 Startup Setup ---"
+echo "PM2 startup configuration has been attempted automatically. If there are errors, please refer to the command above and run it manually."
+echo "=================================================="
+
+exit 0
+
diff --git a/setup_macOS_cn.sh b/setup_macOS_cn.sh
new file mode 100644
index 0000000..3a71b86
--- /dev/null
+++ b/setup_macOS_cn.sh
@@ -0,0 +1,263 @@
+#!/bin/bash
+
+INSTALL_DIR="$(cd "$(dirname "$0")" || exit; pwd -P)"
+MCSM_DIR="$INSTALL_DIR/mcsmanager"
+
+echo "=================================================="
+echo " MCSManager 安装脚本 (macOS)"
+echo "=================================================="
+echo "安装目录: $INSTALL_DIR"
+echo "注意:需要 Homebrew 和 Node.js 已安装。"
+echo "=================================================="
+
+echo "将自动检测并安装所需依赖 (brew, node, npm, curl, tar, pm2)..."
+
+if ! command -v brew &> /dev/null; then
+ echo "未检测到 Homebrew,正在自动安装 Homebrew..."
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+ if [ -x "/opt/homebrew/bin/brew" ]; then
+ eval "$(/opt/homebrew/bin/brew shellenv)"
+ export PATH="/opt/homebrew/bin:$PATH"
+ elif [ -x "/usr/local/bin/brew" ]; then
+ eval "$(/usr/local/bin/brew shellenv)"
+ export PATH="/usr/local/bin:$PATH"
+ fi
+ if ! command -v brew &> /dev/null; then
+ echo "错误: Homebrew 安装失败。"
+ exit 1
+ fi
+fi
+
+if ! command -v node &> /dev/null; then
+ echo "未检测到 Node.js,正在通过 Homebrew 安装 Node.js..."
+ brew install node
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v node &> /dev/null; then
+ echo "错误: Node.js 安装失败。"
+ exit 1
+ fi
+fi
+
+if ! command -v npm &> /dev/null; then
+ echo "未检测到 npm,正在通过 Homebrew 重新安装 Node.js..."
+ brew install node
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v npm &> /dev/null; then
+ echo "错误: npm 安装失败。"
+ exit 1
+ fi
+fi
+
+if ! command -v curl &> /dev/null; then
+ echo "未检测到 curl,正在通过 Homebrew 安装 curl..."
+ brew install curl
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v curl &> /dev/null; then
+ echo "错误: curl 安装失败。"
+ exit 1
+ fi
+fi
+
+if ! command -v tar &> /dev/null; then
+ echo "未检测到 tar,正在通过 Homebrew 安装 tar..."
+ brew install tar
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v tar &> /dev/null; then
+ echo "错误: tar 安装失败。"
+ exit 1
+ fi
+fi
+
+if ! command -v pm2 &> /dev/null; then
+ echo "未检测到 PM2,正在全局安装 PM2..."
+ npm install -g pm2
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
+ hash -r
+ if ! command -v pm2 &> /dev/null; then
+ echo "错误: PM2 安装失败。请手动运行 'npm install -g pm2'。"
+ exit 1
+ fi
+ echo "PM2 安装成功。"
+else
+ echo "PM2 已安装。"
+fi
+echo "所有依赖检测并安装完成。"
+
+echo "请选择安装模式:"
+echo "1) 安装 Web 面板 + 节点 (Daemon) (推荐)"
+echo "2) 只安装节点 (Daemon)"
+read -p "请输入选项 (1 或 2): " choice
+if [[ "$choice" != "1" && "$choice" != "2" ]]; then
+ echo "无效的输入。请重新运行脚本并选择 1 或 2。"
+ exit 1
+fi
+
+echo "使用安装目录: $INSTALL_DIR"
+if [ ! -w "$INSTALL_DIR" ]; then
+ echo "错误: 脚本所在目录 $INSTALL_DIR 不可写。请检查权限。"
+ exit 1
+fi
+echo "目录权限检查通过。"
+
+MCSM_TAR_URL="https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz"
+MCSM_TAR_FILE="$INSTALL_DIR/mcsmanager_linux_release.tar.gz"
+
+echo "下载 MCSManager Release ($MCSM_TAR_URL) 到 $MCSM_TAR_FILE"
+curl -L -f "$MCSM_TAR_URL" -o "$MCSM_TAR_FILE"
+if [ $? -ne 0 ]; then
+ echo "错误: 下载失败。请检查网络连接或 URL。"
+ exit 1
+fi
+echo "下载成功。"
+
+echo "解压 $MCSM_TAR_FILE 到 $INSTALL_DIR"
+tar -zxf "$MCSM_TAR_FILE" -C "$INSTALL_DIR"
+if [ $? -ne 0 ]; then
+ echo "错误: 解压失败。"
+ rm -rf "$MCSM_DIR"
+ exit 1
+fi
+
+if [ ! -d "$MCSM_DIR" ]; then
+ echo "错误: 解压失败。未找到目录 $MCSM_DIR。"
+ exit 1
+fi
+echo "解压成功。"
+
+echo "移除下载的压缩包: $MCSM_TAR_FILE"
+rm "$MCSM_TAR_FILE"
+
+echo "切换到目录: $MCSM_DIR"
+cd "$MCSM_DIR"
+if [ $? -ne 0 ]; then
+ echo "错误: 无法切换到目录 $MCSM_DIR。"
+ exit 1
+fi
+
+echo "运行 ./install.sh 安装依赖..."
+bash ./install.sh
+if [ $? -ne 0 ]; then
+ echo "错误: ./install.sh 运行失败。请检查输出信息。"
+ exit 1
+fi
+echo "依赖安装步骤完成。"
+
+echo "使用 PM2 启动 MCSManager 进程..."
+
+echo "停止并删除旧的 PM2 进程 (如果存在)..."
+pm2 stop MCSManager-Daemon &> /dev/null
+pm2 delete MCSManager-Daemon &> /dev/null
+pm2 stop MCSManager-Web &> /dev/null
+pm2 delete MCSManager-Web &> /dev/null
+sleep 1
+
+echo "启动 MCSManager Daemon..."
+pm2 start ./start-daemon.sh --name "MCSManager-Daemon" --output "$MCSM_DIR/daemon_output.log" --error "$MCSM_DIR/daemon_error.log"
+sleep 3
+if ! pm2 status | grep -q "MCSManager-Daemon"; then
+ echo "错误: PM2 未能成功启动 MCSManager-Daemon。"
+ pm2 logs MCSManager-Daemon
+ exit 1
+fi
+echo "MCSManager Daemon 已通过 PM2 启动。"
+echo "查看 Daemon 状态: pm2 status MCSManager-Daemon"
+echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon"
+echo "Daemon 默认监听端口: 24444"
+
+if [ "$choice" == "1" ]; then
+ echo ""
+ echo "启动 MCSManager Web 面板..."
+ pm2 start ./start-web.sh --name "MCSManager-Web" --output "$MCSM_DIR/web_output.log" --error "$MCSM_DIR/web_error.log"
+ sleep 3
+ if ! pm2 status | grep -q "MCSManager-Web"; then
+ echo "错误: PM2 未能成功启动 MCSManager-Web。"
+ pm2 logs MCSManager-Web
+ echo "请手动检查 MCSManager-Web 的问题。"
+ else
+ echo "MCSManager Web 面板已通过 PM2 启动。"
+ echo "查看 Web 状态: pm2 status MCSManager-Web"
+ echo "查看 Web 日志: pm2 logs MCSManager-Web"
+ echo "Web 默认监听端口: 23333"
+ fi
+fi
+
+echo ""
+echo "配置 PM2 自启动 (使用 launchd)..."
+startup_cmd=$(pm2 startup launchd | grep 'sudo' | sed 's/^.*\(sudo.*\)$/\1/')
+if [ -n "$startup_cmd" ]; then
+ echo "自动执行 PM2 自启动命令 请在下方输入密码(非明文)"
+ eval $startup_cmd
+ if [ $? -eq 0 ]; then
+ echo "PM2 自启动配置已自动完成。"
+ else
+ echo "自动执行 PM2 自启动命令失败,请手动执行以下命令:"
+ echo " $startup_cmd"
+ fi
+else
+ echo "未能自动获取 PM2 自启动命令,请手动运行 'pm2 startup launchd' 并按提示操作。"
+fi
+
+echo ""
+echo "=================================================="
+if [ "$choice" == "1" ]; then
+ echo " MCSManager Web 面板 + 节点 安装完成!"
+else
+ echo " MCSManager 节点 (Daemon) 安装完成!"
+fi
+echo "=================================================="
+echo "安装目录: $INSTALL_DIR"
+echo ""
+
+GLOBAL_JSON="$MCSM_DIR/daemon/data/Config/global.json"
+if [ -f "$GLOBAL_JSON" ]; then
+ NODE_KEY=$(grep '"key"' "$GLOBAL_JSON" | head -n1 | sed 's/.*"key": *"\([^"]*\)".*/\1/')
+ if [ -n "$NODE_KEY" ]; then
+ echo "请及时复制以下远程节点密钥,用于连接节点:"
+ echo "节点 Key: $NODE_KEY"
+ else
+ echo "未能自动获取节点 Key,请手动查看 $GLOBAL_JSON"
+ fi
+else
+ echo "未找到 $GLOBAL_JSON,无法获取节点 Key。"
+fi
+
+echo ""
+echo "--- PM2 控制命令参考 ---"
+echo "查看所有 MCSManager 进程状态:"
+echo " pm2 status"
+echo ""
+echo "--- Daemon (节点) ---"
+echo "进程名: MCSManager-Daemon"
+echo "日志文件: $MCSM_DIR/daemon_output.log, $MCSM_DIR/daemon_error.log"
+echo "启动 Daemon: pm2 start MCSManager-Daemon"
+echo "停止 Daemon: pm2 stop MCSManager-Daemon"
+echo "重启 Daemon: pm2 restart MCSManager-Daemon"
+echo "删除 Daemon (从 PM2 列表移除): pm2 delete MCSManager-Daemon"
+echo "查看 Daemon 日志: pm2 logs MCSManager-Daemon"
+echo "查看 Daemon 实时日志: pm2 logs MCSManager-Daemon --follow"
+echo ""
+
+if [ "$choice" == "1" ]; then
+ echo "--- Web 面板 ---"
+ echo "进程名: MCSManager-Web"
+ echo "日志文件: $MCSM_DIR/web_output.log, $MCSM_DIR/web_error.log"
+ echo "启动 Web: pm2 start MCSManager-Web"
+ echo "停止 Web: pm2 stop MCSManager-Web"
+ echo "重启 Web: pm2 restart MCSManager-Web"
+ echo "删除 Web (从 PM2 列表移除): pm2 delete MCSManager-Web"
+ echo "查看 Web 日志: pm2 logs MCSManager-Web"
+ echo "查看 Web 实时日志: pm2 logs MCSManager-Web --follow"
+ echo ""
+ echo "默认访问地址: http://localhost:23333"
+fi
+
+echo "--- 重要:完成自启动设置 ---"
+echo "PM2 自启动配置已自动尝试执行。若有报错,请参考上方命令手动执行。"
+echo "=================================================="
+
+exit 0
+
diff --git a/templates.json b/templates.json
new file mode 100644
index 0000000..d57e51e
--- /dev/null
+++ b/templates.json
@@ -0,0 +1,2039 @@
+{
+ "remark": "This file is only used for quick deployment.",
+ "languages": [
+ {
+ "label": "English",
+ "value": "en_us"
+ },
+ {
+ "label": "简体中文",
+ "value": "zh_cn"
+ }
+ ],
+ "packages": [
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.11",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "55MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.11-2538.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.11-2538.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.10",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "55MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.10-2535.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.10-2535.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.8",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "55MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.8-2496.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.8-2496.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.6 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.6",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "55MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.6-2465.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.6-2465.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.4",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.4-2416.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.4-2416.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.3 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.3",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.3-2358.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.3-2358.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 Purpur Quick Server Setup, High Performance, Low Resource Usage, Plugin Support, No Mod Support",
+ "title": "[PurpurMC] Minecraft 1.21.1",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.21.1-2329.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.21.1-2329.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Purpur] Minecraft 1.20.6 Purpur",
+ "title": "[PurpurMC] Minecraft 1.20.6",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.6-2233.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.6-2233.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Purpur] Minecraft 1.20.4 Purpur",
+ "title": "[PurpurMC] Minecraft 1.20.4",
+ "category": "mc-purpur",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.4-2176.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.4-2176.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Purpur] Minecraft 1.20.1 Purpur",
+ "title": "[PurpurMC] Minecraft 1.20.1",
+ "category": "mc-purpur",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.20.1-2062.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.20.1-2062.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Purpur] Minecraft 1.19.2 Purpur",
+ "title": "[PurpurMC] Minecraft 1.19.2",
+ "category": "mc-purpur",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.19.2-1858.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.19.2-1858.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Purpur] Minecraft 1.18.2 Purpur",
+ "title": "[PurpurMC] Minecraft 1.18.2",
+ "category": "mc-purpur",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Purpur included",
+ "targetLink": "https://github.com/SkyKingPX/MCSManagerServerSoftware/releases/download/PurpurMC/purpur-1.18.2-1632.jar",
+ "author": "purpurmc.org",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/purpur",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar purpur-1.18.2-1632.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.11 Paper",
+ "title": "[PaperMC] Minecraft 1.21.11",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.11/builds/39/downloads/paper-1.21.11-39.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.11-39.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.10 Paper",
+ "title": "[PaperMC] Minecraft 1.21.10",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.10/builds/117/downloads/paper-1.21.10-117.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.10-117.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.8 Paper",
+ "title": "[PaperMC] Minecraft 1.21.8",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.6 Paper",
+ "title": "[PaperMC] Minecraft 1.21.6",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.6-48.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.4 Paper",
+ "title": "[PaperMC] Minecraft 1.21.4",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.3 Paper",
+ "title": "[PaperMC] Minecraft 1.21.3",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.1 Paper",
+ "title": "[PaperMC] Minecraft 1.21.1",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.20.6 Paper",
+ "title": "[PaperMC] Minecraft 1.20.6",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.20.4 Paper",
+ "title": "[PaperMC] Minecraft 1.20.4",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.20.1 Paper",
+ "title": "[PaperMC] Minecraft 1.20.1",
+ "category": "mc-paper",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "200MB",
+ "remark": "Includes some basic plugins",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.21.11",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.11.8-beta/neoforge-21.11.8-beta-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.11.8-beta-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.21.10",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.10.64/neoforge-21.10.64-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.10.64-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.21.8",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.8.47/neoforge-21.8.47-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.8.47-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.21.6",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.6.20-beta/neoforge-21.6.20-beta-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.6.20-beta-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.21.5",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.5.95/neoforge-21.5.95-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.5.95-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.21.4",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.4.154/neoforge-21.4.154-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.4.154-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.21.1",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.209/neoforge-21.1.209-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-21.1.209-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.20.6",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.6.138/neoforge-20.6.138-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-20.6.138-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[NeoForge] Minecraft 1.20.4",
+ "category": "mc-neoforge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft NeoForge",
+ "targetLink": "https://maven.neoforged.net/releases/net/neoforged/neoforge/20.4.250/neoforge-20.4.250-installer.jar",
+ "author": "neoforged.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar neoforge-20.4.250-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.21.11",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.0.3/forge-1.21.11-61.0.3-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.11-61.0.3-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.21.10",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.10-60.1.5/forge-1.21.10-60.1.5-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.10-60.1.5-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.21.8",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.8-58.1.1/forge-1.21.8-58.1.1-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.8-58.1.1-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.21.6",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.6-56.0.9/forge-1.21.6-56.0.9-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.6-56.0.9-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.21.5",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.5-55.1.0/forge-1.21.5-55.1.0-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.5-55.1.0-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.21.4",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.4-54.1.6/forge-1.21.4-54.1.6-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.4-54.1.6-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.21.1",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.3/forge-1.21.1-52.1.3-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.21.1-52.1.3-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.20.6",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.1/forge-1.20.6-50.2.1-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.6-50.2.1-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.20.4",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.4-49.2.0/forge-1.20.4-49.2.0-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.4-49.2.0-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.20.1",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.4/forge-1.20.1-47.4.4-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.1-47.4.4-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.19.4",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.4.0/forge-1.19.4-45.4.0-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.19.4-45.4.0-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.18.2",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.9/forge-1.18.2-40.3.9-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.18.2-40.3.9-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.17.1",
+ "category": "mc-forge",
+ "runtime": "Java 16+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.17.1-37.1.1/forge-1.17.1-37.1.1-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.17.1-37.1.1-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.16.5",
+ "category": "mc-forge",
+ "runtime": "Java 8+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.16.5-36.2.42/forge-1.16.5-36.2.42-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.16.5-36.2.42-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.12.2",
+ "category": "mc-forge",
+ "runtime": "Java 8+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.12.2-14.23.5.2860/forge-1.12.2-14.23.5.2860-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.12.2-14.23.5.2860-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.8.9",
+ "category": "mc-forge",
+ "runtime": "Java 7+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.8.9-11.15.1.2318-1.8.9/forge-1.8.9-11.15.1.2318-1.8.9-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.8.9-11.15.1.2318-1.8.9-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Tip: The default startup command is \"sh ./run.sh\". If you need to run it on Windows, please change start command to \"run.bat\" after installation.",
+ "title": "[Forge] Minecraft 1.7.10",
+ "category": "mc-forge",
+ "runtime": "Java 7+",
+ "hardware": "RAM 8G+",
+ "size": "5MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.7.10-10.13.4.1614-1.7.10-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.11 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.21.11",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.11 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.10 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.21.10",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.10 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.8 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.21.8",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.8 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.6 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.21.6",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.6 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.5 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.21.5",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.5 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.4 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.21.4",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.4 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.21.1 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.21.1",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.21.1 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.20.6 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.20.6",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.20.6 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.20.4 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.20.4",
+ "category": "mc-fabric",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.20.4 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.20.1 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.20.1",
+ "category": "mc-fabric",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.20.1 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.19.4 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.19.4",
+ "category": "mc-fabric",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.19.4 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.18.2 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.18.2",
+ "category": "mc-fabric",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.18.2 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.17.1 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.17.1",
+ "category": "mc-fabric",
+ "runtime": "Java 16+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.17.1 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "Minecraft 1.16.5 with Fabric Loader",
+ "title": "[FabricMC] Minecraft 1.16.5",
+ "category": "mc-fabric",
+ "runtime": "Java 8+",
+ "hardware": "RAM 4G+",
+ "size": "5MB",
+ "remark": "Minecraft Fabric",
+ "targetLink": "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.1.0/fabric-installer-1.1.0.jar",
+ "author": "fabricmc.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/fabric",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar fabric-server-launch.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar fabric-installer-1.1.0.jar server -mcversion 1.16.5 -downloadMinecraft -noprofile",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.21.11",
+ "title": "[Vanilla] Minecraft 1.21.11",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/64bb6d763bed0a9f1d632ec347938594144943ed/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.21.10",
+ "title": "[Vanilla] Minecraft 1.21.10",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/95495a7f485eedd84ce928cef5e223b757d2f764/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.21.8",
+ "title": "[Vanilla] Minecraft 1.21.8",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/6bce4ef400e4efaa63a13d5e6f6b500be969ef81/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.21.6",
+ "title": "[Vanilla] Minecraft 1.21.6",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/6e64dcabba3c01a7271b4fa6bd898483b794c59b/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.21.5",
+ "title": "[Vanilla] Minecraft 1.21.5",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/e6ec2f64e6080b9b5d9b471b291c33cc7f509733/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.21.4",
+ "title": "[Vanilla] Minecraft 1.21.4",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "55MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.21.1",
+ "title": "[Vanilla] Minecraft 1.21.1",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "50MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.20.6",
+ "title": "[Vanilla] Minecraft 1.20.6",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "50MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.20.4",
+ "title": "[Vanilla] Minecraft 1.20.4",
+ "category": "mc-vanilla",
+ "runtime": "Java 21+",
+ "hardware": "RAM 2G+",
+ "size": "50MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/8dd1a28015f51b1803213892b50b7b4fc76e594d/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.20.1",
+ "title": "[Vanilla] Minecraft 1.20.1",
+ "category": "mc-vanilla",
+ "runtime": "Java 17+",
+ "hardware": "RAM 2G+",
+ "size": "50MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.19.4",
+ "title": "[Vanilla] Minecraft 1.19.4",
+ "category": "mc-vanilla",
+ "runtime": "Java 17+",
+ "hardware": "RAM 2G+",
+ "size": "50MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.18.2",
+ "title": "[Vanilla] Minecraft 1.18.2",
+ "category": "mc-vanilla",
+ "runtime": "Java 17+",
+ "hardware": "RAM 2G+",
+ "size": "45MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.17.1",
+ "title": "[Vanilla] Minecraft 1.17.1",
+ "category": "mc-vanilla",
+ "runtime": "Java 16+",
+ "hardware": "RAM 2G+",
+ "size": "45MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.16.5",
+ "title": "[Vanilla] Minecraft 1.16.5",
+ "category": "mc-vanilla",
+ "runtime": "Java 8+",
+ "hardware": "RAM 2G+",
+ "size": "45MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.12.2",
+ "title": "[Vanilla] Minecraft 1.12.2",
+ "category": "mc-vanilla",
+ "runtime": "Java 8+",
+ "hardware": "RAM 2G+",
+ "size": "30MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://piston-data.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Vanilla] Minecraft 1.8.9",
+ "title": "[Vanilla] Minecraft 1.8.9",
+ "category": "mc-vanilla",
+ "runtime": "Java 7+",
+ "hardware": "RAM 2G+",
+ "size": "10MB",
+ "remark": "Minecraft Java",
+ "targetLink": "https://launcher.mojang.com/v1/objects/b58b2ceb36e01bcd8dbf49c8fb66c55a9f0676cd/server.jar",
+ "author": "Mojang Studios",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms2048M -Xmx2048M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.1 快速开服",
+ "title": "[PaperMC] Minecraft 1.20.1",
+ "category": "mc-paper",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "250MB",
+ "remark": "包含基础插件,萌新快速开服!低配机器专属!",
+ "targetLink": "https://cloud.alongw.cn/f/DzvHK/Paper-1.21.1-ZH.zip",
+ "author": "alongw.cn",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "description": "[Paper] 中小型互通服推荐,1.20.4 版本,快速开服,包含ESS、锁箱子、操作回滚、领地商店等基础插件。",
+ "title": "[PaperPC] Minecraft 1.20.4 (低配机器推荐)",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 6G+",
+ "size": "140MB",
+ "remark": "支持插件,最低 8GB 内存要求",
+ "targetLink": "https://url.alww.top/mcsm/paper1.20.4.zip",
+ "author": "alongw.cn",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java",
+ "startCommand": "java -Xms6144M -Xmx6144M -jar server.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.8 Paper",
+ "title": "[PaperMC] Minecraft 1.21.8",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/60/downloads/paper-1.21.8-60.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.8-60.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.6 Paper",
+ "title": "[PaperMC] Minecraft 1.21.6",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.6/builds/48/downloads/paper-1.21.6-48.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.6-48.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.4 Paper",
+ "title": "[PaperMC] Minecraft 1.21.4",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/232/downloads/paper-1.21.4-232.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.4-232.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.3 Paper",
+ "title": "[PaperMC] Minecraft 1.21.3",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.3/builds/82/downloads/paper-1.21.3-82.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.3-82.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.21.1 Paper",
+ "title": "[PaperMC] Minecraft 1.21.1",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/132/downloads/paper-1.21.1-132.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.21.1-132.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.20.6 Paper",
+ "title": "[PaperMC] Minecraft 1.20.6",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/151/downloads/paper-1.20.6-151.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.6-151.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.20.4 Paper",
+ "title": "[PaperMC] Minecraft 1.20.4",
+ "category": "mc-paper",
+ "runtime": "Java 21+",
+ "hardware": "RAM 4G+",
+ "size": "50MB",
+ "remark": "Only Paper included",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/499/downloads/paper-1.20.4-499.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.4-499.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.20.2 Paper",
+ "title": "[PaperMC] Minecraft 1.20.2",
+ "category": "mc-paper",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "150MB",
+ "remark": "Includes some basic plugins",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.2-318.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "en_us",
+ "gameType": "Minecraft",
+ "description": "[Paper] Minecraft 1.20.1 Paper",
+ "title": "[PaperMC] Minecraft 1.20.1",
+ "category": "mc-paper",
+ "runtime": "Java 17+",
+ "hardware": "RAM 4G+",
+ "size": "200MB",
+ "remark": "Includes some basic plugins",
+ "targetLink": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar",
+ "author": "papermc.io",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/paper",
+ "startCommand": "java -Xms4096M -Xmx4096M -jar paper-1.20.1-196.jar nogui",
+ "stopCommand": "stop",
+ "updateCommand": "",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"",
+ "title": "[Forge] Minecraft 1.20.1 Java 版 (支持模组)",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.33/forge-1.20.1-47.3.33-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.1-47.3.33-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"",
+ "title": "[Forge] Minecraft 1.20.6 Java 版 (支持模组)",
+ "category": "mc-forge",
+ "runtime": "Java 21+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.1.48/forge-1.20.6-50.1.48-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.20.6-50.1.48-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ },
+ {
+ "language": "zh_cn",
+ "gameType": "Minecraft",
+ "description": "注意:默认的启动命令是 \"sh ./run.sh\",如果需要在 Windows 上运行,请在安装后将命令修改为 \"start.bat\"",
+ "title": "[Forge] Minecraft 1.19.2 Java 版 (支持模组)",
+ "category": "mc-forge",
+ "runtime": "Java 17+",
+ "hardware": "RAM 8G+",
+ "size": "7MB",
+ "remark": "Minecraft Forge",
+ "targetLink": "https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.20/forge-1.19.2-43.4.20-installer.jar",
+ "author": "minecraftforge.net",
+ "image": "https://mcsmanager.oss-cn-guangzhou.aliyuncs.com/package-images/minecraft.webp",
+ "setupInfo": {
+ "type": "minecraft/java/forge",
+ "startCommand": "sh ./run.sh",
+ "stopCommand": "stop",
+ "updateCommand": "java -jar forge-1.19.2-43.4.20-installer.jar --installServer",
+ "ie": "utf-8",
+ "oe": "utf-8"
+ }
+ }
+ ]
+}
diff --git a/update_gbk.bat b/update_gbk.bat
deleted file mode 100644
index dfe249c..0000000
--- a/update_gbk.bat
+++ /dev/null
@@ -1,47 +0,0 @@
-@echo off
-
-Title MCSManager-Web �Զ�����
-
-color 9
-echo ######################################################
-echo # #
-echo # MCSManager-Web �Զ����� #
-echo # by Ŵ��(nuomiaa) #
-echo # #
-echo ######################################################
-echo.
-echo [-] ��� Git �Ƿ�װ...
-
-for /F %%i in ('git --version') ^
-do (
- set vars1=%%i
-)
-
-echo.
-
-if "%vars1%"=="git" (
- echo [-] Git �Ѱ�װ
- echo.
-
- echo [-] ��ʼ�� Git
- git init
- git remote add origin https://github.com.cnpmjs.org/mcsmanager/mcsmanager-web-production.git
- git fetch --all
- git reset --hard origin/master
- echo.
-
- echo [-] ������ȡ���°汾...
- git pull origin master
-
- echo [-] ������ɣ�
-) else (
- echo [x] Git δ��װ������ʹ�� winget ��װ...
- winget install --id Git.Git -e --source winget
-
- color 4
- echo [-] ��װ�����ѽ��������������нű���鰲װ��
- echo [-] �� Git ��װʧ�ܣ����ֶ���װ Git: https://git-scm.com/download/win
-)
-
-
-pause
\ No newline at end of file