Here is a detailed, professional-quality tutorial on Backstage. This guide is comprehensive but clear, designed for everyone from beginners to experienced platform engineers. It covers all the requested topics, includes practical examples, and is structured for real-world use.
1. Introduction
What is Backstage?
Backstage is an open-source developer portal framework, originally created by Spotify, that helps organizations build a unified portal for all their engineering tools, services, documentation, and data. Think of it as an internal “app store” for all things engineering, letting teams easily find, manage, and collaborate on software assets.
Why Do Organizations Use Backstage?
- Centralizes scattered tools: Replaces dozens of links and UIs with a single entry point.
- Boosts developer productivity: Developers spend less time hunting for docs, APIs, and tools.
- Improves onboarding: New hires can quickly discover and understand internal tools and standards.
- Enables platform thinking: Empowers teams to build a company-wide developer platform.
Key Features & Benefits
Feature | Benefit |
---|---|
Software Catalog | Unified listing of all software, APIs, docs, and owners |
Plugins | Extensible for any tool or data source |
TechDocs | Built-in technical documentation engine |
Authentication | Enterprise-ready access control |
Custom Branding | Make the portal “feel” like your own company |
Open-Source Ecosystem | Large community, many plugins, actively developed |
2. Core Concepts
Software Catalog
- What: Centralized, searchable registry of all your software (microservices, libraries, websites, etc).
- Why: Makes ownership, documentation, and standards discoverable.
Plugins
- What: Modular features that extend Backstage (e.g., CI/CD, monitoring, docs, Kubernetes dashboards).
- Why: Lets you tailor the portal to your organization’s needs.
Entities, Components, Systems
- Entity: Anything tracked in the catalog (e.g., service, website, API).
- Component: A software part (microservice, library, data pipeline).
- System: A group of related components that form a product or platform.
TechDocs
- What: Built-in solution to generate and display technical docs (from Markdown) right in Backstage.
- Why: Makes it easy for teams to maintain up-to-date docs, close to their code.
3. Architecture Overview
How Backstage Works
- Front-End: React-based web UI, customizable with your branding and plugins.
- Back-End: Node.js/Express server handling APIs, integrations, catalog, and plugin logic.
- Plugins: Both frontend and backend can be extended by adding plugins.
Deployment Options
- Self-Hosted: Run on your own Kubernetes, VM, or cloud platform.
- Managed (e.g., Roadie): Third-party vendors offer Backstage as a service.
4. Installation & Setup
Prerequisites
Step-by-Step Local Installation
- Install prerequisites:
node -v # Should show 16.x or higher yarn -v git --version
- Create a new Backstage app:
npx @backstage/create-app@latest
- Enter your app name (e.g.,
company-portal
) cd company-portal
- Enter your app name (e.g.,
- Run Backstage locally:
yarn install yarn dev
Initial Configuration
- Edit
app-config.yaml
for organization name, authentication, and catalog settings. - See Backstage Configuration Docs
5. Authentication & Authorization
Enterprise Identity Integration
Backstage supports multiple providers out of the box:
- Google OAuth
- Okta
- LDAP/SAML
- GitHub/GitLab
Example: Google OAuth
- Create a Google Cloud Project, enable OAuth, and set up credentials.
- Add to
app-config.yaml
:auth: providers: google: development: clientId: ${GOOGLE_CLIENT_ID} clientSecret: ${GOOGLE_CLIENT_SECRET}
- Restart the app, login screen should show Google.
Managing User Access
- Use Backstage’s built-in RBAC.
- You can restrict who can see which services, edit docs, run pipelines, etc.
6. Configuring the Software Catalog
Onboarding Services and Tools
Backstage catalogs your assets via YAML entity definitions.
Sample service YAML (catalog-info.yaml):
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: my-service
description: My sample microservice
tags:
- nodejs
- api
spec:
type: service
owner: team-platform
lifecycle: production
- Place this in your repo root, or register via the Catalog UI.
Best Practices
- Use consistent naming and owner fields.
- Tag everything (language, team, lifecycle).
- Automate registration with CI if possible.
Using the Catalog UI
- Access “Create” in the sidebar to add new entities.
- Search, filter, and view relationships between systems, components, and APIs.
7. Adding and Using Plugins
Popular Plugins
- TechDocs: Native docs for each service.
- CI/CD: Jenkins, GitHub Actions, GitLab, Azure Pipelines integrations.
- Kubernetes: View Pod health, logs, and resources.
- GitHub, PagerDuty, Sentry, etc.
Install Example – TechDocs:
yarn add --cwd packages/app @backstage/plugin-techdocs
yarn add --cwd packages/backend @backstage/plugin-techdocs-backend
- Enable in
app-config.yaml
as per plugin docs.
How to Create a Custom Plugin
- Run:
yarn backstage-cli create-plugin
- Follow prompts; scaffolded files appear in
/plugins
. - Develop your plugin logic (see Plugin Authoring Guide).
Plugin Use Cases
- Internal dashboards (alerts, builds, deployments)
- Launching scripts or automations
- Embedding status pages or incident management
8. Managing Documentation with TechDocs
How to Document Software in Backstage
- In your service repo, add a
docs/
folder with Markdown files (index.md
as the entrypoint). - Reference the docs location in your
catalog-info.yaml
:spec: type: service owner: team-xyz lifecycle: production documentation: location: ./docs
- Build docs locally with TechDocs CLI:
npx @techdocs/cli build
Setting Up and Using TechDocs Plugin
- See TechDocs setup.
- TechDocs can use MkDocs, support diagrams, embed images, etc.
Tips for Docs Organization
- Keep docs near your code.
- Use diagrams (Mermaid, SVG).
- Set up a team-wide docs review process.
9. CI/CD and Developer Experience
Integrating with CI/CD Tools
- Plugins available for Jenkins, GitHub Actions, GitLab, CircleCI, etc.
- Can display build status, deployment history, pipeline logs in the portal.
Example: Jenkins Plugin
- Install Jenkins plugin, configure API token in
app-config.yaml
. - See Jenkins plugin guide.
How Backstage Improves Developer Workflows
- One-stop shop for starting new projects, checking builds, reading docs.
- Self-service: engineers can onboard services, request resources, track ownership.
10. Customizing Backstage
Branding and UI Customization
- Change logo, theme, sidebar via configuration.
- Example: edit
packages/app/src/themes
for custom color schemes.
Writing Custom Extensions
- Develop plugins as described above.
- Can add custom pages, widgets, or API endpoints.
11. Deployment to Production
Recommended Patterns
Environment | Method | Notes |
---|---|---|
Kubernetes | Helm chart, Kustomize | Most popular for scaling/HA |
AWS | ECS, EKS, or EC2 | Use ALB, S3 for static assets |
VM | PM2, systemd, Docker Compose | Good for simple setups or POCs |
Best Practices
- Store configs securely (secrets manager, env vars).
- Use load balancers for HA.
- Monitor with Prometheus, Datadog, etc.
12. Best Practices & Common Pitfalls
Tips for Success
- Start simple: just catalog and docs.
- Automate catalog entry generation with CI.
- Get team buy-in by solving real pain points (onboarding, finding owners).
- Contribute back to open-source; stay up-to-date.
Common Pitfalls
- Over-customizing too early.
- Forgetting RBAC and security.
- Not investing in documentation quality.
- Ignoring upgrades/maintenance.
13. Case Studies & Examples
Success Stories
- Spotify:
Invented Backstage to tame hundreds of microservices. Saw 70% faster onboarding, improved developer happiness. - Netflix:
Uses Backstage for developer self-service and standardized documentation. - American Airlines:
Improved discoverability and collaboration across teams.
Example Architecture
[Developers] ---> [Backstage Portal]
| |
[Docs, Build, Alerts, APIs] (via Plugins)
|
[CI/CD Tools, Cloud APIs, Kubernetes]
|
[Cloud Infra, Monitoring, Data]
14. Resources
15. FAQ & Troubleshooting
Question | Answer |
---|---|
Can I use Backstage with Azure? | Yes, via Azure AD, AKS, Azure Pipelines plugins. |
Is Backstage secure? | Enterprise auth, RBAC, secrets best practices recommended. |
Can I extend Backstage? | Yes, via plugins and custom extensions. |
What about upgrades? | Stay updated with releases, follow migration guides. |
Any good starter templates? | Yes, Backstage Software Templates. |
16. Table: Backstage Key Components Overview
Component | Description | Config Location |
---|---|---|
Software Catalog | All software assets, owners, docs | catalog-info.yaml , UI |
TechDocs | Markdown-powered docs in the portal | docs/ , TechDocs plugin |
Plugins | Extend Backstage with more features | Install via Yarn, config |
Auth | Secure login and permissions | app-config.yaml |
UI/Themes | Branding, look and feel | packages/app/src/themes |
You now have a complete, actionable guide to understanding, installing, and using Backstage for your internal developer platform.
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at WIZBRAND