These docs have been generated using AI. Expect inaccuracies until we remove this banner.
- Docs
- Developers
- Troy Installer
Troy Installer
Troy Installer is a tiny plugin (~9KB) that installs Troy Client and any other plugins you specify. It's what powers Troy Packages.
Note:
You probably don't need this directly. If you create a Package on your Troy Server, it generates an Installer automatically. This page is for advanced customization.
Why Use an Installer?
When a user downloads your plugin directly (ZIP file), they might not have Troy Client. Without it, they'll never receive updates.
An Installer solves this:
- User downloads your Installer (tiny, ~9KB)
- User uploads and activates it
- Installer downloads Troy Client and your plugin(s)
- Downloads happen on the user's server—fast, even on slow WiFi
- Everything gets activated
- Installer optionally deletes itself
The user gets your 2MB plugin, but only had to download 9KB initially. Their server does the heavy lifting.
Getting Troy Installer
Download from the Troy repository:
https://repo.deploytroy.org/plugin/get/zip/troy-installer/
Or grab it from GitHub:
Customizing
Edit troy-installer.php before distributing. The configuration is at the top of the file:
PLUGIN_NAME— What users see during installationOPTIONS— Timeout, auto-deactivate, auto-delete, verbosityINSTALL— Array of plugins to install (in addition to Troy Client)
See the inline comments in the file for details.
Installer vs Embed vs Package
| Method | Size | User sees | Installs multiple plugins |
|---|---|---|---|
| Package | ~9KB | Progress | Yes |
| Troy Installer | ~9KB | Progress | Yes |
| Troy Embed | ~2KB | Nothing | Troy Client only |
Packages are just pre-configured Installers. If you need custom behavior, edit Troy Installer directly.
Source
→ View on GitHub
