1. Local Setup, Development and Testing
In this chapter, you will set up your local Backstage environment, learn how to start the application in development mode, and explore its core features.
This hands-on introduction will give you the foundation needed to customize and extend Backstage for your organization.
Prerequisites
Before you begin, ensure you have the following installed on your local machine:
- Node.js: Version 22 or 24 (Recommendation: nvm or volta)
- Package Manager: Yarn
- Source Control: Git
- Container: Docker or Podman
Note
You can verify your Node.js version withnode --version. If you need to install or update Node.js, we recommend using nvm
or volta
for easy version management.Task 1.1: Create a New Backstage App
Backstage provides a CLI tool to scaffold a new application quickly. Let’s create your first Backstage instance.
First create a folder for the techlab inside your workspaces folder or in a temporary directory.
Run the following command to create a new Backstage app:
npx -y @backstage/create-app@0.8.2
When prompted, enter a name for your app (my-backstage-app).
Note
The creation process may take several minutes as it downloads dependencies and sets up the project structure.The output should look similar to:
...
copying index.ts ✔
Moving to final location:
moving my-backstage-app ✔
fetching yarn.lock seed ✔
init git repository ◜
Installing dependencies:
init git repository ✔
executing yarn install ✔
executing yarn tsc ✔
🥇 Successfully created my-backstage-app
All set! Now you might want to:
Run the app: cd my-backstage-app && yarn start
Set up the software catalog: https://backstage.io/docs/features/software-catalog/configuration
Add authentication: https://backstage.io/docs/auth/
After the creation process is complete, navigate into your newly created app directory.
cd my-backstage-app
Explore the project structure. You should see:
packages/app/- Frontend React applicationpackages/backend/- Backend Node.js applicationapp-config.yaml- Main configuration filecatalog-info.yaml- Catalog entity for the Backstage app itself (will be explained later)
Task 1.2: Start Backstage in Development Mode
Now let’s start Backstage locally to see it in action.
Start both the frontend and backend in development mode:
yarn start
This command will:
- Start the backend on
http://localhost:7007 - Start the frontend on
http://localhost:3000 - Enable hot-reloading for development
If your browser did not open a tab, navigate to http://localhost:3000
This should show the home page of your newly created Backstage application!

Click on the ENTER button.
You may see a warning message like:
You are currently using the legacy guest token...
Note
This warning is expected for local development. Backstage uses a guest authentication mode by default, which is fine for development purposes. In production, you would configure proper authentication (OAuth, SAML, etc.).
You can safely ignore this warning for now.
Task 1.2.1: Explore the Default Interface
The default installation includes example entities to help you understand how Backstage organizes information.
Take a few minutes to explore the default Backstage interface.
Use the Left-Side vertical navigation to check out your Backstage instance with it’s example content:
- Home (Catalog): The landing page and the catalog main page
- APIs: Check out the APIs section
- Docs: Explore the TechDocs section
- Create: Look at the “Create” section (we’ll use this later for templates)
- Search: Try to search for any content
Now you should have a first insight of the basic Backstage functionality.
Task 1.3: Understand the Configuration
Open the app-config.yaml file in your editor. This is the heart of your Backstage configuration.
Key sections to note:
app:
title: Scaffolded Backstage App #(1)
baseUrl: http://localhost:3000
organization:
name: My Company #(2)
backend:
baseUrl: http://localhost:7007 #(3)
listen:
port: 7007
catalog: #(4)
import:
entityFilename: catalog-info.yaml
rules:
- allow: [Component, System, API, Resource, Location, Group, User]
Explanation:
app.title: The name displayed in the browser taborganization.name: Your company / organization name displayed in the UI.backend.baseUrl: Where the backend API is runningcatalog: Configuration for the software catalog
Task 1.3.1: Customize Your Backstage Instance
Let’s make a simple customization to make this instance your own.
Edit app-config.yaml and change the organization name:
organization:
name: Your Company Name
Also update the app title:
app:
title: Your Company Developer Portal
Save the file.
Thanks to hot-reloading, you should see the changes reflected in your browser within seconds!
Task 1.4: Run Tests
Unit Tests
Backstage comes with a jest testing setup out of the box.
Note
Run the tests in a new terminal inside thebackstage-techlab folder or stop your Backstage by pressing CTRL+c on your keyboard.Start the test suite:
yarn test
You should see a list with all available options.
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
Press a to run all tests and see, that all pass.
PASS app packages/app/src/App.test.tsx
App
✓ should render (33 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 2.822 s, estimated 6 s
Ran all test suites.
For the moment there’s just a basic test to check that the setup is working.
Note
Pressq on your keyboard to exit the test suite.To check the test coverage run:
yarn test:all
You will notice, that there are some lines of code not covered by any tests.
E2E Tests
For end-to-end tests a playwright setup is ready to use.
It will start your Backstage instance and run the tests against it.
yarn test:e2e
Note
Depending on your setup you might get a error running the E2E tests.
You probably need to install browsers first: e.g. yarn playwright install chrome
Task 1.5: Build for Production
While we’re developing locally, it’s useful to understand how to build Backstage for production.
Create a production build:
yarn build:all
This command performs several build steps:
- TypeScript Compilation: Converts all TypeScript code (
.ts,.tsx) to JavaScript - Frontend Bundling: Creates an optimized production bundle of the React application
- Minifies JavaScript and CSS
- Optimizes assets and images
- Creates static files ready for deployment
- Backend Bundling: Packages the Node.js backend application
- Bundles all backend code and dependencies
- Prepares the backend for deployment
- Type Checking: Validates TypeScript types across the entire codebase
Note
The production build artifacts are created in the dist/ directories of each package (packages/app/dist and packages/backend/dist).
These optimized builds are what you would deploy to production. For this techlab, we won’t deploy them, but it’s important to understand the build process.
Summary
In this chapter, you:
- ✅ Created a new Backstage application
- ✅ Explored the default interface
- ✅ Made your first customization
- ✅ Ran tests and created a production build
Your local Backstage environment is now ready for the next steps!
In the next chapters, you’ll learn how to populate the catalog, create templates, and add plugins to make Backstage truly powerful for your organization.