# @backstage/plugin-scaffolder-backend

> The Backstage backend plugin that helps you create new things

Latest version **4.1.0** (published 2026-08-28) · Apache-2.0 license · 125.8K weekly downloads

## Install

```sh
npm install @backstage/plugin-scaffolder-backend
pnpm add @backstage/plugin-scaffolder-backend
yarn add @backstage/plugin-scaffolder-backend
bun add @backstage/plugin-scaffolder-backend
```

## Health

**Score 90/100 (A)** — status: active.

Positive: moderate downloads; has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2026-08-28 |
| First published | 2020-06-17 |
| Weekly downloads | 125.8K |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 33 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34400 |
| Maintainers | patriko, freben, marcuseide |
| Keywords | backstage |

## Links

- npm: https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend
- Repository: https://github.com/backstage/backstage
- Homepage: https://backstage.io
- npm.io page: https://npm.io/package/@backstage/plugin-scaffolder-backend

## Dependencies (33)

- [zod](https://npm.io/package/zod.md) ^3.25.76 || ^4.0.0
- [knex](https://npm.io/package/knex.md) ^3.0.0
- [yaml](https://npm.io/package/yaml.md) ^2.0.0
- [luxon](https://npm.io/package/luxon.md) ^3.0.0
- [globby](https://npm.io/package/globby.md) ^11.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [express](https://npm.io/package/express.md) ^4.22.0
- [logform](https://npm.io/package/logform.md) ^2.3.2
- [p-queue](https://npm.io/package/p-queue.md) ^6.6.2
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.2.0
- [nunjitsu](https://npm.io/package/nunjitsu.md) ^0.6.1
- [jsonschema](https://npm.io/package/jsonschema.md) ^1.5.0
- [prom-client](https://npm.io/package/prom-client.md) ^15.0.0
- [triple-beam](https://npm.io/package/triple-beam.md) ^1.4.1
- [@types/luxon](https://npm.io/package/@types/luxon.md) ^3.0.0
- [isbinaryfile](https://npm.io/package/isbinaryfile.md) ^5.0.0
- [zen-observable](https://npm.io/package/zen-observable.md) ^0.10.0
- [@backstage/types](https://npm.io/package/@backstage/types.md) ^1.2.2
- [@backstage/config](https://npm.io/package/@backstage/config.md) ^1.3.8
- [@backstage/errors](https://npm.io/package/@backstage/errors.md) ^1.3.1
- [winston-transport](https://npm.io/package/winston-transport.md) ^4.7.0
- [zod-to-json-schema](https://npm.io/package/zod-to-json-schema.md) ^3.25.1
- [@backstage/integration](https://npm.io/package/@backstage/integration.md) ^2.1.1
- [@backstage/catalog-model](https://npm.io/package/@backstage/catalog-model.md) ^1.10.0
- [@backstage/backend-plugin-api](https://npm.io/package/@backstage/backend-plugin-api.md) ^1.10.0
- [@backstage/plugin-events-node](https://npm.io/package/@backstage/plugin-events-node.md) ^0.4.25
- [@backstage/plugin-catalog-node](https://npm.io/package/@backstage/plugin-catalog-node.md) ^2.2.4
- [@backstage/backend-openapi-utils](https://npm.io/package/@backstage/backend-openapi-utils.md) ^0.7.1
- [@backstage/plugin-permission-node](https://npm.io/package/@backstage/plugin-permission-node.md) ^0.11.3
- [@backstage/plugin-scaffolder-node](https://npm.io/package/@backstage/plugin-scaffolder-node.md) ^0.13.6
- [@backstage/plugin-permission-common](https://npm.io/package/@backstage/plugin-permission-common.md) ^0.9.10
- [@backstage/plugin-scaffolder-common](https://npm.io/package/@backstage/plugin-scaffolder-common.md) ^2.2.3

## Recent versions

- 4.1.0 (latest) — 2026-08-28
- 0.0.0-nightly-20260909022715 (nightly) — 2026-09-09
- 4.2.0-next.2 (next) — 2026-09-08
- 0.0.0-nightly-20260904022803 — 2026-09-04
- 0.0.0-nightly-20260902024315 — 2026-09-02
- 4.2.0-next.1 — 2026-09-01
- 3.3.1 — 2026-08-29
- 3.4.1 — 2026-08-29
- 0.0.0-nightly-20260829022506 — 2026-08-29
- 0.0.0-nightly-20260828045505 — 2026-08-28
- 0.0.0-nightly-20260827035829 — 2026-08-27
- 0.0.0-nightly-20260826023806 — 2026-08-26
- 4.1.0-next.0 — 2026-08-25
- 0.0.0-nightly-20260825023435 — 2026-08-25
- 4.0.5 — 2026-08-24
- … 2129 more at https://npm.io/package/@backstage/plugin-scaffolder-backend/versions

## README

# Scaffolder Backend

This is the backend for the default Backstage [software templates](https://backstage.io/docs/features/software-templates/).
This provides the API for the frontend [scaffolder plugin](https://github.com/backstage/backstage/tree/master/plugins/scaffolder),
as well as the built-in template actions, tasks and stages.

## Installation

This `@backstage/plugin-scaffolder-backend` package comes installed by default
in any Backstage application created with `npx @backstage/create-app`, so
installation is not usually required.

To check if you already have the package, look under
`packages/backend/package.json`, in the `dependencies` block, for
`@backstage/plugin-scaffolder-backend`. The instructions below walk through
restoring the plugin, if you previously removed it.

### Install the package

```bash
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-scaffolder-backend
```

Then add the plugin to your backend, typically in `packages/backend/src/index.ts`:

```ts
const backend = createBackend();
// ...
backend.add(import('@backstage/plugin-scaffolder-backend'));
```

#### Old backend system

In the old backend system there's a bit more wiring required. You'll need to
create a file called `packages/backend/src/plugins/scaffolder.ts`
with contents matching [scaffolder.ts in the create-app template](https://github.com/backstage/backstage/blob/ad9314d3a7e0405719ba93badf96e97adde8ef83/packages/create-app/templates/default-app/packages/backend/src/plugins/scaffolder.ts).

With the `scaffolder.ts` router setup in place, add the router to
`packages/backend/src/index.ts`:

```diff
+import scaffolder from './plugins/scaffolder';

async function main() {
  ...
  const createEnv = makeCreateEnv(config);

  const catalogEnv = useHotMemoize(module, () => createEnv('catalog'));
+  const scaffolderEnv = useHotMemoize(module, () => createEnv('scaffolder'));

  const apiRouter = Router();
+  apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv));
  ...
  apiRouter.use(notFoundHandler());

```

### Adding templates

At this point the scaffolder backend is installed in your backend package, but
you will not have any templates available to use. These need to be [added to the software catalog](https://backstage.io/docs/features/software-templates/adding-templates).

To get up and running and try out some templates quickly, you can or copy the
catalog locations from the [create-app template](https://github.com/backstage/backstage/blob/master/packages/create-app/templates/default-app/app-config.yaml.hbs).

## Configuration

### Default Environment

The scaffolder supports a `defaultEnvironment` configuration that provides default parameters and secrets to all templates. This reduces template complexity and improves security by centralizing common values.

```yaml
scaffolder:
  defaultEnvironment:
    parameters:
      region: eu-west-1
      organizationName: acme-corp
      defaultRegistry: registry.acme-corp.com
    secrets:
      AWS_ACCESS_KEY: ${AWS_ACCESS_KEY}
      GITHUB_TOKEN: ${GITHUB_TOKEN}
      DOCKER_REGISTRY_TOKEN: ${DOCKER_REGISTRY_TOKEN}
```

#### Default parameters

Default parameters are accessible via `${{ environment.parameters.* }}` in templates. Default parameters are isolated in their own context to avoid naming conflicts.

```yaml
 parameters:
    - title: Fill in some steps
      required:
        - organizationName
      properties:
        organizationName:
          title: organizationName
          type: string
          description: Unique name of the organization
          ui:autofocus: true
          ui:options:
            rows: 5

  steps:
    - id: deploy
      name: Deploy Application
      action: aws:deploy
      input:
        region: ${{ environment.parameters.region }}  # Resolves to defaultEnvironment.parameters.region
        organization: ${{ parameters.organizationName }}  # Resolves to frontend input value
        otherOrganization: ${{ environment.parameters.organizationName }}  # Resolves to defaultEnvironment.parameters.organizationName
```

#### Secrets

Default secrets are resolved from environment variables and accessible via `${{ environment.secrets.* }}` in template actions. Secrets are only available during action execution, not in frontend forms.

```yaml
- id: deploy
  name: Deploy with credentials
  action: aws:deploy
  input:
    accessKey: ${{ environment.secrets.AWS_ACCESS_KEY }} # Resolves to defaultEnvironment.secrets.AWS_ACCESS_KEY
```

**Security Note:** Secrets are automatically masked in logs and are only available to backend actions, never exposed to the frontend.

---
_Source: https://npm.io/package/@backstage/plugin-scaffolder-backend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
