Custom Modules Guide
Introduction
FlyEnv currently includes numerous built-in modules, but there are still many functional modules commonly used in development that aren't yet integrated. If you need a specific module in FlyEnv, we recommend first submitting your request via Discussions or Issues.
To address this need, FlyEnv now introduces Custom Modules - allowing users to add their own modules while maintaining the same seamless experience as built-in system modules.
This guide demonstrates the process using etcd as an example. As of this writing, FlyEnv doesn't include a native etcd module, though there's already an open request (#307). We appreciate all user feedback - every suggestion helps improve FlyEnv for everyone.
Adding a Custom Module
Step 1: Prepare the Binary
Download the etcd binary package and extract the files.
Step 2: Create Configuration
Create an etcd.yaml
configuration file:
name: "etcd-flyenv-test"
listen-client-urls: "http://0.0.0.0:2379"
listen-peer-urls: "http://0.0.0.0:2380"
advertise-client-urls: "http://127.0.0.1:2379"
initial-advertise-peer-urls: "http://127.0.0.1:2380"
log-level: "info"
log-outputs: ["stdout"]
Step 3: Create Module Category
- Navigate to Settings → Modules
- Click the icon next to "Site" to create a new module category
Step 4: Add New Module
Within your new category, click "Add" to create a module.
Configuration options:
- Is Module a Service?: Enables FlyEnv to manage startup/shutdown and adds toggle controls
- Only one service can run at a time: For services that shouldn't run multiple versions simultaneously
- Module Execution Items: Different versions/configurations of the module
- Configuration Files: Appears as tabs in the main panel
- Log Files: Appears as tabs in the main panel
Step 5: Add Execution Item
Click "Add" under Execution Items to configure:
- Run with sudo (macOS only): For commands requiring elevated privileges
- Command/File: The executable command or script file (.sh/.ps1/.cmd/.bat)
- PID File Path: For service status monitoring
- Configuration Files: Editable via the operation popup
- Log Files: Viewable via the operation popup
For our etcd example:
cd "/Users/x/Downloads/etcd-v3.6.0-darwin-amd64" && ./etcd --config-file "/Users/x/Downloads/etcd-v3.6.0-darwin-amd64/etcd.yaml"
Step 6: Access Your Module
Your custom module now appears in the left sidebar. Click to access its interface.
View and edit configuration files:
Step 7: Start the Service
Click the "Start" button on your execution item.
Step 8: Verify Operation
Check Tools → Process Kill to confirm etcd is running.
Step 9: Monitor Logs
View output and error logs via the operation buttons.
Conclusion
You've now successfully added a custom module to FlyEnv! We welcome your feedback and experience sharing. For any questions or feature requests, please visit our Discussions or Issues pages.