Skip to main content

Plugin files

BetaThe plugin SDK and these pages are new. They change with each release, as developers use them and tell us what works.View as Markdown

A Volumio plugin is a folder of files. This page lists each file volumio-plugin init writes, then every field of the manifest, volumio-plugin.json.

Files​

FileHoldsRead by
volumio-plugin.jsonThe manifest: id, version, type, function, permissions, system packages, hosts. See Manifest fields.The SDK, the CI, moderators
package.jsonThe npm dependencies and scriptsnpm, and Volumio through the fields the build adds
package-lock.jsonThe exact version of each dependencynpm, during the build
index.jsThe plugin: the class Volumio creates and calls. See index.js methods.Volumio
config.jsonEach setting with its type and default valueVolumio, which copies it to the device the first time
UIConfig.jsonThe settings page. See UIConfig.json.getUIConfig in index.js
i18n/strings_<language>.jsonThe text the user reads, one file per language. strings_en.json is required.index.js and getUIConfig
install.shA script Volumio runs as root when it installs the pluginVolumio
uninstall.shA script Volumio runs as root when it removes the pluginVolumio
test/Tests that run the plugin against a fake Volumio, test/volumio.jsnpm test
README.mdWhat the plugin does and how to set it upUsers, moderators
LICENSEThe licence, MIT by defaultUsers, moderators
AGENTS.md, VOLUMIO_API.md, CLAUDE.mdInstructions for coding agents. See Build with your AI agent.Coding agents
catalog.jsonPlaceholder tracks, in a music_service onlyindex.js of the template

A plugin can also ship a requiredConf.json, with the same shape as config.json. Each time Volumio loads the plugin, it writes every value of requiredConf.json into the saved settings, over what the user saved.

package.json​

package.json holds dependencies, devDependencies, scripts and main. main is index.js. The source never sets name, version or volumio_info: volumio-plugin package writes them, with description, license and engines.volumio, from volumio-plugin.json. Volumio reads those fields from the package.json in the package.

A plugin written before the SDK has only a package.json, with its metadata under volumio_info. It keeps working, and volumio-plugin check reads it.

install.sh and uninstall.sh​

Volumio runs both scripts as root with sh, which is dash on Volumio. The shebang line is ignored.

  • Use POSIX shell only. Start with set -eu. Do not use pipefail, which dash does not have.
  • Install system packages only as apt-get install -y <package>, each listed in system.apt.
  • End install.sh with echo "plugininstallend" and uninstall.sh with echo "pluginuninstallend". Volumio waits for these lines to know the script finished.

The template's install.sh:

install.sh
#!/bin/sh
# Volumio runs this with sh (dash) as root: POSIX sh only, no pipefail.
set -eu
echo "plugininstallend"

Manifest fields​

volumio-plugin.json is validated against the manifest schema. It takes only the fields below.

FieldRequiredTypeValue
idYesstringThe plugin's folder name on the device. 2 to 64 letters, digits and underscores, starting with a letter or a digit. No hyphens.
versionYesstringA semver version, such as 1.2.0
typeYesstringaudio_interface, miscellanea, music_service, system_controller, system_hardware or user_interface
functionYesstringAn id from the function registry, or a new id in lowercase words joined by hyphens
titleYesstringThe name shown in the store and the UI. 1 to 80 characters.
descriptionYesstringWhat the plugin does
enginesYesobjectvolumio: a semver range, such as >=4.0.0 <5.0.0. api: "1", the plugin API Volumio 4 runs.
archYesarrayThe architectures to build for: armhf, arm64, amd64. At least one.
permissionsYesarrayWhat the plugin does through Volumio. See Permissions. Can be empty.
licenseYesstringAn SPDX identifier, such as MIT
iconNostringA Font Awesome class, such as fa-puzzle-piece
changelogNostringWhat changed in this version
bootPriorityNointegerThe start group at boot, 1 to 100. Default: 100.
networkNoarrayEvery host the plugin connects to, such as api.example.com or *.example.com
systemNoobjectWhat the plugin adds to the system. See System.
settingsNostringThe path of a settings schema file, relative to the plugin folder
testNoobjectcredentials: the names of the test credentials the plugin needs. scenarios: the path of a test scenarios file.

Permissions​

PermissionThe plugin
playbackPlays audio
browse-sourceAdds an entry to Browse
broadcastSends messages to every open Volumio UI
ui:toastShows toasts
ui:modalOpens modal windows
aamppProcesses audio through AAMPP, Volumio's audio processing pipeline
spectrumReads the audio spectrum
plugin:<type>.<id>Calls methods of another plugin, such as plugin:music_service.mpd

Volumio does not enforce permissions. They tell users and moderators what the plugin does.

System​

FieldTypeValue
system.aptarrayThe Debian packages install.sh installs, each named in full
system.servicesarrayThe systemd units the plugin installs, such as my-daemon.service
system.writesarrayThe absolute paths outside the plugin folder that the plugin writes

Example​

The manifest volumio-plugin init writes for a music_service:

volumio-plugin.json
{
"id": "my_service",
"version": "0.1.0",
"type": "music_service",
"function": "web-radio",
"title": "My Service",
"description": "Plays My Service on Volumio",
"icon": "fa-puzzle-piece",
"engines": { "volumio": ">=4.0.0 <5.0.0", "api": "1" },
"arch": ["armhf", "amd64"],
"permissions": ["ui:toast", "browse-source", "playback"],
"license": "MIT"
}

Was this page helpful?