Budibase/budibase · error · Error

Only component plugins are supported outside of self-host

Error message

Only component plugins are supported outside of self-host

What it means

In Budibase cloud (non-self-hosted) deployments, only component-type plugins may be installed; datasource and other plugin types are restricted to self-hosted installations. The plugin's schema.json type is validated against env.SELF_HOSTED before installation proceeds.

Source

Thrown at packages/server/src/api/controllers/plugin/index.ts:115

        const {
          metadata: metadataUrl,
          directory: directoryUrl,
          cleanupDirectory: cleanupDirectoryUrl,
        } = await urlUpload(url, name, headersObj)
        metadata = metadataUrl
        directory = directoryUrl
        cleanupDirectory = cleanupDirectoryUrl
        break
      }
      default:
        ctx.throw(400, "Invalid source")
    }

    pluginCore.validate(metadata.schema)

    // Only allow components in cloud
    if (!env.SELF_HOSTED && metadata.schema?.type !== PluginType.COMPONENT) {
      throw new Error(
        "Only component plugins are supported outside of self-host"
      )
    }

    if (
      metadata.schema?.metadata?.svelteMajor !== 5 &&
      metadata.schema?.type === PluginType.COMPONENT
    ) {
      throw new Error("Only Svelte 5 plugins are supported on this branch")
    }

    let origin
    if (source === PluginSource.GITHUB) {
      const { repo, url: canonical } = sdk.plugins.parseGithubRepo(url)
      if (repo && canonical) {
        origin = { source: "github" as const, repo, url: canonical }
      }
    }

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Use a component plugin in cloud deployments
  2. Run self-hosted (set SELF_HOSTED=true) if you need datasource plugins
  3. Verify the plugin's schema.json type field is what you intended
  4. Contact Budibase about datasource plugin availability on cloud

Example fix

// .env (self-host dev)
// before
// SELF_HOSTED=
// after
SELF_HOSTED=true
Defensive patterns

Strategy: validation

Validate before calling

const schema = JSON.parse(await fs.readFile('schema.json', 'utf8'))
if (!env.SELF_HOSTED && schema.type !== 'component') {
  throw new Error('Datasource plugins require a self-hosted deployment')
}

Try / catch

try {
  await installPlugin({ source: 'NPM', url })
} catch (err) {
  if (err.message === 'Only component plugins are supported outside of self-host') {
    console.error('Switch to a self-hosted install or use a component plugin')
  }
}

Prevention

When it happens

Trigger: POSTing a plugin with source NPM/GITHUB whose schema.json declares type other than component (e.g. datasource) while env.SELF_HOSTED is falsy — i.e. on Budibase Cloud or any deployment not explicitly set to self-host.

Common situations: Installing a datasource plugin in a cloud tenant; running a dev instance without SELF_HOSTED=true in .env while testing datasource plugins; migration from self-host to cloud where the plugin type is no longer allowed.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/77856461252c2d6c. Report an issue: GitHub.