Skip to content

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:

{ "error": { "code": "string", "message": "string" } }

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.

{
  "id": "ftp",
  "name": "FTP Server",
  "description": "...",
  "version": "1.0.0",
  "enabled": false
}

Errors

Status Code Meaning
404 not_found No plugin with this id exists in the availablePlugins registry.

Example

curl https://panel.example.com:2087/api/plugins/ftp \
  -H "Authorization: Bearer $TOKEN"

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).

{ "success": true, "message": "Plugin disabled" }

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/disables vsftpd and proftpd via systemctl; removes the FTP packages via apt-get/dnf.
  • varnish: runs cli.Run("install_varnish", "disable"); deletes the varnish_default_enabled setting row.
  • redis: runs cli.Run("install_redis", "remove").
  • dns-loadbalancer: runs cli.Run("install_dnsdist", "remove").
  • haproxy: stops/disables haproxy; runs cli.Run("rewrite_all") to restore ports 80/443; removes the certbot deploy hook /etc/letsencrypt/renewal-hooks/deploy/haproxy-sync.sh; removes the haproxy package.
  • multi-panel: drops the remote_servers table.
  • init-script-recorder: drops init_script_recordings and init_script_presets.
  • uptime-monitor: stops the monitor loop; drops uptime_monitor_history and uptime_monitors.
  • advanced-network: stops frr; drops the BGP/static-route/prefix-list tables.
  • wireguard-vpn: stops/disables headscale and strongSwan; removes the wireguard.localhost webapp row; drops vpn_config and ipsec_tunnels.
  • powerdns: stops/disables pdns; drops the pdns_* tables.
  • netprobe: drops netprobe_history.
  • logvault: drops logvault_sources.
  • m365-backup: removes the m365 backup cron entry.
  • nginx-acl: drops nginx_acl_* tables; removes per-user nginx_acl.{js,conf,json} files and the public ACL config; strips the njs load_module line from nginx.conf; reloads nginx.

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.

{ "success": true, "message": "Plugin enabled" }

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 matching cli.Run("install_*") command.
  • starkone-replication: installs inotify-tools (installInotifyTools()).
  • haproxy: runs cli.Run("rewrite_all") to rewrite vhosts onto backend ports (HAProxy itself is installed via a dedicated endpoint).
  • multi-panel: creates the remote_servers table + index and starts the remote-server health checker.
  • pm2: if pm2 is not on PATH, runs a bash script that installs Node.js/npm (apt/dnf/yum) and npm install -g pm2.
  • init-script-recorder: creates init_script_presets, init_script_recordings, and indexes.
  • advanced-network: creates the BGP/static-route/loopback/prefix-list tables, seeds bgp_config, adds IPv6/filter columns, and inserts default Allow-All / Block-All prefix lists for IPv4 and IPv6.
  • uptime-monitor: creates uptime_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 set install_error.

Example

curl -X POST https://panel.example.com:2087/api/plugins/redis/enable \
  -H "Authorization: Bearer $TOKEN"