The Pterodactyl Backup Manager GitHub Action creates a backup on the Pterodactyl panel with automatic rotation. This action ensures that your server backups are always up-to-date and old backups are rotated out to save space.
panel-url(required): The URL of the Pterodactyl panel.server-id(required): The ID of the server to backup.api-key(required): The Pterodactyl API key.headers(optional): Extra headers as a JSON object or as lines formatted likeHeader: Value.
backup-uuid: The UUID of the created backup.
To use this action, create a workflow YAML file in your repository's
.github/workflows directory. Here is an example:
name: Create Pterodactyl Backup
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
jobs:
backup:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create Pterodactyl Backup
uses: maxouxax/pterodactyl-create-backup-action@v1
with:
panel-url: ${{ secrets.PANEL_URL }}
server-id: ${{ secrets.SERVER_ID }}
api-key: ${{ secrets.API_KEY }}
- name: Create Pterodactyl Backup (Cloudflare Access)
uses: maxouxax/pterodactyl-create-backup-action@v1
with:
panel-url: ${{ secrets.PANEL_URL }}
server-id: ${{ secrets.SERVER_ID }}
api-key: ${{ secrets.API_KEY }}
headers: |
CF-Access-Client-Id: ${{ secrets.CF_ACCESS_CLIENT_ID }}
CF-Access-Client-Secret: ${{ secrets.CF_ACCESS_CLIENT_SECRET }}Note: Ensure that you store sensitive information such as
panel-url,server-id, andapi-keyin GitHub Secrets to keep them secure.
Warning: This action will delete the oldest backup if the backup limit is reached. Make sure you have configured your backup limits appropriately on the Pterodactyl panel.
To develop and test this action locally, you can use the following commands:
# Install dependencies
npm install
# Run the action locally
npm run local-actionThis project is licensed under the MIT License. See the LICENSE file for details.
For more information, visit the Pterodactyl documentation.