Skip to main content
Version: v0.5.9


DB-GPT supports the installation and use of a variety of open source and closed models. Different models have different requirements for environment and resources. If localized model deployment is required, GPU resources are required for deployment. The API proxy model requires relatively few resources and can be deployed and started on a CPU machine.

  • Detailed installation and deployment tutorials can be found in Installation.
  • This page only introduces deployment based on ChatGPT proxy and local glm model.

Environmental preparation

Download source code


Download DB-GPT

git clone

Miniconda environment installation

  • The default database uses SQLite, so there is no need to install a database in the default startup mode. If you need to use other databases, you can read the advanced tutorials below. We recommend installing the Python virtual environment through the conda virtual environment. For the installation of Miniconda environment, please refer to the Miniconda installation tutorial.

Create a Python virtual environment

python >= 3.10
conda create -n dbgpt_env python=3.10
conda activate dbgpt_env

# it will take some minutes
pip install -e ".[default]"

Copy environment variables

cp .env.template  .env

Model deployment


Provide two deployment methods to quickly start experiencing DB-GPT.


⚠️ You need to ensure that git-lfs is installed

● CentOS installation: yum install git-lfs
● Ubuntu installation: apt-get install git-lfs
● MacOS installation: brew install git-lfs

Install dependencies

pip install  -e ".[openai]"

Download embedding model

mkdir models and cd models
git clone

Configure the proxy and modify LLM_MODEL, PROXY_API_URL and API_KEY in the .envfile

# .env

Test data (optional)

Load default test data into SQLite database

  • Linux
bash ./scripts/examples/
  • Windows

Run service

python dbgpt/app/

Run old service

If you are running version v0.4.3 or earlier, please start with the following command:

python pilot/server/

Run DB-GPT with command dbgpt

If you want to run DB-GPT with the command dbgpt:

dbgpt start webserver

Visit website

Open the browser and visit http://localhost:5670

(Optional) Run web front-end separately

On the other hand, you can also run the web front-end separately.

cd web & npm install
cp .env.template .env
// set the API_BASE_URL to your DB-GPT server address, it usually is http://localhost:5670
npm run dev

Open the browser and visit http://localhost:3000