Prerequisites
Required Software
- Ruby: Version
3.4.4(specified in.ruby-version) - Node.js: Version
24.x - pnpm: Version
10.x - PostgreSQL: Version 12 or higher
- Redis: Version 6 or higher
- rbenv: For Ruby version management
Optional Tools
- Overmind: Process manager for running multiple services (recommended)
- Foreman: Alternative process manager
Step-by-Step Setup
1. Install Ruby
Userbenv to manage Ruby versions:
Always run
eval "$(rbenv init -)" before executing any bundle or rspec commands to ensure the correct Ruby and Bundler versions are used.2. Install Node.js and pnpm
Install Node.js 24.x and pnpm 10.x:3. Install PostgreSQL and Redis
macOS (using Homebrew):4. Clone the Repository
5. Install Dependencies
Install both Ruby and JavaScript dependencies:6. Set Up the Database
Create and set up the database:7. Configure Environment Variables
Create a.env file in the project root:
.env file with your local configuration. At minimum, you’ll need:
Running the Application
Option 1: Using Overmind (Recommended)
Overmind is the recommended way to run all services:- Rails server
- Vite dev server (for frontend assets)
- Sidekiq (background jobs)
- Other required services
Option 2: Using pnpm
overmind start -f Procfile.dev.
Option 3: Using Foreman
Option 4: Running Services Individually
In separate terminal windows:Accessing the Application
Once running, access Chatwoot at:- Application: http://localhost:3000
- Vite dev server: http://localhost:5173
- Email: Check the console output after running
rails db:seed - Password: Check the console output after running
rails db:seed
Seeding Test Data
Chatwoot provides multiple seeding options:Basic Test Data
Quickly populate minimal data for standard feature verification:Search Test Data
Bulk fixture generation for search/performance/manual load scenarios:Account Sample Data (Richer Test Data)
TheSeeders::AccountSeeder provides richer test data:
Via Super Admin UI:
- Log in as Super Admin
- Navigate to Accounts
- Click “Seed” (enqueues
Internal::SeedAccountJob)
Codex Worktree Workflow (Advanced)
For working on multiple features simultaneously:- Use a separate git worktree + branch per task
- Keep Codex-specific setup under
.codex/ - Use
Procfile.worktreefor process orchestration - Dynamically generate per-worktree DB/port values to avoid collisions
- Start each worktree with its own Overmind socket/title
Troubleshooting
Bundle Install Fails
Ensure you have the correct Ruby version:Database Connection Issues
Verify PostgreSQL is running:.env file for correct database credentials.
Redis Connection Issues
Verify Redis is running:Port Already in Use
If port 3000 is already in use:Vite Build Issues
Clear the cache and reinstall:Next Steps
Now that your environment is set up:- Read the Code Style Guide
- Learn about Testing
- Check out open issues to find something to work on
- Join the Discord community to connect with other contributors

