:warning:Pterodactly just introduced the feature "return to the latest powerstate of a server" so this script is basically useless now.:warning:
Please use the new feature in pterodactyl: https://github.com/pterodactyl/panel/issues/136#issuecomment-557996853
This bash script auto start (at boot for example) the servers in Pterodactyl that have alwaysStart
in their description.
baseURL
: The URL of your Pterodactyl panel + /api
. Example: https://your.pterodactyl.panel/api
apiToken
: The token generated from the Account API page./opt/pterodactylAutoStart
directory using:
sudo git clone https://github.com/Alteiria/pterodactylAutoStart.git /opt/pterodactylAutoStart
sudo wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O /usr/bin/jq
sudo chmod +x /usr/bin/jq
sudo mv /opt/pterodactylAutoStart/pterodactylAutoStart.service /etc/systemd/system/pterodactylAutoStart.service
baseURL
and apiToken
:sudo nano /etc/systemd/system/pterodactylAutoStart.service
Note: Make sure to follow the Requirements section for the two environment variables!
sudo systemctl enable pterodactylAutoStart
On your Pterodactyl panel, edit the description of every server that you wish to auto start by simply adding alwaysStart
in their description. Watchout for the capitalized in the second s
!
Screenshot of one of my server that auto start:
sudo systemctl start pterodactylAutoStart
sudo journalctl -u pterodactylAutoStart
If you see some text or errors please open a new issue.