PteroControl - Pterodactyl Server Management for VS Code
A comprehensive Visual Studio Code extension that allows you to manage your Pterodactyl game servers directly from the editor. With real-time WebSocket integration, rich webview interfaces, and secure credential management, PteroControl brings the power of Pterodactyl to your development workflow.
✨ Features
🎮 Server Management
- Real-time Dashboard: Monitor server status, resource usage, and performance metrics
- Power Controls: Start, stop, restart, and kill servers with one click
- Resource Monitoring: Track CPU, memory, and disk usage in real-time
- Multi-server Support: Manage multiple Pterodactyl servers from a single interface
📁 File Management
- Advanced File Editor: Syntax-highlighted editing for 50+ file types
- Directory Navigation: Browse server files with an intuitive interface
- File Operations: Upload, download, rename, delete, and compress files
- Context Menu: Right-click actions for quick file operations
- Search & Filter: Quickly find files and directories
💻 Console & Terminal
- Live Console: Real-time server console output with WebSocket integration
- Command Execution: Send commands directly to your servers
- Console History: Maintain command history and export logs
- Auto-scroll: Intelligent scrolling behavior for console output
- Log Levels: Color-coded output for different log levels
👥 User Administration
- User Management: Create, edit, and delete Pterodactyl users
- Permission Control: Manage administrator privileges
- User Statistics: View user activity and statistics
- Bulk Operations: Efficiently manage multiple users
🔔 Notifications & Alerts
- Push Notifications: Desktop alerts for server events
- Status Changes: Get notified when servers start, stop, or encounter errors
- Resource Warnings: Alerts for high resource usage
- Custom Actions: Quick actions directly from notifications
🔐 Security & Integration
- Secure Credential Storage: Uses VS Code's secure storage for API keys
- Encrypted Communication: HTTPS/WSS protocols for all communications
- Token Management: Automatic token refresh and management
- Multi-factor Support: Full support for 2FA-enabled accounts
🚀 Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "PteroControl"
- Click Install
From VSIX File
- Download the latest
.vsix
file from Releases
- In VS Code, go to Extensions → Install from VSIX...
- Select the downloaded file
⚙️ Configuration
Initial Setup
Install the Extension: Follow the installation steps above
Configure Credentials:
- Open Command Palette (Ctrl+Shift+P)
- Type "PteroControl: Configure Credentials"
- Enter your Pterodactyl panel URL and API key
- The extension will validate your credentials
Access the Interface:
- Use the Command Palette to open various panels
- Or use the Activity Bar icon (🦅) for quick access
Settings
You can configure PteroControl through VS Code settings:
{
"pterocontrol.panelUrl": "https://panel.example.com",
"pterocontrol.refreshInterval": 30000,
"pterocontrol.enableNotifications": true,
"pterocontrol.theme": "auto",
"pterocontrol.autoStartDashboard": false,
"pterocontrol.showServerStatusInStatusBar": true,
"pterocontrol.enableWebSocketReconnect": true,
"pterocontrol.maxConsoleHistory": 1000,
"pterocontrol.enableDebugLogging": false
}
Setting Descriptions
Setting |
Type |
Default |
Description |
panelUrl |
string |
"" |
Pterodactyl panel URL |
refreshInterval |
number |
30000 |
Auto-refresh interval in milliseconds |
enableNotifications |
boolean |
true |
Enable desktop notifications |
theme |
string |
"auto" |
Theme for webview panels |
autoStartDashboard |
boolean |
false |
Auto-open dashboard on startup |
showServerStatusInStatusBar |
boolean |
true |
Show server status in status bar |
enableWebSocketReconnect |
boolean |
true |
Enable automatic WebSocket reconnection |
maxConsoleHistory |
number |
1000 |
Maximum console lines to keep |
enableDebugLogging |
boolean |
false |
Enable debug logging |
📖 Usage Guide
Server Dashboard
- Open Dashboard: Command Palette → "PteroControl: Open Dashboard"
- Select Server: Use the dropdown to choose a server
- Monitor Resources: View real-time CPU, memory, and disk usage
- Control Server: Use the power buttons to start/stop/restart
- Send Commands: Enter commands in the console input field
File Management
- Open File Manager: Command Palette → "PteroControl: Open File Manager"
- Navigate: Click on folders to browse directories
- Edit Files: Double-click files to open them in the editor
- Upload Files: Use the "Upload File" button to create new files
- File Operations: Right-click on files for context menu options
Console Access
- Open Console: Command Palette → "PteroControl: Open Server Console"
- Select Server: Choose a server from the dropdown
- View Output: Real-time console output appears automatically
- Send Commands: Type commands and press Enter to execute
- Power Actions: Use the power buttons for server control
User Administration
- Open User Admin: Command Palette → "PteroControl: Open User Administration"
- View Users: See all users with their roles and status
- Create User: Click "Create User" to add a new user
- Edit User: Click "Edit" on any user to modify their details
- Delete User: Click "Delete" to remove a user (with confirmation)
🔧 Commands
PteroControl provides the following commands:
Command |
Description |
pterocontrol.openDashboard |
Open the server dashboard |
pterocontrol.openFileManager |
Open the file manager |
pterocontrol.openConsole |
Open the server console |
pterocontrol.openUserAdmin |
Open user administration |
pterocontrol.configureCredentials |
Configure Pterodactyl credentials |
pterocontrol.refreshServers |
Refresh server list |
pterocontrol.startServer |
Start selected server |
pterocontrol.stopServer |
Stop selected server |
pterocontrol.restartServer |
Restart selected server |
🎯 Keyboard Shortcuts
Global Shortcuts
Ctrl+Shift+P
→ Type "PteroControl" to access all commands
In-Console Shortcuts
Enter
- Send command
Ctrl+L
- Clear console
Ctrl+E
- Export logs
Escape
- Close modal dialogs
In-File Editor Shortcuts
Ctrl+S
- Save file
Ctrl+N
- Create new folder
Ctrl+O
- Open file
Delete
- Delete selected file
🔌 API Integration
Pterodactyl API Compatibility
PteroControl integrates with the Pterodactyl Panel API:
- Client API: For server management and file operations
- Application API: For user administration (admin access required)
- WebSocket API: For real-time console and resource monitoring
Required Permissions
Your API key needs the following permissions:
For Basic Usage:
read-servers
- View server information
control-servers
- Start/stop/restart servers
read-console
- View console output
send-command
- Send console commands
read-files
- Browse server files
write-files
- Edit and upload files
delete-files
- Delete files and folders
For User Administration (Admin):
admin-users
- Create, edit, and delete users
API Rate Limits
PteroControl respects Pterodactyl's rate limits:
- Client API: 60 requests per minute
- Application API: 120 requests per minute
🐛 Troubleshooting
Common Issues
"Connection Failed" Error
- Verify your panel URL is correct and accessible
- Check that your API key is valid and has required permissions
- Ensure your firewall allows VS Code to access the panel
"WebSocket Connection Failed"
- Check that WebSocket is enabled on your Pterodactyl panel
- Verify your panel URL uses HTTPS/WSS
- Check for proxy or firewall blocking WebSocket connections
"Permission Denied" Error
- Ensure your API key has the required permissions
- Check that you have access to the specific server
- For user admin, ensure you have admin privileges
File Editor Issues
- Large files (>10MB) may not load in the editor
- Binary files cannot be edited in the text editor
- Some file types may not have syntax highlighting
Debug Mode
Enable debug logging to troubleshoot issues:
- Open VS Code settings
- Search for "pterocontrol.enableDebugLogging"
- Set it to
true
- Check the "PteroControl" output channel for logs
Getting Help
If you encounter issues:
- Check the Logs: View the PteroControl output channel
- Verify Credentials: Ensure your API key and panel URL are correct
- Check Permissions: Verify your API key has required permissions
- Network Issues: Check your internet connection and firewall settings
- Report Issues: Create an issue on GitHub
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
- Clone the repository
- Install dependencies:
npm install
- Compile TypeScript:
npm run compile
- Run tests:
npm test
- Start development:
npm run watch
Project Structure
pterocontrol-extension/
├── src/
│ ├── client/ # API and WebSocket clients
│ ├── webviews/ # WebView panel providers
│ ├── utils/ # Utility functions
│ ├── types/ # TypeScript type definitions
│ └── extension.ts # Main extension entry point
├── media/ # Icons and images
├── resources/ # Additional resources
└── package.json # Extension manifest
📄 License
This extension is licensed under the MIT License. See LICENSE for details.
🙏 Acknowledgments
- Pterodactyl Panel - The amazing game server management panel
- VS Code API - For providing the extension framework
- CodeMirror - For the syntax-highlighted file editor
- The open-source community for inspiration and feedback
📞 Support
Made with ❤️ for the Pterodactyl community