Plugins
Comprehensive guide to managing and using plugins in PteroCA v0.6+
Overview
Plugins are extensions that add new functionality to your PteroCA panel without modifying the core codebase. The plugin system, introduced in v0.6, provides a secure and maintainable way to extend PteroCA with custom features, integrations, and payment providers.
What Can Plugins Do?
Plugins can extend PteroCA in many ways:
Payment Providers: Add new payment gateways (PayPal, Stripe, Coinbase, etc.)
Custom Features: Implement unique functionality specific to your business needs
Integrations: Connect with external services and APIs
Dashboard Widgets: Add custom widgets to the dashboard
Server Management: Extend server management capabilities with custom tabs and features
Automation: Add cron tasks and console commands
UI Extensions: Customize the admin panel with new CRUD interfaces
Benefits of Using Plugins
Maintainable: Plugins are isolated from core code, making updates easier
Secure: Automated security scanning and validation
Flexible: Enable only the plugins you need
Dependency Management: Automatic handling of plugin dependencies
Health Monitoring: Built-in health checks and status monitoring
Managing Plugins in Admin Panel
The Admin Panel provides a comprehensive interface for managing your installed plugins.
PLACEHOLDER: Screenshot - Admin Panel → Plugins List View
Accessing the Plugins Section
Log in to the Admin Panel with an account that has plugin management permissions
Navigate to Admin Panel → Plugins
You'll see a list of all discovered plugins with their current status
Plugin Information
For each plugin, you can view:
Name: Plugin display name
Version: Current version number
Author: Plugin developer
Status: Current state (enabled, disabled, faulted, update pending)
Health: Health check percentage (0-100%)
Description: Brief description of what the plugin does
Actions: Available operations (enable, disable, configure, etc.)
PLACEHOLDER: Screenshot - Plugin Details View with Status Information
Plugin States
Plugins can be in one of several states:
ENABLED
Plugin is active and functioning
DISABLED
Plugin is installed but not active
FAULTED
Plugin has errors and cannot be enabled
UPDATE_PENDING
An update is available for this plugin
DISCOVERED
Plugin found but not yet registered
Viewing Plugin Details
Click on a plugin name to view detailed information:
Complete manifest information
Dependency tree
Security scan results
Health check details
Configuration options
Changelog (if available)
Installing Plugins
PteroCA offers three methods for installing plugins, from easiest to most advanced:
Recommended: ZIP Upload
The ZIP upload method is the easiest way to install plugins. Simply upload a plugin archive through the Admin Panel - no server access required!
Method 1: ZIP Upload via Admin Panel (Easiest)
Upload and install plugins directly through the Admin Panel without server access.
Step 1: Obtain Plugin ZIP File
Download the plugin as a
.ziparchive from the plugin developerEnsure the archive is a valid plugin (contains
plugin.jsonin the root)
Supported format:
File format:
.ziponlyMaximum file size: 50 MB
Maximum extracted size: 100 MB
Step 2: Upload Plugin
Navigate to Admin Panel → Plugins
Click Upload Plugin button
Click Choose File and select your plugin ZIP file
(Optional) Check Enable after upload to automatically enable the plugin after installation
Click Upload button
PLACEHOLDER: Screenshot - Plugin Upload Form
What happens automatically:
✅ Validates ZIP file format and size
✅ Extracts plugin files to
/plugins/directory✅ Validates plugin manifest (
plugin.json)✅ Runs security scan on plugin code
✅ If "Enable after upload" checked: automatically enables the plugin
Step 3: Configure Plugin Settings
After the plugin is enabled:
Navigate to Settings → Plugins
Find your plugin in the list
Click Configure or Edit
Fill in required settings (API keys, credentials, options)
Save changes
PLACEHOLDER: Screenshot - Plugin Configuration Settings Page
Security Scan Required
All uploaded plugins undergo automatic security scanning. If CRITICAL security issues are found, the plugin cannot be enabled until those issues are resolved.
Method 2: Manual File Placement
Install plugins by manually placing files on the server.
Step 1: Place Plugin Files
Obtain the plugin files (download or extract from archive)
Connect to your server via SSH or SFTP
Copy the plugin folder to
/plugins/directory in your PteroCA installationThe plugin folder name should match the plugin identifier (e.g.,
hello-world)
Step 2: Open Admin Panel
Navigate to Admin Panel → Plugins
The plugin appears automatically in the list (no scan command needed!)
Check the plugin's health status indicator
Automatic Discovery:
Plugins are discovered automatically when you open the Plugins page
No manual scan or registration required
Shows validation status and any errors immediately
PLACEHOLDER: Screenshot - Admin Panel → Plugins List View
Step 3: Install Composer Dependencies (if needed)
If the plugin uses external PHP packages, you'll see a warning that Composer dependencies aren't installed.
Via CLI:
This runs composer install in the plugin directory.
Step 4: Enable the Plugin
Click the Enable button next to the plugin.
What happens automatically:
✅ Validates plugin manifest and structure
✅ Runs security scan (blocks if critical issues found)
✅ Checks dependencies (plugin and Composer)
✅ Executes database migrations (if plugin has migrations)
✅ Publishes assets (CSS, JS, images) to
/public/assets/plugins/✅ Registers services and event subscribers
✅ Calls plugin bootstrap initialization
If the plugin has dependencies on other plugins, you'll be prompted to enable them first, or use the --with-dependencies flag in CLI.
PLACEHOLDER: Screenshot - Plugin Enable Success Message
Step 5: Configure Plugin Settings
After enabling, configure the plugin in the Admin Panel:
Navigate to Settings → Plugins
Find your plugin in the list
Click Configure or Edit
Fill in required settings (API keys, credentials, options)
Save changes
PLACEHOLDER: Screenshot - Plugin Configuration Settings Page
Method 3: Command Line (Advanced)
For automation, scripting, or when you prefer working in the terminal.
Step 1: Place Plugin Files
Same as Method 1 - copy the plugin folder to /plugins/ directory.
Step 2: List Available Plugins (Optional)
Check if your plugin was discovered correctly:
Output example:
Step 3: Install Dependencies
If the plugin has a composer.json file or depends on other plugins:
Install Composer dependencies:
Check plugin dependencies:
This shows which other plugins are required.
Step 4: Enable the Plugin
Simple enable:
Enable with automatic dependency installation:
This automatically enables any required plugins in the correct order.
What happens automatically:
✅ Validates plugin manifest and structure
✅ Runs security scan (blocks if critical issues found)
✅ Checks dependencies (plugin and Composer)
✅ Executes database migrations
✅ Publishes assets to
/public/assets/plugins/✅ Registers services and subscribers
✅ Calls plugin bootstrap
Success output:
Step 5: Configure Plugin Settings
Configure via Admin Panel (Settings → Plugins).
Plugin Configuration
Most plugins require configuration before they can be used. Configuration is stored in the PteroCA settings system and is specific to each plugin.
Accessing Plugin Settings
Navigate to Settings → Plugins
Each enabled plugin appears with its configurable options
Settings are organized by hierarchy (General, Advanced)
Configuration Schema
Plugins define their configuration schema in plugin.json:
Type: string, integer, boolean, password, text, select
Required: Whether the setting must be provided
Default: Default value if not set
Hierarchy: general (basic settings) or advanced (expert options)
Required vs Optional Settings
Required settings must be configured before the plugin can function
Optional settings have defaults and can be customized as needed
The Admin Panel marks required settings clearly
Settings Security
Password fields are encrypted in the database
Settings are validated against the schema
Only users with
edit_settings_pluginpermission can modify plugin settingsChanges are logged in the audit log
Managing Dependencies
Plugins can depend on other plugins or external Composer packages. PteroCA automatically manages these dependencies.
Plugin Dependencies
Some plugins require other plugins to be installed and enabled before they can work. For example, a payment gateway plugin might depend on a base payment framework plugin.
Check plugin dependencies:
This shows which other plugins are required and their version requirements.
Automatic Dependency Installation
Enable a plugin and all its dependencies automatically:
This command enables the required plugins in the correct order and then enables your plugin.
Cascade Disable
When disabling a plugin that other plugins depend on, use the cascade option:
This disables the plugin and all plugins that depend on it, preventing broken dependencies.
Composer Dependencies
Some plugins use external PHP libraries (Composer packages). If a plugin requires Composer dependencies, install them with:
Most simple plugins don't need this step. The Admin Panel will show a warning if Composer dependencies are missing.
Plugin Security
PteroCA includes comprehensive security features to protect your panel from malicious plugins.
Automated Security Scanning
Every plugin undergoes automatic security scanning before being enabled. The security scanner checks for:
Dangerous Code Patterns: Scans PHP code for potentially harmful functions
SQL Injection Risks: Checks for unsafe database queries
Path Traversal Vulnerabilities: Looks for file system security issues
Hardcoded Credentials: Detects exposed API keys or passwords
Composer Vulnerabilities: Checks external dependencies for known security issues
Manifest Validation: Ensures plugin structure is correct
Severity Levels
Security issues are classified by severity:
CRITICAL
Immediate security risk
Plugin cannot be enabled
HIGH
Serious vulnerability
Warning shown, enable at own risk
MEDIUM
Potential security issue
Warning shown, monitoring recommended
LOW
Minor concern
Logged for review
Manual Security Scan
Run a security scan manually:
View detailed scan results:
Security Best Practices
When using plugins:
Only install plugins from trusted sources
Review security scan results before enabling
Keep plugins updated to receive security patches
Monitor plugin health regularly
Disable unused plugins to reduce attack surface
Check plugin dependencies for known vulnerabilities
Review permissions granted to plugin developers
CRITICAL Vulnerabilities Block Enabling
If a plugin has CRITICAL severity vulnerabilities, it cannot be enabled until the issues are resolved. This protects your panel from immediate security risks.
Health Checks
PteroCA automatically monitors plugin health to detect issues before they impact your panel.
Automated Health Checks
Health checks run automatically:
On enable: Before activating a plugin
Scheduled: Every 6 hours for all enabled plugins
On demand: Via CLI or Admin Panel
What Health Checks Monitor
The health check system examines:
Manifest Validation: Checks if plugin.json is valid and complete
File Integrity: Verifies all required files exist
Dependencies: Ensures all required plugins and packages are installed
Security Status: Checks for vulnerabilities and security issues
Autoload Check: Verifies plugin code can be loaded correctly
Health Percentage
Health is calculated as a percentage (0-100%):
90-100%: Excellent - Plugin is fully healthy
70-89%: Good - Minor issues present
50-69%: Fair - Some problems detected
30-49%: Poor - Multiple issues need attention
0-29%: Critical - Serious problems, consider disabling
Running Health Checks
Check all plugins:
Check specific plugin:
Detailed health report:
Output example:
Health Check Results in Admin Panel
View health status visually in the Admin Panel:
Navigate to Admin Panel → Plugins
Health percentage displayed for each plugin
Color coding: Green (good), Yellow (fair), Red (poor)
Click plugin name for detailed health report
PLACEHOLDER: Screenshot - Plugin List with Health Percentages
Plugin Permissions
PteroCA v0.6 includes granular permissions for plugin management, allowing you to control who can perform various plugin operations.
Plugin Management Permissions
access_plugins
View plugins list in Admin Panel
Allow viewing installed plugins
view_plugin
View detailed plugin information
Allow checking plugin details and health
enable_plugin
Enable plugins
Allow activating plugins
disable_plugin
Disable plugins
Allow deactivating plugins
install_plugin
Install new plugins (upload/scan)
Allow adding new plugins
uninstall_plugin
Completely remove plugins
Allow deleting plugins
upload_plugin
Upload plugin archives
Allow file uploads (future feature)
configure_plugin
Configure plugin settings
Allow accessing plugin configuration
Plugin Settings Permissions
access_settings_plugin
View plugin settings (read-only)
edit_settings_plugin
Edit plugin settings and configurations
Example Role Scenarios
Plugin Administrator
Full control over plugins:
access_plugins,view_plugin,enable_plugin,disable_plugininstall_plugin,uninstall_plugin,upload_pluginconfigure_plugin,access_settings_plugin,edit_settings_plugin
Plugin Manager (Limited)
Can manage existing plugins but not install new ones:
access_plugins,view_plugin,enable_plugin,disable_pluginconfigure_plugin,access_settings_plugin,edit_settings_plugin
Plugin Viewer (Read-Only)
Can only view plugin information:
access_plugins,view_plugin,access_settings_plugin
Assigning Permissions
Via Admin Panel:
Navigate to Admin Panel → Roles
Create or edit a role
Select desired plugin permissions
Assign the role to users
Via CLI:
CLI Commands Quick Reference
PteroCA provides comprehensive CLI commands for plugin management. Here's a quick reference of the most commonly used commands.
Discovery and Installation
pteroca:plugin:scan
Display plugin information (info only, does not register)
pteroca:plugin:list
List all discovered plugins with status
pteroca:plugin:info <plugin>
Show detailed plugin information
pteroca:plugin:install-deps <plugin>
Install plugin dependencies
Enable and Disable
pteroca:plugin:enable <plugin>
Enable a plugin
pteroca:plugin:enable <plugin> --with-dependencies
Enable plugin and all dependencies
pteroca:plugin:disable <plugin>
Disable a plugin
pteroca:plugin:disable <plugin> --cascade
Disable plugin and dependent plugins
Health and Security
pteroca:plugin:health
Check health of all plugins
pteroca:plugin:health <plugin>
Check specific plugin health
pteroca:plugin:security-scan <plugin>
Run security scan on plugin
Assets and Maintenance
pteroca:plugin:assets:publish <plugin>
Publish plugin assets
pteroca:plugin:assets:publish --force
Republish all plugin assets
pteroca:plugin:reset <plugin>
Reset faulted plugin
pteroca:plugin:uninstall <plugin>
Completely remove plugin
Dependency Management
pteroca:plugin:depends <plugin>
Show plugin dependency tree
pteroca:plugin:dependents <plugin>
Show plugins depending on this one
Troubleshooting
Common issues and solutions when working with plugins.
Plugin in FAULTED State
Symptoms: Plugin shows as FAULTED, cannot be enabled.
Causes:
Manifest validation failed
Missing required files
Dependency conflicts
Database migration errors
Bootstrap class errors
Solutions:
Check plugin info for error details:
Reset the plugin:
Review logs:
Verify file structure matches plugin requirements
Check dependencies are installed and enabled
Dependency Conflicts
Symptoms: Cannot enable plugin due to dependency errors.
Solutions:
View dependency tree:
Install with dependencies:
Check for circular dependencies - these cannot be resolved
Update conflicting plugins to compatible versions
Missing Autoload Classes
Symptoms: "Class not found" errors, plugin fails to load.
Solutions:
Verify namespace matches folder structure:
Check composer autoload if plugin uses composer.json
Clear cache:
Reinstall plugin dependencies:
Migration Failures
Symptoms: Plugin enables but database changes fail.
Solutions:
Check migration SQL syntax (must be MySQL/MariaDB compatible)
Verify table names use
plg_prefixCheck database user permissions for CREATE/ALTER/DROP
Review migration files for errors:
Manually fix database if needed, then reset plugin
Assets Not Loading
Symptoms: CSS/JS not loading, broken images.
Solutions:
Republish assets:
Check symlink/file exists:
Verify asset paths in plugin.json match actual files
Check web server permissions on public/assets/
Use correct asset function in templates:
Configuration Issues
Symptoms: Plugin enabled but not working, configuration errors.
Solutions:
Check required settings are configured via Admin Panel (Settings → Plugins)
Validate settings values match expected format
Check permission - do you have
edit_settings_plugin?Review plugin documentation for configuration requirements
Check plugin logs for configuration validation errors
Security Scan Blocking Enable
Symptoms: Cannot enable due to security issues.
Solutions:
View detailed scan results:
CRITICAL issues must be fixed - contact plugin developer
HIGH/MEDIUM issues - evaluate risk, enable at your own discretion
Update plugin to latest version with security fixes
Report issues to plugin developer
Need More Help?
If you're still experiencing issues:
Check the complete Troubleshooting Guide
Review plugin-specific documentation
Contact plugin developer for support
Report bugs on GitHub Issues
Creating Your Own Plugins
If you're a developer interested in creating custom plugins for PteroCA, see the complete Plugin Development Guide in the "For Developers" section.
The developer guide includes:
Technical architecture and plugin structure
Manifest schema and configuration
Code examples and best practices
API reference and hooks
Testing and debugging guides
Related Documentation
User Guides
CLI Reference - Complete plugin management commands
Roles & Permissions - Plugin permissions system
Customization - General customization options
Troubleshooting - General troubleshooting guide
Developer Resources
Plugin Development - Complete developer guide
Theme Development - Creating custom themes
Community and Support
FAQ - Frequently asked questions
GitHub Issues - Report bugs and request features
Discord Community - Get help and discuss with other users
Need Help?
If you have questions about plugins or need assistance:
Check the FAQ
Review the Plugin Development Guide
Ask in the Discord community
Report issues on GitHub
Last updated