A robust, "set-and-forget" wrapper script designed for Pterodactyl Minecraft servers. It automatically handles plugin updates, manages rolling backups, and safeguards your data before the server starts.
Originally created for AfterLands Project. Support Discord: https://discord.gg/qGqRxx3V2J
- Smart Plugin Updating: Detects new
.jarfiles in theauto-updaterfolder. - Strict Identity Matching: Differentiates between similar plugins (e.g.,
Plugin-v1.jarvsPluginAddon-v1.jar) using regex, preventing accidental deletions. - Automatic Backups: Before updating any plugin, a backup of the old version is created.
- Rolling Retention: Automatically deletes backup folders older than 3 days (configurable) to save disk space.
- Self-Updating Script: The script can update itself from this repository (optional toggle for safety).
- Java Flag Management: Configure memory and Java flags directly within the script variables.
- Crash Prevention: Uses
execto seamlessly pass control to Java, preventing Pterodactyl container crashes.
The script automatically manages this structure:
/home/container/
├── plugins/ # Your active plugins
├── auto-updater/ # Drop new updates here (Auto-created)
├── backups-plugins/ # Backups stored by date (Auto-created)
│ ├── 2023-10-27/
│ │ └── WorldEdit-2023-10-27_15-30.jar
│ └── ...
└── auto_update.sh # This script
- Download
auto_update.shand upload it to the root directory of your server (/home/container). - Go to the Startup tab in your Pterodactyl panel.
- Change the Startup Command to:
bash auto_update.sh
- Restart the server.
Open auto_update.sh to edit these variables at the top of the file:
| Variable | Description | Default |
|---|---|---|
ENABLE_SELF_UPDATE |
Set to "true" to allow the script to update itself from GitHub. |
"false" |
BACKUP_RETENTION_DAYS |
Number of days to keep plugin backups. | 3 |
JAVA_FLAGS |
Java arguments (Memory, GC, Terminal). | -Xms128M... |
REMOTE_URL |
The Raw GitHub URL for self-updates. | https://github.com/IceGames23/ptero-plugin-updater/ |
- Upload the new version of your plugins (e.g.,
EssentialsX-2.20.jar) into theauto-updaterfolder. - Restart the server.
- Done!
- The script detects the update.
- Identifies the old
EssentialsXin your plugins folder. - Backups the old version.
- Installs the new version.
- Starts the server.
- Developed by: IceGames
- Powered by: AfterLands
- Support Discord: https://discord.gg/qGqRxx3V2J
This project is licensed under the MIT License - see the LICENSE file for details.