Local Development Setup
This guide walks you through setting up LobeHub for local development.Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v18 or later) - Download
- pnpm (v10.20.0 or later) - Install guide
- Bun (latest version) - Install guide
- Git - Download
- Docker - Get Docker
- IDE - We recommend VS Code or WebStorm
Quick Start
docker-compose/dev/.env - PostgreSQL, Redis, RustFS, SearXNG settings.env - Database connection, S3 storage, authentication, API keysOpen http://localhost:3010 in your browser.
Service URLs
When running the development environment:| Service | URL |
|---|---|
| Application | http://localhost:3010 |
| SPA Dev Server | http://localhost:9876 |
| PostgreSQL | postgres://postgres@localhost:5432/lobechat |
| Redis | redis://localhost:6379 |
| RustFS API | http://localhost:9000 |
| RustFS Console | http://localhost:9001 |
| SearXNG | http://localhost:8180 |
VS Code Setup
For the best development experience with VS Code:- Install recommended extensions from
.vscode/extensions.json - VS Code will prompt you automatically when you open the project
- Key extensions include:
- ESLint
- Prettier
- TypeScript and JavaScript Language Features
- Tailwind CSS IntelliSense
Alternative Development Modes
GitHub Codespaces
Develop in the cloud with one click:Desktop App Development
To work on the Electron desktop app:Mobile SPA Development
Troubleshooting
Reset Everything
If you encounter issues, reset the entire stack:Port Conflicts
Check what’s using a port:Database Connection Issues
Ensure Docker services are running:Clean Install
Remove all node_modules and reinstall:Next Steps
- Read the Architecture Overview
- Learn about the Tech Stack
- Review Code Style Guidelines
- Check out Contributing Guide