Getting Started
Learn how to extend PteroCA with custom functionality through the plugin system.
Introduction
PteroCA v0.6+ includes a comprehensive plugin system that allows developers to extend the panel with custom functionality without modifying the core codebase. This guide covers everything you need to know to create powerful, secure, and maintainable plugins.
What is a Plugin?
A plugin is a self-contained extension that adds new features to PteroCA. Plugins are:
Isolated: Separate from core code, making upgrades safer
Modular: Can be enabled/disabled independently
Extensible: Access to powerful framework capabilities
Secure: Automatically scanned for security vulnerabilities
Maintainable: Clear structure and conventions
Plugin Architecture
PteroCA plugins are built on Symfony 7 and integrate seamlessly with the framework:
Symfony Services: Full dependency injection support
Doctrine ORM: Database entities and migrations
Twig Templates: Templating engine for views
Event System: Subscribe to system events
EasyAdmin: Extend the admin panel with CRUD interfaces
Plugin Capabilities
Plugins can implement any combination of these capabilities:
routes
Custom HTTP routes and controllers
entities
Database entities (Doctrine ORM)
migrations
Database schema changes
ui
Dashboard widgets, server tabs, menu items
eda
EasyAdmin CRUD controllers
console
CLI commands
cron
Scheduled tasks (cron jobs)
When to Create a Plugin
Create a plugin when you need to:
Add a new payment provider (Stripe, PayPal, Coinbase, etc.)
Integrate with external services (Discord, Telegram, webhooks)
Implement custom business logic specific to your needs
Extend the admin panel with custom management interfaces
Add automation and scheduled maintenance tasks
Create custom dashboard widgets or server management tools
When NOT to Create a Plugin
Consider other approaches for:
Minor UI tweaks: Use themes instead
Configuration changes: Use settings and environment variables
Core functionality changes: Consider contributing to PteroCA core
Single-use scripts: Use console commands or cron jobs directly
Next Steps
Now that you understand what plugins are and when to use them, continue with:
Plugin Structure - Learn about plugin file organization
Plugin Manifest - Configure your plugin with plugin.json
Bootstrap & Lifecycle - Initialize and cleanup logic
Need Help?
Check Example Plugins for working code samples
Review Best Practices for guidelines
Join Discord Community
Report issues on GitHub
Last updated