Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:

Docker

Version 20.10 or higher

Docker Compose

Version 1.29 or higher
You can verify your Docker installation by running docker --version and docker-compose --version

Installation Steps

1

Clone the repository

Clone the Mirobody Health repository to your local machine:
git clone https://github.com/thetahealth/mirobody-health.git
cd mirobody-health
2

Set up configuration files

Create your configuration files from the provided examples:
cp .env_example .env
cp config.example.yaml config.yaml
For a quick test, you can use the default configuration. For production, see the Configuration guide.
3

Add API keys

Edit config.yaml to add your API keys. Both OPENROUTER_API_KEY and GOOGLE_API_KEY are required:
config.yaml
# AI Provider API Keys - REQUIRED
OPENROUTER_API_KEY: 'your_openrouter_api_key'  # REQUIRED for AI chat/agents
GOOGLE_API_KEY: 'your_google_api_key'  # REQUIRED for file processing (Gemini)

# Optional: Additional AI providers
OPENAI_API_KEY: 'your_openai_api_key'
OPENROUTER_API_KEY is required for AI chat and agent features. Get your API key at OpenRouter.GOOGLE_API_KEY (Gemini) is required for processing files like PDFs, images, and medical records. Get your API key at Google AI Studio.
OpenRouter provides access to multiple LLM providers through a single API, while Google Gemini handles multimodal file processing.
4

Deploy with Docker

Run the deployment script to start all services:
./deploy.sh
This will start three services:
  • Backend API on port 18080
  • PostgreSQL database on port 5432
  • Redis cache on port 6379
Wait for all services to start. You should see logs indicating successful startup.
5

Verify the installation

Open your browser and navigate to:
http://localhost:18080
You should see the Mirobody Health welcome page.
6

Log in

Log in with the default demo account or the accounts set up in config.yaml.
Once logged in, you can:
  • Upload files: Lab reports, medical records, health documents (see File Processing)
  • Chat with AI: Ask questions about your health data
  • Connect providers: Link Garmin, Whoop, and other devices (see Using Providers)

Test the API

Once the services are running, you can test the API endpoints:
Verify the server is running:
curl http://localhost:18080/health

Available Endpoints

After deployment, the following endpoints are available:

Docker Services

The deployment includes three containerized services:
ServicePortDescription
backend18080FastAPI application server
postgres5432PostgreSQL database
redis6379Redis cache and session store
You can view logs for any service using:
docker-compose logs -f backend
docker-compose logs -f postgres
docker-compose logs -f redis

Common Commands

docker-compose down
docker-compose restart
# All services
docker-compose logs -f

# Specific service
docker-compose logs -f backend
docker-compose down
docker-compose build --no-cache
docker-compose up -d
docker-compose exec postgres psql -U holistic_user -d holistic_db
docker-compose exec redis redis-cli

Troubleshooting

If port 18080 is already in use, edit config.yaml:
HTTP_PORT: 18081  # Change to an available port
Then restart the services.
Ensure PostgreSQL container is running:
docker-compose ps postgres
Check database logs:
docker-compose logs postgres
Verify Redis is running and accessible:
docker-compose exec redis redis-cli ping
Should return PONG if working correctly.
Make the script executable:
chmod +x deploy.sh

Next Steps

Now that you have Mirobody Health running:
For production deployment, see the Production Deployment guide for security hardening and performance optimization.