Skip to content

Installing

Robin Kooyman edited this page Oct 29, 2026 · 3 revisions

Only a super-user can install or remove a plugin.

Install with SQL

INSTALL example FROM 'github:<owner>/<repo>@v0.1.0'

The name after INSTALL must equal plugin.name in the manifest.

Source Example Checksum
GitHub release github:my-org/my-plugin@v0.1.0 The SHA256SUMS release asset. Required.
HTTPS folder https://plugins.example.org/example/0.1.0/ SHA256SUMS in the folder. Required.
Local file file:///srv/plugins/example-0.1.0-any.tar.gz SHA256SUMS next to the file, when it exists.
Local folder file:///srv/plugins/example/ None. Beacon packs the folder.
  • For a GitHub or HTTPS source, Beacon picks the archive for its DataFusion version and target. Else it uses the any archive.
  • Beacon refuses a source with a user name or a password.
  • Plain http:// works only for 127.0.0.1, [::1] and localhost.
  • Beacon refuses an archive larger than 128 MiB.
  • A local folder source is good for development. It needs the built library in lib/.

What the install does

  1. Beacon downloads the archive and checks its SHA-256.
  2. It unpacks the archive into a temporary folder in the plugins directory.
  3. It checks the manifest and the Beacon version range.
  4. It loads the library and checks the SDK ABI and the DataFusion version.
  5. It checks that each function name and each format key is free.
  6. It moves the folder to <plugins_dir>/<name>/ and registers the functions and the formats.

When a step fails, Beacon removes the temporary folder. The install changes nothing.

After the install, these items are available:

  • The native and SQL functions, with their aliases.
  • For each format: read_<format>, read_<format>_schema and STORED AS <format>.

Install at server start

Set BEACON_PLUGINS to a comma list of name=source:

BEACON_PLUGINS=example=github:<owner>/<repo>@v0.1.0,other=github:<owner>/<other>@v1.2.0

At start, Beacon installs each plugin that is not installed. A plugin that is installed stays at its version. A new tag in BEACON_PLUGINS does not update it.

At each start, Beacon also loads the plugins in the plugins directory again. It does not download them again.

Show the plugins

SELECT * FROM beacon.system.plugins
Column Contents
name The plugin name.
version The plugin version.
kind Native, SQL, or both.
status The state of the plugin, such as loaded or failed.
error The error of a failed plugin.
functions The function names.
source The install source.
sha256 The SHA-256 of the archive.

Remove a plugin

UNINSTALL example
  • Beacon removes the functions, the formats and the plugin folder.
  • A table on a format of the plugin then gives the error file format `<name>` is not installed.
  • On Windows, the server keeps the library file until it stops. Beacon deletes the folder at the next start.
  • DROP FUNCTION cannot remove a plugin function. Use UNINSTALL.
  • The library stays in the memory of the server until the server stops. Each install of a native plugin adds one library.

Update a plugin

Beacon refuses an install of a plugin name that is installed. So remove the old version first:

UNINSTALL example
INSTALL example FROM 'github:<owner>/<repo>@v0.2.0'

Restart the server after many updates, to free the memory of the old libraries.

The plugins directory

The plugins directory is the only store of plugins:

<plugins_dir>/
  example/
    beacon-plugin.toml      the manifest
    install.json            the install record
    sql/functions.sql       the SQL functions
    lib/libexample_native.so
  .tmp-<random>/            an install or an uninstall that is not complete
  • Do not change the files of an installed plugin.
  • A folder without a readable install.json is a broken entry. beacon.system.plugins shows it as failed.
  • Beacon deletes the .tmp-* folders at start.

Clone this wiki locally