This guide is for local development purposes. For production deployment,
please refer to the Deploy Kodus
guide.
Prerequisites
- Node.js (LTS version)
- Yarn or NPM
- Docker
- Kodus API running
- LLM API Keys
Running the project
For a quick and automated setup, use our setup script:This script will automatically:After running the script, you only need to:
- ✅ Check if
.env.example
exists - ✅ Generate secure NextAuth secret
- ✅ Handle JWT secret synchronization with your API
- ✅ Create and configure the
.env
file - ✅ Provide clear next steps
JWT Secret Options:
- Option 1: Use existing API JWT secret (recommended if API is already configured)
- Option 2: Generate new JWT secret (copy to API .env file)
- Option 3: Skip JWT setup for now
Development workflow
Basic Local Development
- Start services:
yarn docker:start
- Access web app:
http://localhost:3000
- Monitor logs:
yarn docker:logs
Development with API Integration
If you’re developing with the Kodus API:- Ensure API is running: The API should be accessible at
http://localhost:3001
- Verify JWT secrets match: Both web and API must use the same JWT secret
- Test authentication: Try logging in to verify the connection
Service endpoints
Access the application at:- Development:
http://localhost:3000
- API (external):
http://localhost:3001
Troubleshooting
Common Issues
Authentication not working:- Verify JWT secrets match between web and API
- Check if API is running and accessible
- Ensure
NEXT_PUBLIC_API_URL
is correct
- Clear Docker cache:
docker system prune -a
- Rebuild:
yarn docker:build --no-cache
- Verify
.env
file exists in project root - Check for syntax errors in
.env
file - Restart Docker services after
.env
changes
- Verify API is running on port 3001
- Check network connectivity between containers
- Verify API health endpoint:
http://localhost:3001/health
Getting Help
If you encounter issues:- Check the logs:
yarn docker:logs
- Verify API status: Ensure the Kodus API is running
- Check environment variables: Ensure all required values are set
- Review the API setup guide for backend configuration