Skip to main content
In this lesson we’ll walk through registering your first real component in Backstage. You’ll learn where Backstage loads example entities from, how to register a local component, how to import a catalog-info.yaml from a remote Git repository, and how to refresh or unregister entities from the Catalog.

Where the examples come from

A newly provisioned Backstage instance includes example entities imported via the backend configuration (app-config.yaml). At the top of the config you typically have base URLs:
Search for the catalog section to find static imports (locations). Files referenced with type: file are resolved relative to the backend process (usually packages/backend):
Follow the relative path to examples/Entities.yaml and you’ll find example entities such as an example-website component and an example API:
This is why the Catalog UI shows example components — they are imported from that file.

Registering a real component (auth service)

Below is a minimal Node.js Express service that we’ll register with Backstage:
To register this service, create a catalog-info.yaml at the root of your project describing the component. The required fields are apiVersion, kind, metadata, and spec. Example:
Notes:
  • spec.type is a free-form string; teams should agree on a consistent taxonomy (e.g., service, website, library) so catalog browsing and filtering remain useful.
  • owner should point to an existing user or group entity in the Catalog. The default Backstage instance includes example entities such as guest and guests; this is why guests works in examples.
When the auth component is present in the Catalog, Backstage displays its metadata (owner, type, lifecycle, tags, and links):
A screenshot of the Backstage "My Company Catalog" web UI showing a table of two components (auth-service and example-website) with columns for owner, type, lifecycle, and tags. The page includes a left navigation sidebar, filters on the left, and a "CREATE" button plus a search field.

Four common ways to import a component into Backstage

  • Static import from the Backstage repository (local file)
  • Static import from a URL (e.g., a catalog-info.yaml stored on GitHub)
  • Register via the Backstage UI (Register Existing Component)
  • Automatic registration via templates or repository-scanning integrations
A concise overview:

Static import (local file)

  1. Save your catalog-info.yaml as a local entity file, for example examples/auth-entity.yaml.
  2. Add a file location to app-config.yaml (paths are relative to packages/backend):
  1. Restart the Backstage backend (or yarn dev in development). After the backend restarts, the new component should appear in the Catalog.

Static import (from GitHub)

A common pattern is to keep catalog-info.yaml in the same repository as the service and let Backstage import it via URL. Example Git commands to push your project to GitHub:
Add the remote catalog-info.yaml as a url location in app-config.yaml:
Restart the backend. When Backstage imports the entity from GitHub, the Catalog will show the auth-service entry and the provided repository link will be clickable.
A screenshot of a GitHub repository page showing a file list (folders like openapi and src and files such as .gitignore and package.json) with a prompt to add a README. The right sidebar shows repo details and language stats (JavaScript) along with suggested workflows.

Entity updates and refresh behavior

  • Backstage polls configured locations on a schedule (the default may be tens of minutes). If you change the catalog-info.yaml in GitHub, the Catalog might not reflect the change immediately.
  • To fetch updates sooner, use the Catalog UI’s refresh action for the entity; this schedules a refresh run for that location.
Example: change the owner in GitHub from guests to auth-team:
If auth-team is not present as a group entity in the Catalog, Backstage will surface a missing-relation warning on the component page. The default Backstage example includes guest and guests entities; here’s the example org.yaml that provides them:
If you reference a non-existent owner like auth-team, either add a corresponding group entity or reference an existing group location in app-config.yaml.

Inspecting and unregistering entities

  • From the Catalog UI you can inspect an entity, view its raw YAML/JSON, and perform actions like unregistering the entity.
  • Unregistering removes the location Backstage used to import the entity (file or URL).
A screenshot of the Backstage developer portal showing an "auth-service" component page with Overview/About and Relations panels, a warning about missing related entities, and a dropdown menu with actions like "Unregister entity."

Registering via the UI

Alternatively, use the Backstage UI to “Register Existing Component” and paste the URL to your catalog-info.yaml. Backstage will analyze the entity and show what will be imported; you can then import it directly without editing backend config.
A screenshot of the Backstage web UI's "Create a new component" page showing a Templates panel with an "Example Node.js Template" card and a left-hand navigation menu. The page includes search and filter controls and a "Register Existing Component" button.

Templates and repository scanning

  • Scaffolding templates can create and register catalog-info.yaml automatically when you generate new projects.
  • Integrations and code-host scanning allow Backstage to discover catalog-info.yaml files across many repositories and import them at scale.

Summary — choosing an approach

  1. Add a local file location in app-config.yaml and restart the backend — useful for demos and local Backstage repo examples.
  2. Add a url location pointing to a remote catalog-info.yaml and restart the backend — recommended for production repositories.
  3. Use the Backstage UI (“Register Existing Component”) to import an entity by URL — convenient for quick imports.
  4. Use templates or repository-scanning integrations to auto-create and register catalog-info.yaml files across many repositories.
After changing app-config.yaml, restart the Backstage backend (or yarn dev when developing) so new locations are picked up. If you update a catalog-info.yaml in a remote repository, use the Catalog’s refresh action to fetch updates sooner than the configured polling interval.
This completes the demo for registering a component with Backstage.

Watch Video

Practice Lab