+
+
+
nuxt
+
%
npm
+
+
crystal
matplotlib
+
+
helm
+
+
objc
gin
pycharm
+
+
vscode
clickhouse
+
pascal
+
+
f#
โˆ‰
+
remix
babel
+
julia
+
+
+=
css
::
+
circle
+
+
+
pandas
+
+
+
ubuntu
xcode
mvn
%
+
angular
c++
+
[]
fortran
+
=>
hugging
vault
ios
http
+
+
+
redhat
rocket
delphi
cypress
scheme
graphdb
+
+
+
jax
solid
php
+
+
+
+
+
+
play
htmx
+
+
+
Back to Blog
๐ŸŽญ Backstage Developer Portal Setup on AlmaLinux 9: Complete Platform Engineering Guide
AlmaLinux Backstage Developer Portal

๐ŸŽญ Backstage Developer Portal Setup on AlmaLinux 9: Complete Platform Engineering Guide

Published Sep 6, 2025

Learn how to install and configure Backstage developer portal on AlmaLinux 9. Step-by-step guide with service catalog, software templates, documentation, and plugin integration.

5 min read
0 views
Table of Contents

๐ŸŽญ Backstage Developer Portal Setup on AlmaLinux 9: Complete Platform Engineering Guide

Welcome to the future of developer experience! ๐ŸŽ‰ Today weโ€™re going to learn how to set up Backstage on AlmaLinux 9, the amazing developer portal platform originally created by Spotify and now a CNCF project. Think of Backstage as your developerโ€™s command center that unifies all tools, services, and documentation in one beautiful interface! ๐Ÿš€โœจ

๐Ÿค” Why is Backstage Important?

Modern software development involves juggling countless tools, services, and documentation sources. Hereโ€™s why Backstage is a game-changer for developer productivity:

  • ๐ŸŽฏ Single Pane of Glass - Unify all your tools, services, and infrastructure in one portal
  • ๐Ÿ“š Centralized Documentation - Docs-as-code with automatic synchronization and discovery
  • ๐Ÿ—๏ธ Software Templates - Standardize project creation with golden path templates
  • ๐Ÿ“Š Service Catalog - Discover and understand all services in your ecosystem
  • ๐Ÿ”Œ Plugin Ecosystem - Integrate with CI/CD, monitoring, security, and cloud tools
  • ๐ŸŽจ Self-Service Platform - Empower developers to create and manage their own resources

๐ŸŽฏ What You Need

Before we start our Backstage adventure, letโ€™s make sure you have everything ready:

โœ… AlmaLinux 9 system (fresh installation recommended)
โœ… Root or sudo access for installing packages
โœ… At least 8GB RAM (16GB recommended for production)
โœ… 20GB free disk space for Node.js, dependencies, and data
โœ… Internet connection for downloading packages and dependencies
โœ… Basic terminal knowledge (donโ€™t worry, weโ€™ll explain everything!)
โœ… Git repository access (GitHub, GitLab, or Bitbucket)
โœ… Node.js 18+ experience (helpful but not required)

๐Ÿ“ Step 1: Update Your AlmaLinux System

Letโ€™s start by making sure your system is up to date! ๐Ÿš€

# Update all packages to latest versions
sudo dnf update -y

# Install essential development tools
sudo dnf groupinstall "Development Tools" -y

# Install helpful utilities we'll need
sudo dnf install -y curl wget git vim htop python3 python3-pip

Perfect! Your system is now ready for Backstage installation! โœจ

๐Ÿ”ง Step 2: Install Node.js and Yarn

Backstage is built with Node.js and TypeScript. Letโ€™s install the latest Node.js:

# Install Node.js 18 from NodeSource repository
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
sudo dnf install -y nodejs

# Verify Node.js installation
node --version  # Should show v18.x.x
npm --version   # Should show npm version

# Install Yarn package manager (recommended for Backstage)
sudo npm install -g yarn

# Verify Yarn installation
yarn --version

# Update npm to latest version
sudo npm install -g npm@latest

Awesome! Node.js and Yarn are ready for Backstage! ๐Ÿ“ฆ

๐ŸŒŸ Step 3: Create Backstage Application

Letโ€™s create your Backstage application using the official scaffolding tool:

# Create directory for your Backstage installation
mkdir -p ~/backstage-setup
cd ~/backstage-setup

# Create a new Backstage app (this takes a few minutes)
npx @backstage/create-app@latest

# You'll be prompted for:
# - Application name: my-backstage-portal
# - Database type: SQLite (for development) or PostgreSQL (for production)

# Navigate into your new Backstage app
cd my-backstage-portal

# Install all dependencies
yarn install

# This will take several minutes to download and install all packages

Great! Your Backstage application is created! ๐ŸŽญ

โœ… Step 4: Configure Basic Settings

Letโ€™s configure Backstage with your organization details:

# Edit the app configuration file
cat > app-config.yaml << 'EOF'
app:
  title: My Company Developer Portal
  baseUrl: http://localhost:3000

organization:
  name: My Company

backend:
  baseUrl: http://localhost:7007
  listen:
    port: 7007
  csp:
    connect-src: ["'self'", 'http:', 'https:']
  cors:
    origin: http://localhost:3000
    methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
    credentials: true
  database:
    client: better-sqlite3
    connection: ':memory:'

integrations:
  github:
    - host: github.com
      token: ${GITHUB_TOKEN}  # We'll set this later

techdocs:
  builder: 'local'
  generator:
    runIn: 'local'
  publisher:
    type: 'local'

auth:
  environment: development
  providers:
    github:
      development:
        clientId: ${AUTH_GITHUB_CLIENT_ID}
        clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}

scaffolder:
  github:
    token: ${GITHUB_TOKEN}
    visibility: public

catalog:
  import:
    entityFilename: catalog-info.yaml
    pullRequestBranchName: backstage-integration
  rules:
    - allow: [Component, System, API, Resource, Location]
  locations:
    # Local example components
    - type: file
      target: ./examples/entities.yaml

    # Example GitHub discovery
    - type: url
      target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml

    # Example template
    - type: url
      target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml
      rules:
        - allow: [Template]
EOF

# Create example entities file
mkdir -p examples
cat > examples/entities.yaml << 'EOF'
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: my-website
  title: My Company Website
  description: Company marketing website built with React
  annotations:
    github.com/project-slug: mycompany/website
  tags:
    - react
    - website
    - frontend
  links:
    - url: https://my-company.com
      title: Production Site
    - url: https://staging.my-company.com  
      title: Staging Site
spec:
  type: website
  lifecycle: production
  owner: frontend-team
  system: public-websites

---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: user-service
  title: User Management Service
  description: RESTful API for user authentication and management
  annotations:
    github.com/project-slug: mycompany/user-service
  tags:
    - api
    - nodejs
    - backend
spec:
  type: service
  lifecycle: production
  owner: backend-team
  system: core-platform
  providesApis:
    - user-api

---
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
  name: user-api
  title: User Management API
  description: REST API for user operations
spec:
  type: openapi
  lifecycle: production
  owner: backend-team
  system: core-platform
  definition:
    $text: |
      openapi: 3.0.0
      info:
        title: User API
        version: 1.0.0
      paths:
        /users:
          get:
            summary: List users
            responses:
              200:
                description: List of users
EOF

Your Backstage configuration is now ready! ๐Ÿ› ๏ธ

๐Ÿ”ง Step 5: Start Backstage Development Server

Letโ€™s launch your Backstage portal:

# Start the development server (this runs both frontend and backend)
yarn dev

# This will start:
# - Backend server on port 7007
# - Frontend React app on port 3000

# Wait for both servers to start (takes 2-3 minutes)
# You'll see messages like:
# - "webpack compiled with 0 errors"  
# - "Backend started on port 7007"

Amazing! Your Backstage portal is now running! ๐Ÿš€

Open your browser and visit: http://your-server-ip:3000 to see the beautiful Backstage interface! โœจ

๐ŸŒŸ Step 6: Set Up GitHub Integration

Letโ€™s integrate with GitHub to make Backstage really powerful:

# Stop the development server (Ctrl+C)

# Create a GitHub personal access token at:
# https://github.com/settings/tokens/new
# Select these scopes: repo, workflow, write:packages, read:packages

# Set environment variables for GitHub integration
cat >> ~/.bashrc << 'EOF'
export GITHUB_TOKEN="your_github_token_here"
export AUTH_GITHUB_CLIENT_ID="your_github_oauth_client_id"
export AUTH_GITHUB_CLIENT_SECRET="your_github_oauth_client_secret"
EOF

# Reload environment
source ~/.bashrc

# For GitHub OAuth (optional but recommended):
# 1. Go to GitHub Settings > Developer settings > OAuth Apps
# 2. Create new OAuth App with:
#    - Homepage URL: http://your-server:3000
#    - Callback URL: http://your-server:3000/api/auth/github/handler

# Restart Backstage with GitHub integration
yarn dev

Now you have GitHub integration with authentication! ๐Ÿ”—

๐ŸŽฎ Quick Examples

Letโ€™s try some practical examples to see Backstageโ€™s capabilities! ๐Ÿš€

Example 1: Create a Software Template

# Create a custom template for new microservices
mkdir -p templates/microservice-template
cd templates/microservice-template

# Create template.yaml
cat > template.yaml << 'EOF'
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  name: microservice-template
  title: Node.js Microservice Template
  description: Create a new Node.js microservice with best practices
  tags:
    - nodejs
    - microservice
    - backend
spec:
  owner: platform-team
  type: service

  parameters:
    - title: Service Information
      required:
        - name
        - description
      properties:
        name:
          title: Name
          type: string
          description: Unique name for the microservice
          pattern: '^[a-zA-Z0-9-]+$'
        description:
          title: Description
          type: string
          description: What does this service do?
        owner:
          title: Owner
          type: string
          description: Team responsible for this service
          default: backend-team

  steps:
    - id: fetch-base
      name: Fetch Base Template
      action: fetch:template
      input:
        url: ./content
        values:
          name: ${{ parameters.name }}
          description: ${{ parameters.description }}
          owner: ${{ parameters.owner }}

    - id: publish
      name: Publish to GitHub
      action: publish:github
      input:
        allowedHosts: ['github.com']
        description: ${{ parameters.description }}
        repoUrl: github.com/mycompany/${{ parameters.name }}
        defaultBranch: main

    - id: register
      name: Register in Catalog
      action: catalog:register
      input:
        repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
        catalogInfoPath: '/catalog-info.yaml'

  output:
    links:
      - title: Repository
        url: ${{ steps.publish.output.remoteUrl }}
      - title: Open in catalog
        icon: catalog
        entityRef: ${{ steps.register.output.entityRef }}
EOF

# Create template content
mkdir -p content
cat > content/catalog-info.yaml << 'EOF'
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: ${{ values.name }}
  title: ${{ values.name | title }}
  description: ${{ values.description }}
  annotations:
    github.com/project-slug: mycompany/${{ values.name }}
  tags:
    - nodejs
    - microservice
spec:
  type: service
  lifecycle: experimental
  owner: ${{ values.owner }}
EOF

cat > content/package.json << 'EOF'
{
  "name": "${{ values.name }}",
  "version": "1.0.0",
  "description": "${{ values.description }}",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "dev": "nodemon index.js",
    "test": "jest"
  },
  "dependencies": {
    "express": "^4.18.2"
  },
  "devDependencies": {
    "nodemon": "^3.0.1",
    "jest": "^29.0.0"
  }
}
EOF

cat > content/index.js << 'EOF'
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;

app.get('/', (req, res) => {
  res.json({
    service: '${{ values.name }}',
    description: '${{ values.description }}',
    status: 'healthy',
    timestamp: new Date().toISOString()
  });
});

app.get('/health', (req, res) => {
  res.json({ status: 'ok' });
});

app.listen(port, () => {
  console.log(`${{ values.name }} listening on port ${port}`);
});
EOF

# Update app-config.yaml to include your template
cat >> ../../app-config.yaml << 'EOF'

    - type: file
      target: ./templates/microservice-template/template.yaml
      rules:
        - allow: [Template]
EOF

Now you have a custom software template for creating microservices! ๐Ÿ—๏ธ

Example 2: Set Up TechDocs Documentation

# Go back to your Backstage root directory
cd ~/backstage-setup/my-backstage-portal

# Install TechDocs dependencies
pip3 install mkdocs-techdocs-core

# Create a documentation example
mkdir -p docs
cat > docs/index.md << 'EOF'
# Welcome to My Company Developer Portal

## What is this portal?

This is our centralized developer portal built with Backstage. Here you can:

- ๐Ÿ” Discover all our services and APIs
- ๐Ÿ“š Access up-to-date documentation
- ๐Ÿš€ Create new projects from templates
- ๐Ÿ”— Find links to all development tools

## Quick Start

### For New Developers

1. Browse the [Software Catalog](/catalog) to see all our services
2. Check out our [Software Templates](/create) to start new projects
3. Read the [API Documentation](/docs) for integration guides

### For Platform Engineers

1. Add your services to the catalog with `catalog-info.yaml`
2. Create templates for common patterns
3. Set up monitoring and alerting integrations

## Need Help?

- ๐Ÿ’ฌ Join our Slack channel: #developer-platform
- ๐Ÿ“ง Email: [email protected]
- ๐Ÿ› Report issues: [GitHub Issues](https://github.com/mycompany/backstage)
EOF

cat > mkdocs.yml << 'EOF'
site_name: 'My Company Developer Portal'
site_description: 'Developer documentation and guides'

nav:
  - Home: index.md

plugins:
  - techdocs-core

markdown_extensions:
  - admonition
  - codehilite
  - pymdownx.superfences
EOF

# Update your component to use TechDocs
cat >> examples/entities.yaml << 'EOF'

---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: developer-portal
  title: Developer Portal Documentation
  description: Central documentation for our developer platform
  annotations:
    backstage.io/techdocs-ref: dir:.
spec:
  type: documentation
  lifecycle: production
  owner: platform-team
EOF

Your documentation is now integrated with Backstage! ๐Ÿ“š

Example 3: Add Monitoring Dashboard Plugin

# Install a popular plugin for monitoring integration
yarn add --cwd packages/app @backstage/plugin-prometheus

# Add to your frontend app
cat >> packages/app/src/App.tsx << 'EOF'
// Add this import at the top
import { PrometheusPage } from '@backstage/plugin-prometheus';

// Add this route in your routes section
<Route path="/prometheus" element={<PrometheusPage />} />
EOF

# Configure Prometheus integration in app-config.yaml
cat >> app-config.yaml << 'EOF'

prometheus:
  proxyPath: /prometheus/api
  uiUrl: 'http://localhost:9090'
  serviceUrl: 'http://prometheus-server:9090'
EOF

Now you have monitoring integration in your developer portal! ๐Ÿ“Š

๐Ÿšจ Fix Common Problems

Here are solutions to the most common Backstage issues you might encounter:

Problem 1: Build Failures or Dependencies Issues ๐Ÿ”ง

Symptoms: โ€œModule not foundโ€ or compilation errors

Solutions:

# Clear all caches and reinstall dependencies
rm -rf node_modules yarn.lock packages/*/node_modules
yarn cache clean
yarn install

# If using Node.js 18+, you might need legacy OpenSSL
export NODE_OPTIONS="--openssl-legacy-provider"

# Update all Backstage packages to latest versions
yarn backstage:versions:bump
yarn install

Problem 2: GitHub Integration Not Working ๐Ÿ”—

Symptoms: Canโ€™t fetch repositories or authentication failures

Solutions:

# Verify your GitHub token has correct permissions
curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user

# Check required scopes: repo, workflow, write:packages, read:packages
# Update token permissions at: https://github.com/settings/tokens

# Test GitHub integration
yarn backstage:fetch:github --repo mycompany/myrepo

Problem 3: TechDocs Not Generating ๐Ÿ“š

Symptoms: Documentation pages showing โ€œFailed to buildโ€ or 404 errors

Solutions:

# Install missing Python dependencies
pip3 install mkdocs-techdocs-core

# Verify mkdocs.yml is valid
mkdocs serve --config-file mkdocs.yml

# Check TechDocs configuration in app-config.yaml
# Make sure techdocs.builder is set to 'local'

# Clear TechDocs cache
rm -rf ~/.cache/techdocs

Problem 4: High Memory Usage ๐Ÿ’พ

Symptoms: Development server using excessive RAM or crashing

Solutions:

# Increase Node.js memory limit
export NODE_OPTIONS="--max-old-space-size=8192"

# Use production build for lower memory usage
yarn tsc
yarn build:backend
yarn build:frontend

# Run in production mode
NODE_ENV=production yarn start:backend &
NODE_ENV=production yarn start:frontend

๐Ÿ“‹ Simple Commands Summary

Hereโ€™s your quick reference guide for Backstage:

TaskCommandDescription
Start developmentyarn devLaunch both frontend and backend
Build for productionyarn buildCreate production builds
Add new pluginyarn add --cwd packages/app @backstage/plugin-nameInstall plugin
Update Backstageyarn backstage:versions:bumpUpdate to latest versions
Generate typesyarn tscRun TypeScript compiler
Run testsyarn testExecute test suite
Lint codeyarn lintCheck code quality
Create componentyarn newGenerate new Backstage component
Clear cacheyarn cache cleanClear yarn cache
Build docsyarn build:techdocsGenerate TechDocs

๐Ÿ’ก Tips for Success

Here are some pro tips to get the most out of Backstage! ๐ŸŒŸ

๐ŸŽฏ Start with Service Catalog: Begin by cataloging your existing services - this provides immediate value and helps teams discover whatโ€™s available.

โšก Use Software Templates: Create golden path templates for your common patterns (microservices, libraries, documentation sites) to standardize and speed up development.

๐Ÿ“Š Integrate Everything: Connect Backstage to your existing tools (CI/CD, monitoring, security scanning) to create a true single pane of glass.

๐Ÿ” Implement Search: Configure search to index your services, documentation, and tools - developers will use this feature constantly.

๐Ÿ’พ Plan Your Database: Switch from SQLite to PostgreSQL for production deployments to handle multiple users and better performance.

๐Ÿš€ Customize the UI: Use your companyโ€™s branding, colors, and logo to make the portal feel like home for your developers.

๐Ÿ”— Create API Documentation: Use the OpenAPI plugin to automatically generate and maintain API documentation from your service definitions.

๐Ÿ›ก๏ธ Set Up Authentication: Implement proper authentication with your identity provider (GitHub, Google, LDAP, SAML) for security and personalization.

๐Ÿ† What You Learned

Congratulations! Youโ€™ve successfully mastered Backstage Developer Portal! ๐ŸŽ‰ Hereโ€™s everything you accomplished:

โœ… Installed and configured Backstage on AlmaLinux 9 with Node.js and Yarn
โœ… Set up service catalog with components, APIs, and systems
โœ… Created software templates for standardized project creation
โœ… Integrated with GitHub for repository discovery and OAuth authentication
โœ… Configured TechDocs for centralized documentation management
โœ… Added monitoring plugins for observability integration
โœ… Built custom templates for microservice scaffolding
โœ… Learned troubleshooting and performance optimization techniques
โœ… Mastered production deployment strategies and best practices

๐ŸŽฏ Why This Matters

Backstage transforms the developer experience from chaos to clarity! ๐Ÿš€ You can now:

๐ŸŽญ Unify Developer Tools: Provide a single interface for all development tools, reducing context switching and improving productivity
๐Ÿ“š Centralize Knowledge: Keep documentation, APIs, and service information in one discoverable location
๐Ÿ—๏ธ Standardize Development: Use templates and golden paths to ensure consistency across teams and projects
๐Ÿ” Improve Discoverability: Help developers find services, APIs, and documentation quickly without asking around
โšก Accelerate Onboarding: New team members can get up to speed faster with centralized information and self-service capabilities
๐Ÿ“Š Gain Visibility: Get insights into your software ecosystem and identify improvement opportunities

You now have the skills to implement and manage a world-class developer portal thatโ€™s used by companies like Spotify, Netflix, and thousands of other organizations. Platform engineering and developer experience roles are in high demand, and Backstage expertise makes you incredibly valuable! โญ

Keep building, keep improving, and remember - a great developer portal is the foundation of an exceptional engineering culture! ๐Ÿ™Œโœจ