本指南適用於希望從舊 Node.JS 守護程序遷移到 Wings 的人。請參閱 install guide 如果您第一次嘗試安裝 Wings 一個新節點。
::: 危險面板版本要求 您必須執行 Pterodactyl Panel 1.X 才能使用 Wings。 :::
執行此過程時,您將有短暫的離線時間,但不會運行遊戲進程 會受到影響。另外,在此期間您的面板可能會離線(或處於維護模式) 因此您的用戶不應該注意到任何異常情況。
安裝守護程序的第一步是確保我們具有所需的目錄結構設定。為此, 運行下面的命令將建立基本目錄並下載wings可執行檔。
mkdir -p /etc/pterodactyl
curl -L -o /usr/local/bin/wings https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_amd64
chmod u+x /usr/local/bin/wings
安裝 Wings 後,您需要從面板複製新的設定檔。這個文件 採用新格式,未來應該更容易管理和編輯。
只需複製並貼上程式碼區塊,然後將其貼上到 /etc/pterodactyl 內名為 config.yml 的檔案中
目錄並保存。

::: 警告 請注意,您先前對配置所做的任何修改都會隨之遺失。如果你有 修改我們的預設設置,最好的選擇是使用複製的配置啟動 Wings 一次 然後將填入所有其他配置設定。
從那裡您可以根據需要進行任何調整。 :::
現在 Wings 已安裝,我們需要從伺服器中刪除所有舊的守護程式程式碼,因為它沒有被使用
不再用了。為此,只需執行以下命令 - 假設您的舊守護程序處於預設狀態
/srv/daemon 目錄。
# Stop the old daemon.
systemctl stop wings
# Delete the entire directory. There is nothing stored in here that we actually need for the
# purposes of this migration. Remember, server data is stored in /srv/daemon-data.
rm -rf /srv/daemon
# Optionally, remove NodeJS from your system if it was not used for anything else.
apt -y remove nodejs # or: yum remove nodejs
如果您已將 standalone SFTP server 與舊守護程式一起使用,我們還需要刪除它的 systemd 服務,因為不再需要它。 您可以使用以下命令來執行此操作。
# stop and disable the standalone sftp
systemctl disable --now pterosftp
# delete the systemd service
rm /etc/systemd/system/pterosftp.service
然後,您需要編輯現有的 systemd 服務文件,以便 Wings 指向新的控制軟體。要做的事
開啟 /etc/systemd/system/wings.service 並將檔案的全部內容替換為以下內容:
[Unit]
Description=Pterodactyl Wings Daemon
After=docker.service
[Service]
User=root
WorkingDirectory=/etc/pterodactyl
LimitNOFILE=4096
PIDFile=/var/run/wings/daemon.pid
ExecStart=/usr/local/bin/wings
Restart=on-failure
StartLimitInterval=600
[Install]
WantedBy=multi-user.target
然後,開始翅膀。
systemctl daemon-reload
systemctl enable --now wings
::: 警告 如果 Wings 沒有啟動怎麼辦? 如果此時啟動 Wings 遇到問題,請執行以下指令直接啟動 Wings 並檢查 對於任何特定的錯誤輸出。
sudo wings --debug
:::