2026-01-21 10:44:44 +00:00
---
title: Environment Setup Guide
2026-01-26 07:28:33 +00:00
description: >-
Step-by-step guide to set up LobeHub development environment locally or
online.
tags:
- LobeHub
- Development Setup
- Node.js
- PNPM
- Bun
- Git
- VSCode
2026-01-21 10:44:44 +00:00
---
2023-12-14 09:17:43 +00:00
# Environment Setup Guide
2026-01-26 07:28:33 +00:00
Welcome to the LobeHub development environment setup guide.
2023-12-14 09:17:43 +00:00
## Online Development
If you have access to GitHub Codespaces, you can click the button below to enter the online development environment with just one click:
[![][codespaces-shield]][codespaces-link]
## Local Development
2026-01-26 07:28:33 +00:00
Before starting development on LobeHub, you need to install and configure some necessary software and tools in your local environment. This document will guide you through these steps.
2023-12-14 09:17:43 +00:00
### Development Environment Requirements
First, you need to install the following software:
2026-01-26 07:28:33 +00:00
- Node.js: LobeHub is built on Node.js, so you need to install Node.js. We recommend installing the latest stable version.
2025-08-26 10:21:22 +00:00
- PNPM: We use PNPM as the preferred package manager. You can download and install it from the [PNPM official website](https://pnpm.io/installation).
- Bun: We use Bun as the npm scripts runner. You can download and install it from the [Bun official website](https://bun.com/docs/installation).
2023-12-14 09:17:43 +00:00
- Git: We use Git for version control. You can download and install it from the Git official website.
2025-08-26 10:21:22 +00:00
- IDE: You can choose your preferred integrated development environment (IDE). We recommend using WebStorm/VSCode.
### VSCode Users
We recommend installing the extensions listed in [.vscode/extensions.json](https://github.com/lobehub/lobe-chat/blob/main/.vscode/extensions.json) for the best development experience.
2023-12-14 09:17:43 +00:00
### Project Setup
2026-01-26 07:28:33 +00:00
After installing the above software, you can start setting up the LobeHub project.
2023-12-14 09:17:43 +00:00
2026-01-26 07:28:33 +00:00
1. **Get the code**: First, you need to clone the LobeHub codebase from GitHub. Run the following command in the terminal:
2023-12-14 09:17:43 +00:00
```bash
git clone https://github.com/lobehub/lobe-chat.git
```
2025-08-26 10:21:22 +00:00
2. **Install dependencies**: Then, navigate to the project directory and use PNPM to install the project's dependencies:
2023-12-14 09:17:43 +00:00
```bash
cd lobe-chat
2025-08-26 10:21:22 +00:00
pnpm i
2023-12-14 09:17:43 +00:00
```
3. **Start the development server**: After installing the dependencies, you can start the development server:
```bash
2025-08-26 10:21:22 +00:00
bun run dev
2023-12-14 09:17:43 +00:00
```
2026-01-26 07:28:33 +00:00
Now, you can open `http://localhost:3010` in your browser, and you should see the welcome page of LobeHub. This indicates that you have successfully set up the development environment.
2023-12-14 09:17:43 +00:00

2025-09-10 17:16:58 +00:00
## Working with Server-Side Features
2026-01-26 07:28:33 +00:00
The basic setup above uses LobeHub's client-side database mode. If you need to work with server-side features such as:
2025-09-10 17:16:58 +00:00
- Database persistence
- File uploads and storage
- Image generation
- Multi-user authentication
- Advanced server-side integrations
Please refer to the [Work with Server-Side Database](/docs/development/basic/work-with-server-side-database) guide for complete setup instructions.
2026-01-26 07:28:33 +00:00
During the development process, if you encounter any issues with environment setup or have any questions about LobeHub development, feel free to ask us at any time. We look forward to seeing your contributions!
2023-12-14 09:17:43 +00:00
[codespaces-link]: https://codespaces.new/lobehub/lobe-chat
[codespaces-shield]: https://github.com/codespaces/badge.svg