This guide will walk you through setting up and installing Phlox.
Before you begin, ensure you have the following prerequisites installed and configured:
-
Podman or Docker: Phlox uses containerization for easy deployment. Install either Podman or Docker.
-
Ollama Instance: Phlox relies on Ollama to run Large Language Models. You need a running Ollama instance, either:
- Locally: Install Ollama on your machine and ensure it's running. You'll likely want to pull models like
llama3.3,mistral, or similar usingollama pull <model_name>. Recommended models:- Standard Hardware: Use
llama3:8b(smaller, faster, suitable for most systems) - Performance-Optimized: Bigger models like
llama3:70bwill provide better results but at the expense of speed. They are only practical for powerful machines with lots of VRAM.
- Standard Hardware: Use
- Remotely: If you have a remote server with Ollama running, you can configure Phlox to connect to it.
- Locally: Install Ollama on your machine and ensure it's running. You'll likely want to pull models like
-
Whisper-compatible Transcription Service: Phlox needs a service to transcribe audio into text. You have a few options:
- Speaches (Self-hosted, Recommended for Local): Speaches is a self-hostable, open-source Whisper server.
- Recommended model:
Systran/faster-distil-whisper-medium.en( smaller and faster but still accurate) - Follow their instructions to set up an instance. This is recommended for local, privacy-focused setups.
- Recommended model:
- Cloud-based Whisper API:
- If you are using the official OpenAI Whisper endpoint you must specify
whisper-1as the model. - Ensure you understand their privacy and cost implications.
- You'll need to configure Phlox with the API endpoint and necessary credentials.
- If you are using the official OpenAI Whisper endpoint you must specify
- Speaches (Self-hosted, Recommended for Local): Speaches is a self-hostable, open-source Whisper server.
-
Hardware Considerations:
- For best performance: A GPU (CUDA, ROCm) or Apple M-Series chip is strongly recommended
- Without GPU/Apple silicon: The system will run but will be unusably slow, especially with larger models
- RAM Requirements:
- 8GB minimum for smaller models
- 16GB+ recommended for better performance
- 32GB+ for large models like llama3:70b
Follow these steps for a quick installation:
-
Clone the Repository:
git clone https://github.com/bloodworks-io/phlox.git cd phlox -
Build the Docker Image:
docker build -t phlox:latest . -
Create
.envFile: Create a file named.envwithin the cloned respository and add the following content, customizing the values as needed:# Required DB_ENCRYPTION_KEY=your_very_secret_key_here # Generate a strong, random key! TZ=Australia/Melbourne # Set your Timezone (e.g., America/New_York)
-
Run Phlox:
-
Production Deployment: Use the
docker-compose.ymlfile:docker-compose up
-
Development Setup: Use the
docker-compose.dev.ymlfile:docker-compose -f docker-compose.dev.yml up
-
-
Access Phlox in your Browser: Open your web browser and navigate to http://localhost:3000.
-
Initial Configuration: Once Phlox is running, access the Settings page within the application:
- Ollama Endpoint: Verify or update the Ollama API URL if needed.
- Transcription Endpoint: Ensure the Whisper API URL is correctly configured to match your transcription service. Test the connection if possible. Depending on your endpoint configuration, you may need to specify a model and an API-key.
- Model Selection: Model selection options will depend on the models available in your Ollama instance.
- Other Settings: Your name and specialty are provided as context during many LLM calls. This can improve the output of the LLM.
- Data Persistence: Your application data (database, ChromaDB data) is stored in the
./datadirectory relative to yourdocker-compose.ymlfile. - HTTPS for Browser Recording: To use the browser-based audio recording feature, you will need a secure context (HTTPS). For local development with
localhost, most browsers allow exceptions for microphone access overhttp://localhost, but for any other network access, you'll need HTTPS. Consider setting up a reverse proxy with SSL termination (e.g., using Caddy or Nginx) if you need HTTPS access.
If you encounter further issues, please create an issue on the GitHub repository.