Building Wings
Compile Wings from its source code.
Introduction
Wings is written in Go, so you may change its source code and compile your own binary. This guide shows how to build it. It does not explain Wings' code; you need to know Go to change it.
Build and test your binary on a development machine before you use it on a node that runs servers for other people.
Requirements
You need Git, and Go at the version shown on the go line of Wings' go.mod file, or newer. Follow Go's installation instructions.
Wings only runs on Linux. Building on Linux is the simplest way to get a working binary.
Building
Download the source code, and build Wings from it:
git clone https://github.com/pterodactyl/wings.git
cd wings
go build -o wings wings.goThis creates a wings binary in the current directory. It is built for the machine you build on. To build for a node with a different CPU, set GOARCH, for example GOOS=linux GOARCH=arm64 go build -o wings wings.go.
Installing Your Binary
Keep a copy of the current binary, so that you can go back to it:
systemctl stop wings
mv /usr/local/bin/wings /usr/local/bin/wings-backup
cp ./wings /usr/local/bin/wings
chmod u+x /usr/local/bin/wings
systemctl start wingsIf Wings does not start, stop the service and run Wings in the foreground to see its errors:
systemctl stop wings
wings --debugTo go back to the original binary, move wings-backup back to /usr/local/bin/wings, and start the service again.