Description
n8n-nodes-pterodactyl
Automate your Pterodactyl Panel with n8n workflows – manage game servers, monitor resources in real-time, and control infrastructure via API.
Pterodactyl Panel is an open-source game server management platform built with PHP, React, and Go.
n8n is a fair-code licensed workflow automation platform.
Table of Contents
- Features
- Installation
- Quick Start
- What You Can Do
- Usage Examples
- Credentials Setup
- Troubleshooting
- Compatibility
- Advanced Features
- Contributing
- Project Status
- License
- Important Notice
- Resources
Features
- ๐ฎ 47+ Operations – Server management, files, databases, backups, users, schedules, networks
- โก Real-Time WebSocket – Stream console output and resource statistics
- ๐ฅ Client & Application APIs – Both user and admin operations
- ๐ Credential Validation – Tests API connectivity on credential save
- ๐จ Dynamic Dropdowns – Load servers, users, and locations from your panel
- ๐ฆ TypeScript – Full type definitions included
Installation
Via n8n Community Nodes
- In n8n, go to Settings > Community Nodes
- Click Install a community node
- Enter:
n8n-nodes-pterodactyl - Click Install
Manual Installation (Self-Hosted)
cd ~/.n8n/nodes
npm install n8n-nodes-pterodactyl
Restart n8n to load the new nodes.
Quick Start
1. Set Up Credentials
You'll need an API key from your Pterodactyl Panel:
For Client API (user operations):
- Go to Account Settings โ API Credentials
- Create a new API key
- Copy the key immediately
For Application API (admin operations):
- Go to Admin Panel โ Application API
- Create a new API key with appropriate permissions
- Copy the key immediately
2. Configure in n8n
- Add a Pterodactyl node to your workflow
- Click Create New Credential
- Select the credential type you need
- Enter your Panel URL and API key
- Save and test the connection
3. Start Automating
Create a workflow to list your servers and check their status.
What You Can Do
Client API Operations
Server Management
- List all your servers
- Get server details and resource usage
- Control server power (start, stop, restart)
- Send console commands
- Monitor real-time resource usage
File Operations
- Browse and manage server files
- Read and write file contents
- Create archives and extract files
- Get secure upload URLs
Database Management
- List and create databases
- Rotate passwords
- Delete databases when needed
Backup Operations
- Create and restore backups
- Download backup archives
- Manage backup retention
Account & Access
- Manage your account settings
- Control API keys
- Manage subuser permissions
- Configure server schedules
Network
- View and manage IP allocations
- Set primary allocation
Application API Operations (Admin)
User Management
- Create and manage user accounts
- View user details and their servers
Server Provisioning
- Create new game servers
- Update server configurations
- Remove servers
Infrastructure
- Manage datacenter locations
WebSocket Features
Real-Time Monitoring
- Stream console output
- Get live resource statistics
- React to server status changes
- Track installation progress
Connection Management
- Automatic reconnection on disconnect
- Token refresh handling
- Graceful error recovery
Usage Examples
Automated Backups
Schedule daily backups for all servers:
Schedule Trigger (Daily at 3 AM)
โ
List Servers
โ
For each server
โ
Create Backup
โ
Send notification to Slack/Discord
Real-Time Monitoring
Alert on server errors from console output:
WebSocket Trigger
โ
Listen for console output
โ
If error detected
โ
Send alert to team
Config Deployment
Deploy configuration updates automatically:
GitHub Webhook (on push)
โ
Download config file
โ
Write to server
โ
Restart server
โ
Confirm success
Server Provisioning
Automate customer onboarding:
Webhook (new order)
โ
Create user account
โ
Create server
โ
Send welcome email
Credentials Setup
Client API Key
Use for: Server management, file operations, backups
- Log into your Pterodactyl Panel
- Click your username โ Account Settings
- Go to API Credentials
- Click Create New
- Add a description (e.g., "n8n Automation")
- Copy the key (shown only once!)
Application API Key
Use for: User management, server creation, admin tasks
- Log into Pterodactyl as admin
- Go to Admin Panel
- Navigate to Application API
- Click Create New
- Add description and select permissions
- Copy the key (shown only once!)
Tips:
- Use Client API for most automation tasks
- Only use Application API when you need admin privileges
- Create separate keys for different workflows
- Never share API keys or commit them to code
Troubleshooting
Common Issues
Can't connect to Panel
- Check that your Panel URL is correct (e.g.,
https://panel.example.com) - Remove any trailing slashes from the URL
- Verify the panel is accessible from your n8n instance
API Key not working
- Make sure you copied the entire key
- Check if the key was revoked in the panel
- Verify you're using the right credential type (Client vs Application)
WebSocket won't connect
- Ensure Wings is running on the server
- Check firewall rules allow WebSocket connections
- Verify the server ID is correct
"ConfigurationNotPersistedException" warning
- This is usually harmless – it means Wings couldn't sync immediately
- The operation succeeded on the Panel
- Wings will sync when it comes back online
Getting Help
- ๐ GitHub Repository
- ๐ Report an Issue
- ๐ฌ n8n Community Forum
- ๐ง Email
Compatibility
Requirements:
- n8n v0.198.0 or higher
- Pterodactyl Panel v1.0 or higher
- Wings v1.0 or higher (for WebSocket features)
- Node.js v18.10.0 or higher
Tested with:
- n8n 1.x
- Pterodactyl Panel 1.11.x
- Self-hosted and n8n Cloud
- PostgreSQL and MySQL
Advanced Features
Dynamic Dropdowns
Many operations include dropdowns that load data from your panel:
- Server selection shows your accessible servers
- User selection (Application API)
- Location selection
- Allocation management
Pagination
List operations handle pagination automatically:
- Enable "Return All" to fetch everything
- Or set a limit for faster queries
Error Handling
Error handling features:
- Retries on HTTP 429 (rate limit) and 5xx responses
- ConfigurationNotPersistedException logged as warning instead of error
- WebSocket reconnection with exponential backoff
Contributing
This is a community project and we welcome contributions!
How to Help
- ๐ Report bugs or issues you encounter
- ๐ก Suggest features or improvements
- ๐ Improve documentation
- ๐งช Add test coverage
- ๐ป Submit pull requests
Development Setup
# Clone the repository
git clone https://github.com/goevexx/pterodactyl-api-node.git
cd pterodactyl-api-node
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
See CONTRIBUTING.md for detailed guidelines.
Project Status
This project is actively maintained. Current focus:
- โ Core operations implemented and tested
- โ WebSocket support with auto-reconnect
- โ 81% test coverage
- ๐ Adding more example workflows
- ๐ Improving documentation
- ๐ Planning additional Pterodactyl features
See ROADMAP.md for detailed plans.
License
MIT – Free to use, modify, and distribute.
Acknowledgments
- Built for the n8n community
- Integrates with Pterodactyl Panel
- Thanks to all contributors and users
Important Notice
โ ๏ธ Independent Project
This project is independently maintained and not officially affiliated with Pterodactyl Panel or n8n.
Pterodactylยฎ is a registered trademark of Dane Everitt and contributors. The Pterodactyl logo is used under nominative fair use to indicate compatibility with the Pterodactyl Panel API.
Resources
Built with โค๏ธ for the community
Documentation ยท Issues ยท Discussions