This guide explains how to run MindRoot using Docker and Docker Compose.
The Docker configuration uses Python 3.12.
- Docker
- Docker Compose (usually included with Docker Desktop)
- Clone or download the MindRoot repository
- Navigate to the MindRoot directory
- Configure environment variables in
docker-compose.yml - Build and start the containers:
docker-compose up -d- Access MindRoot at http://localhost:8010
Edit the docker-compose.yml file to configure your environment variables:
environment:
- JWT_SECRET_KEY=your_jwt_secret_key # Required: change this to a secure random string
- OPENAI_API_KEY=your_openai_api_key # Optional: for OpenAI integration
- ANTHROPIC_API_KEY=your_anthropic_api_key # Optional: for Anthropic integration
- REQUIRE_EMAIL_VERIFY=false # Optional: set to true to require email verification
# SMTP settings (required if REQUIRE_EMAIL_VERIFY=true)
- SMTP_HOST=your_smtp_host
- SMTP_PORT=your_smtp_port
- SMTP_USER=your_smtp_username
- SMTP_PASSWORD=your_smtp_password
- SMTP_FROM=your_from_emailThe Docker setup mounts these directories as volumes to persist data outside the container:
./data: Chat history, sessions, and other data./models: AI models./personas: Agent personas./imgs: Images
If you've made changes to the Dockerfile or want to rebuild the image:
docker-compose builddocker-compose downdocker-compose logs -fIf you encounter permission issues with the mounted volumes, you may need to adjust the permissions of the directories:
chmod -R 777 data models personas imgsCheck the logs for error messages:
docker-compose logs
### Missing libgl or OpenCV Dependencies
The Dockerfile includes `libgl1-mesa-dev` which is required for some image processing functionality. If you encounter errors related to OpenCV or other image processing libraries, you may need to install additional dependencies in the Dockerfile:
```bashEnsure the container is running:
docker-compose psCheck if the port mapping is correct in the docker-compose.yml file.