# Reference Plugins Use this example to check that Cacti can discover, install, and enable a plugin before you add a page, hook, or database table. ## Standard Files Cacti uses `INFO` for metadata and `setup.php` for lifecycle callbacks. Ship a README with installation and upgrade instructions, a license, and a record of release changes. Add an `index.php` in browsable directories if your web server serves directory indexes. Protect each application page with Cacti's authentication bootstrap. ## File Structure Create this directory in a test installation. The two files below are sufficient for the example. ```text plugins/ myplugin/ INFO setup.php ``` As the plugin grows, put shared functions in `lib/`, settings in `include/`, and static images in `images/`. Keep the code in `setup.php` small because Cacti loads it during plugin discovery. ## Contents of Files Save the following as `plugins/myplugin/INFO`. Set the compatibility floor of your own plugin to the oldest Cacti release you support and test. ```ini [info] name = myplugin version = 1.0 longname = My First Plugin author = Example Maintainer homepage = https://www.cacti.net compat = 1.2.32 ``` Save the following as `plugins/myplugin/setup.php`. ```php Configuration > Plugins**. Install **My First Plugin** and enable it. Verify that the management page shows version **1.0** and the enabled state. This example has no user interface. To add a page or tab, see [Creating a plugin](Plugin-Creating-Plugins.md). --- Copyright (c) 2004-2026 The Cacti Group