### Linux and Windows WSL #### Configuration > [!ATTENTION] warning > - To install the plugin, you need the [[Cellframe Node Installation|Cellframe Node to be installed]] Enable plugin subsystem in cellframe-node [[Resources/Manual/Config/Cellframe Node Configuration|configuration:]] ``` [plugins] py_path=/opt/cellframe-node/var/lib/plugins enabled=true py_load=true ``` #### Plugin structure To use plugins with Cellframe Node, follow these steps: 1. **Create Plugin Directory:** - Navigate to `/opt/cellframe-node/var/lib` directory. - Create a folder named "**plugins**". 2. **Organize Plugin Files by following:** ``` plugins ├── another_plugin │   ├── another_plugin.py │   └── manifest.json └── testplugin ├── manifest.json └── testplugin.py ``` > [!ERROR] important > - Each plugin directory should contain at least two files: [[Manifest file|manifest.json]] and the Python script implementing the plugin's functionality. > - The name of each entrypoint should match the name of the corresponding plugin and the name in manifest file. #### Python script The plugin folder can contain several python scripts. Each plugin must contain ***init*** and possibly ***deinit*** functions. The init and deinit functions must return integer value and should not accept any arguments. The ***init*** function is called by the plugin sybsystem after downloading the chain files, but before the CellFrameNode goes online. The ***deinit*** function is called when the CellFrameNode shut down. Finalize all work with open resourse here, if there where any. > [!HINT] note > In Cellframe Node, each plugin is treated as a separate Python module, herewith, they all work in a common scope. ```python # testplugin.py from DAP.Core import logIT def init(): """ Initialization function for the plugin. This function is called when the plugin is loaded. It should perform any necessary setup. Returns: int: A status code indicating the success of initialization. Zero indicates success, while non-zero values indicate errors. """ logIt.notice('Hello world!') return 0 def deinit(): """ Deinitialization function for the plugin. This function is called when the plugin is unloaded. It should perform any necessary cleanup. Returns: int: A status code indicating the success of deinitialization. Zero indicates success, while non-zero values indicate errors. """ # Perform cleanup here return 0 ``` #### Launchig the plugin - To run plugins, restart the Cellframe Node. - To check the plugin has started and is working properly, view the log by following: ```bash tail -f /opt/cellframe-node/var/log/cellframe-node.log ```