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.
- Python
- TypeScript
1. Create a Virtual Environment
Create and activate a Python virtual environment in a directory. DBOS requires Python 3.9 or later.
- macOS or Linux
- Windows (PowerShell)
- Windows (cmd)
python3 -m venv dbos-app-starter/.venv
cd dbos-app-starter
source .venv/bin/activate
python3 -m venv dbos-app-starter/.venv
cd dbos-app-starter
.venv\Scripts\activate.ps1
python3 -m venv dbos-app-starter/.venv
cd dbos-app-starter
.venv\Scripts\activate.bat
2. Install and Initialize DBOS
Install DBOS with pip install dbos
, then initialize an example application.
pip install dbos
dbos init --template dbos-app-starter
3. Start Your App
DBOS requires a Postgres database.
If you already have Postgres, you can set the DBOS_DATABASE_URL
environment variable to your connection string.
Otherwise, you can start Postgres in a Docker container with this command:
dbos postgres start
Now, start your app!
python3 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 python3 app/main.py
and watch it seamlessly recover from where it left off.
Congratulations, you've run your first durable workflow with DBOS! Next:
- Check out the DBOS programming guide to learn how to build reliable applications with DBOS.
- Learn how to add DBOS to your application to make it reliable with just a few lines of code.

1. Initialize an Application
Initalize a starter application and enter its directory. DBOS requires Node v20 or later.
npx @dbos-inc/create@latest --template dbos-node-starter
cd dbos-node-starter
2. Build Your Application
Install dependencies, then build your application.
npm install
npm run build
3. Start Your App
DBOS requires a Postgres database.
If you already have Postgres, you can set the DBOS_DATABASE_URL
environment variable to your connection string.
Otherwise, you can start Postgres in a Docker container with this command:
npx dbos postgres start
Now, start your app!
npm run start
To see that your app is working, visit this URL in your browser: http://localhost:3000/
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 npm run start
and watch it seamlessly recover from where it left off.
Congratulations, you've run your first durable workflow with DBOS! Next:
- Check out the DBOS programming guide to learn how to build reliable applications with DBOS.
- Learn how to add DBOS to your application to make it reliable with just a few lines of code.
