Skip to main content

Get Started with DBOS

DBOS is a library for building reliable programs. This guide shows you how to install and run it on your computer.

1. Create a Virtual Environment

In a clean directory, create a Python virtual environment. DBOS requires Python 3.9 or later.

python3 -m venv .venv
source .venv/bin/activate

2. Install and Initialize DBOS

Install DBOS with pip install dbos, then initialize dbos-app-starter, an example application built with DBOS and FastAPI.

pip install dbos
dbos init --template dbos-app-starter

3. Start Your App

Now, start your app! DBOS will automatically help you launch and connect to a new Postgres database (using Docker if available, else DBOS Cloud). If you already use Postgres, you can instead set the DBOS_DATABASE_URL environment variable to a connection string to your database.

fastapi run app/main.py

To see that your app is working, visit this URL in your browser: http://localhost:8000/

This app lets you test the reliability of DBOS for yourself. Launch a durable workflow and watch it execute its three steps. At any point, crash the app. Then, restart it with fastapi run app/main.py and watch it seamlessly recover from where it left off.

Congratulations, you've run your first durable workflow with DBOS! Next:

http://localhost:8000/
Cloud Console Templates