---
title: Environment Setup Guide
description: >-
  Step-by-step guide to set up LobeHub development environment locally or
  online.
tags:
  - LobeHub
  - Development Setup
  - Node.js
  - PNPM
  - Bun
  - Git
  - VSCode
---

# Environment Setup Guide

Welcome to the LobeHub development environment setup guide.

## 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

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.

### Development Environment Requirements

First, you need to install the following software:

- Node.js: LobeHub is built on Node.js, so you need to install Node.js. We recommend installing the latest stable version.
- 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).
- Git: We use Git for version control. You can download and install it from the Git official website.
- 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/lobehub/blob/main/.vscode/extensions.json) for the best development experience.

### Project Setup

After installing the above software, you can start setting up the LobeHub project.

1. **Get the code**: First, you need to clone the LobeHub codebase from GitHub. Run the following command in the terminal:

```bash
git clone https://github.com/lobehub/lobehub.git
```

2. **Install dependencies**: Then, navigate to the project directory and use PNPM to install the project's dependencies:

```bash
cd lobehub
pnpm i
```

3. **Start the development server**: After installing the dependencies, you can start the development server:

```bash
bun run dev
```

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.

![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/274655364-414bc31e-8511-47a3-af17-209b530effc7.png)

## Working with Server-Side Features

The basic setup above uses LobeHub's client-side database mode. If you need to work with server-side features such as:

- 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.

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!

[codespaces-link]: https://codespaces.new/lobehub/lobehub
[codespaces-shield]: https://github.com/codespaces/badge.svg
