1. Prerequisites
    2. Installing Backstage
    3. Backstage app structure
    4. Running the app
    1. Configuring Backstage
    2. Setting up PostgreSQL
    3. Configuring PostgreSQL
    4. Setting the application name
    5. Setting up authentication
    1. Adding integrations
    2. Adding Components
    3. Configuring for production
    1. Knowledge check

Configuring Backstage

40 MINS

Setting up PostgreSQL

Backstage offers SQLite, an in-memory database, for easy local setup with no external dependencies. SQLite is a great way to kick the tires. But we recommend setting up PostgreSQL for a production-ready deployment. Backstage uses the Knex database library under the covers, which supports many popular databases.

First, let's stop Backstage before we continue. Stop Backstage from the terminal, by pressing Control-C.

Expand your Operating System to view the specific instructions.

Mac OSX
1. For Mac, we recommend Postgres.app which is a desktop solution. Download the latest release and drag Postgres.app into the Applications folder.
2. Launch Postgres from Spotlight or from the Applications folder directly. 
Screenshot of the Postgres app. It says the Database is not running and a message stating: Empty data directory
3. Click the Initialize button, then you’ll see PostgreSQL running with some default databases:
Screenshot of the Postgres app. It says the Database is running
4. The default Postgres.app installation creates a server with two users — postgres, and your Mac username. Neither has a password, since this is designed for an easy, insecure local setup. 5. From a terminal window, you can connect to the database and see these users
    psql -U postgres
    postgres=# \du
   
6. For this tutorial we are going to use the existing postgres user. The next step is to set the password:
 postgres=# ALTER USER postgres PASSWORD 'secret';
7. It will respond with `ALTER ROLE`. Type '\q', followed by pressing the 'enter' key.
Linux
1. Install postgresql
   
    sudo apt-get install postgresql
   
2. Test if your database is working:
    sudo -u postgres psql
   
3. You should see a very welcoming message, like:
 psql (12.9 (Ubuntu 12.9-0ubuntu0.20.04.1))
 Type "help" for help.

postgres=#

4. For this tutorial we are going to use the existing postgres user. The next step is to set the password:
    postgres=# ALTER USER postgres PASSWORD 'secret';
5. It will respond with `ALTER ROLE`. Type '\q', followed by pressing the 'enter' key.
Windows
Coming soon-ish