Plugins¶
Enable/disable plugins, list installed plugins.
All endpoints below are mounted under /api. Authentication: Authorization: Bearer <token> unless noted as public.
Endpoint count: 3
Endpoints¶
| Method | Path | Handler | Guards |
|---|---|---|---|
GET |
/api/plugins/:id |
getPlugin |
RequireSuperuser() |
POST |
/api/plugins/:id/disable |
disablePlugin |
RequireSuperuser() |
POST |
/api/plugins/:id/enable |
enablePlugin |
RequireSuperuser() |
Source¶
Handlers for this section live in api/routes/handlers_plugins.go in the StarkOne source. None of the three handlers bind a request body - the only input is the :id path parameter - and each responds with a flat JSON body (not the { "data": ... } envelope used elsewhere).
On error:
Reference¶
Note: the three plugin handlers below return flat JSON bodies (not the
{ "data": ... }envelope). Error bodies do use the{ "error": { "code", "message" } }shape.
GET /api/plugins/:id¶
Returns metadata for a single plugin (id, name, description, version) merged with its current enabled state from the plugins table.
Guards: RequireSuperuser()
Path parameters
| Name | Type | Description |
|---|---|---|
id |
string | Plugin identifier (e.g. ftp, varnish, redis, advanced-network). Must be a key in the server's availablePlugins registry. |
Response - 200 OK
Flat body (not enveloped). enabled is true when the plugins row for this id has enabled = 1, otherwise false.
Errors
| Status | Code | Meaning |
|---|---|---|
404 |
not_found |
No plugin with this id exists in the availablePlugins registry. |
Example
POST /api/plugins/:id/disable¶
Marks a plugin disabled in the plugins table (enabled = 0) and, for plugins with a system footprint, tears down the associated software, services, files, and database tables.
Guards: RequireSuperuser()
Path parameters
| Name | Type | Description |
|---|---|---|
id |
string | Plugin identifier to disable. |
Response - 200 OK
Flat body (not enveloped).
Errors
| Status | Code | Meaning |
|---|---|---|
500 |
db_error |
The UPDATE plugins SET enabled = 0 statement failed. |
Side effects
The DB row is always set to enabled = 0 first. Then, depending on id, additional teardown runs (per-plugin switch):
ftp: stops/disablesvsftpdandproftpdviasystemctl; removes the FTP packages viaapt-get/dnf.varnish: runscli.Run("install_varnish", "disable"); deletes thevarnish_default_enabledsetting row.redis: runscli.Run("install_redis", "remove").dns-loadbalancer: runscli.Run("install_dnsdist", "remove").haproxy: stops/disableshaproxy; runscli.Run("rewrite_all")to restore ports 80/443; removes the certbot deploy hook/etc/letsencrypt/renewal-hooks/deploy/haproxy-sync.sh; removes thehaproxypackage.multi-panel: drops theremote_serverstable.init-script-recorder: dropsinit_script_recordingsandinit_script_presets.uptime-monitor: stops the monitor loop; dropsuptime_monitor_historyanduptime_monitors.advanced-network: stopsfrr; drops the BGP/static-route/prefix-list tables.wireguard-vpn: stops/disablesheadscaleand strongSwan; removes thewireguard.localhostwebapp row; dropsvpn_configandipsec_tunnels.powerdns: stops/disablespdns; drops thepdns_*tables.netprobe: dropsnetprobe_history.logvault: dropslogvault_sources.m365-backup: removes the m365 backup cron entry.nginx-acl: dropsnginx_acl_*tables; removes per-usernginx_acl.{js,conf,json}files and the public ACL config; strips the njsload_moduleline fromnginx.conf; reloadsnginx.
Example
curl -X POST https://panel.example.com:2087/api/plugins/ftp/disable \
-H "Authorization: Bearer $TOKEN"
POST /api/plugins/:id/enable¶
Installs the software/tables required by a plugin and records it as enabled in the plugins table (enabled = 1).
Guards: RequireSuperuser()
Path parameters
| Name | Type | Description |
|---|---|---|
id |
string | Plugin identifier to enable. Must be a key in availablePlugins. |
Response - 200 OK
Flat body (not enveloped). Returned after install steps succeed and the plugins row is upserted with enabled = 1.
Errors
| Status | Code | Meaning |
|---|---|---|
404 |
not_found |
No plugin with this id exists in availablePlugins. |
500 |
install_error |
A per-plugin install step failed (package install, CLI command, table creation, binary download, etc.); the message contains the underlying error. |
500 |
db_error |
The final upsert into plugins failed. |
Side effects
Install logic runs per id before the DB row is upserted (INSERT ... ON CONFLICT(id) DO UPDATE SET enabled = 1):
ftp: installs an FTP server (installFTPServer()).varnish/redis/mongodb/postgresql/dns-loadbalancer: run the matchingcli.Run("install_*")command.starkone-replication: installs inotify-tools (installInotifyTools()).haproxy: runscli.Run("rewrite_all")to rewrite vhosts onto backend ports (HAProxy itself is installed via a dedicated endpoint).multi-panel: creates theremote_serverstable + index and starts the remote-server health checker.pm2: ifpm2is not onPATH, runs a bash script that installs Node.js/npm (apt/dnf/yum) andnpm install -g pm2.init-script-recorder: createsinit_script_presets,init_script_recordings, and indexes.advanced-network: creates the BGP/static-route/loopback/prefix-list tables, seedsbgp_config, adds IPv6/filter columns, and inserts default Allow-All / Block-All prefix lists for IPv4 and IPv6.uptime-monitor: createsuptime_monitors+ history tables and ensures schema.wireguard-vpn,powerdns,nginx-acl,m365-backup, etc.: create their respective tables and install supporting software (e.g. njs nginx module, m365-backup binary download). On failure these setinstall_error.
Example