Skip to main content
Version: dev

Source Code Deployment

Deploy DB-GPT directly from source code. This is the most flexible option for development, debugging, and custom integrations.

Hardware requirements​

ModeCPU × RAMGPUNotes
API proxy4C × 8 GBNoneProxy mode does not use local GPU
Local model8C × 32 GBâ‰Ĩ 24 GB VRAMNVIDIA GPU with CUDA support

Step 1 — Clone the repository​

git clone https://github.com/eosphoros-ai/DB-GPT.git
cd DB-GPT

Step 2 — Install uv​

curl -LsSf https://astral.sh/uv/install.sh | sh

Verify:

uv --version

Step 3 — Install dependencies​

uv sync --all-packages \
--extra "base" \
--extra "proxy_openai" \
--extra "rag" \
--extra "storage_chromadb" \
--extra "dbgpts"
Use the interactive install helper

DB-GPT provides an interactive helper to generate the right uv sync command:

uv run install_help.py install-cmd --interactive

Or list all available extras:

uv run install_help.py list

Step 4 — Configure your model​

Edit the TOML config file for your chosen provider. See Model Providers for details.

Edit configs/dbgpt-proxy-openai.toml:

[models]
[[models.llms]]
name = "chatgpt_proxyllm"
provider = "proxy/openai"
api_key = "your-openai-api-key" # <-- replace

[[models.embeddings]]
name = "text-embedding-3-small"
provider = "proxy/openai"
api_key = "your-openai-api-key" # <-- replace
Environment variables

Use "${env:OPENAI_API_KEY}" syntax in TOML to read from environment variables instead of hardcoding keys.

Step 5 — Start the server​

uv run dbgpt start webserver --config configs/dbgpt-proxy-openai.toml

Step 6 — Open the Web UI​

Open your browser and visit http://localhost:5670.

Verify it works

If the Web UI loads and you can start a chat conversation, your DB-GPT is running.

Common first-run issues​

  • uv sync fails
    • Re-check Python and uv: Prerequisites
    • If you are in China, use a mirror via UV_INDEX_URL
  • Provider auth fails
    • Verify the selected TOML file under configs/
    • Check the matching provider guide: Model Providers
  • Server starts but UI is blank
    • Confirm the terminal shows the webserver started cleanly
    • Check whether another process is already using port 5670

Database configuration​

SQLite is the default — tables are created automatically. No extra setup needed.

[service.web.database]
type = "sqlite"
path = "pilot/meta_data/dbgpt.db"

Load test data (optional)​

# Linux / macOS
bash ./scripts/examples/load_examples.sh

# Windows
.\scripts\examples\load_examples.bat

Run web front-end separately (optional)​

For front-end development or custom UI work:

cd web && npm install
cp .env.template .env
# Edit .env — set API_BASE_URL=http://localhost:5670
npm run dev

Open http://localhost:3000.

Next steps​

TopicLink
Configure more model providersModel Providers
Deploy with DockerDocker
Deploy as a clusterCluster
Explore the Web UIWeb UI Guide