Backstage Local Setup Tutorial
This document provides a comprehensive guide on the prerequisites and the process to set up and run Backstage locally on your machine.
Table of Contents
Prerequisites
Before you start, make sure you have the following installed on your machine:
Node.js: Backstage requires Node.js. You can download it from the Node.js website. It is recommended to use the LTS version.
Yarn: Backstage uses Yarn as its package manager. You can install it globally using npm:
npm install --global yarnGit
Docker
Setting Up Backstage
To install the Backstage Standalone app, you can use npx. npx is a tool that comes preinstalled with Node.js and lets you run commands straight from npm or other registries.
npx @backstage/create-app@latest
This command will create a new directory with a Backstage app inside. The wizard will ask you for the name of the app. This name will be created as sub directory in your current working directory.
Below is a simplified layout of the files and folders generated when creating an app.
app
├── app-config.yaml
├── catalog-info.yaml
├── package.json
└── packages
├── app
└── backend
- app-config.yaml: Main configuration file for the app. See Configuration for more information.
- catalog-info.yaml: Catalog Entities descriptors. See Descriptor Format of Catalog Entities to get started.
- package.json: Root package.json for the project. Note: Be sure that you don’t add any npm dependencies here as they probably should be installed in the intended workspace rather than in the root.
- packages/: Lerna leaf packages or “workspaces”. Everything here is going to be a separate package, managed by lerna.
- packages/app/: A fully functioning Backstage frontend app that acts as a good starting point for you to get to know Backstage.
- packages/backend/: We include a backend that helps power features such as Authentication, Software Catalog, Software Templates, and TechDocs, amongst other things.
Run the Backstage Application
You can run it in Backstage root directory by executing this command:
yarn dev