Skip to content

Instantly share code, notes, and snippets.

@NotYusta
Last active March 2, 2024 09:44
Show Gist options
  • Save NotYusta/77c998832676310b53761adb0c3546c7 to your computer and use it in GitHub Desktop.
Save NotYusta/77c998832676310b53761adb0c3546c7 to your computer and use it in GitHub Desktop.
Install Pterodactyl Wings & Docker
#!/bin/sh
WINGS_SYSTEMD_FILE="/etc/systemd/system/wings.service"
WINGS_SYSTEMD="\
[Unit]
Description=Pterodactyl Wings Daemon
After=docker.service
Requires=docker.service
PartOf=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=180
StartLimitBurst=30
RestartSec=5s
[Install]
WantedBy=multi-user.target"
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo mkdir -p /etc/pterodactyl
curl -L -o /usr/local/bin/wings "https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")"
sudo chmod u+x /usr/local/bin/wings
if ! [ -f "$WINGS_SYSTEMD_FILE" ]; then
touch "$WINGS_SYSTEMD_FILE"
else
rm -rfv "$WINGS_SYSTEMD_FILE"
touch "$WINGS_SYSTEMD_FILE"
fi
echo "$WINGS_SYSTEMD" | sudo tee -a "$WINGS_SYSTEMD_FILE"
systemctl daemon-reload
systemctl enable wings docker --now
systemctl stop wings
systemctl start wings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment