Welcome back the Backstage 101 workshop! In this section, you will learn how to configure Backstage.
Before you start, you will need to have installed the required tools and installed Backstage using the Getting Started guide.
The app-config.yaml file is where you can configure Backstage. You can find this file in the root directory of your backstage app.
You can change the title of your Backstage app by changing the title field in the app-config.yaml file.
app:
title: 'My Backstage App'You can change the organization name by changing the organization field in the app-config.yaml file.
app:
organization:
name: ACME CorpHere you can change the port and host that Backstage listens on. By default, Backstage listens on port TCP/3000 & TCP/7007 on localhost.
app:
listen:
port: 3000
host: 0.0.0.0
backend:
listen:
port: 7007
host: 0.0.0.0If you change the frontend (app) port you will also need to change the CORS configuration.
backend:
cors:
origin: http://localhost:YOUR_UPDATED_PORTYou can deploy a Postgres database using Docker. Run the following command:
docker pull postgres:17.0-bookworm
docker run -d --name backstage-postgres --restart=always -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword postgres:17.0-bookwormbackend:
database:
client: pg
connection:
host: localhost
port: 5432
user: postgres
password: mysecretpasswordThis is fine for local development, but in production, you should use environment variables to store sensitive information.
backend:
database:
client: pg
connection:
host: ${POSTGRES_HOST}
port: ${POSTGRES_PORT}
user: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}When running backstage you will need to configure the following environment variable:
export NODE_OPTIONS=--no-node-snapshotTo apply the changes, you will need to restart your Backstage app.
yarn devNot Working? Check the logs in the terminal where you started the Backstage app.
Still not working? Check out our example app-config.yaml file here.
Open your browser and navigate to http://localhost:3000 to see the changes you have made.
In the next section, you will learn how to set up Auth in Backstage.
Want to skip ahead? You can come back to this section later.