LogoLogo
HomeDonateBastion HQ
  • Introduction
  • 📑Prerequisites
    • Add Bot to Server
    • Setup Database
    • Get API Keys
  • 📥Install
    • Install on Linux
    • Install on macOS
    • Install on Windows
    • Install on DigitalOcean
    • Install on Docker
  • ⚙️Configure
    • Configure Bastion
    • Publish Commands
  • ▶️Run
    • Run on Linux
    • Run on macOS
    • Run on Windows
    • Run on Docker
  • 📤Update
    • Update on Linux
    • Update on macOS
    • Update on Windows
    • Update on Docker
  • 👩‍💻Developers
    • Code of Conduct
    • Contributing Guidelines
      • Issues
      • Pull Requests
  • 🪜Migrate
    • Upgrade from v8 to v10
Powered by GitBook

Copyright © 2022 — TRACTION

On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Prerequisites

Setup Database

PreviousAdd Bot to ServerNextGet API Keys

Last updated 2 years ago

Was this helpful?

Bastion uses MongoDB to store its data. You can either install MongoDB on your own system or use a MongoDB cloud service like MongoDB Atlas.

Head over to and signup for a new account.

Create a database cluster by going to Database > Create.

Add a database user by going to Database Access > Add new database user.

Use Password authentication method. The set the username and password you want. Ensure it is secure though.

Add a Built-in Role and select the Read and write to any database option and click Add User to create the database user.

Now head back to Database and click on Connect > Connect your application.

Copy the connection URI and replace the <password> in the URI to the password you set for the database user you created earlier.

The URI will look like the following. Make sure to replace <password> and <dbname>, <username> and <cluster> will be filled out for you.

mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<dbnamne>?retryWrites=true&w=majority

If you want to install MongoDB on your on system follow the installation guide for your operating system before proceeding with the installation.

📑
mongodb.com/cloud/atlas
Install MongoDB Community Editionmongodb
Logo
MongoDB Atlas provides provides one free shared cluster that should be more than enough for Bastion.