This guide will help you set up and run Sagarr, the AI-powered media recommendation engine.
- Docker and Docker Compose installed on your system.
- A Plex account.
- Tautulli (running and accessible).
- Overseerr (running and accessible).
- An OpenAI API Key (or a compatible local AI endpoint like Ollama).
-
Clone the Repository
git clone https://github.com/yourusername/sagarr.git cd sagarr -
Configuration Create a
.envfile in thebackenddirectory (or rely on the Admin UI later).Example
backend/.env(for local dev using Vite on 5173; when using Docker, this is overridden byFRONTEND_URLindocker-compose.yml):# Security SECRET_KEY=your_super_secret_key_here # URLs (for Docker, use the externally reachable frontend URL) FRONTEND_URL=http://localhost:8081 # Optional Pre-configuration (can also be set in UI) TAUTULLI_URL=http://192.168.1.100:8181 TAUTULLI_API_KEY=your_tautulli_key OVERSEERR_URL=http://192.168.1.100:5055 OVERSEERR_API_KEY=your_overseerr_key AI_PROVIDER=openai AI_API_KEY=sk-your-openai-key AI_MODEL=gpt-4o
-
Run with Docker Compose
docker-compose up -d --build
-
Access the Application Open your browser and navigate to
http://localhost:8081.
- Login: Click "Sign in with Plex". You will be redirected to Plex to authenticate.
- Admin Settings: Once logged in, click the "Admin" link in the navigation bar.
- Configure Services: Ensure Tautulli, Overseerr, and AI settings are correct. Click "Save Settings".
- Wait for Sync: The system will sync your watch history from Tautulli (this happens in the background).
- Enjoy: Recommendations will appear on your Dashboard once the nightly job runs or is triggered manually.
- Backend Logs:
docker logs sagarr-backend - Frontend Logs:
docker logs sagarr-frontend - Database: The SQLite database is stored on the host at
/opt/sagarr/data/sagarr.db(bound into the container at/app/data).
To run locally without Docker:
Backend:
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reloadFrontend:
cd frontend
npm install
npm run dev