* Fix: Enable FalkorDB Browser startup in MCP Server Docker image This fix addresses issue #1041 where the FalkorDB Browser web UI was not starting automatically in the combined FalkorDB + MCP Server Docker image. Changes: - Modified start-services.sh script in Dockerfile to include browser startup logic - Browser now starts automatically when BROWSER=1 (default behavior) - Can be disabled by setting BROWSER=0 environment variable - Browser logs are written to /var/log/graphiti/browser.log - Added safety checks to verify browser files exist before starting Updated documentation: - Added BROWSER environment variable to docker-compose.yml - Documented BROWSER variable in README-falkordb-combined.md - Added section explaining how to disable the browser - Updated architecture diagrams to show browser process The fix follows the upstream FalkorDB image pattern where the browser starts with HOSTNAME="0.0.0.0" on port 3000. Resolves #1041 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Daniel Chalef <danielchalef@users.noreply.github.com> * Fix: Add missing port 3000 mapping to BROWSER=0 example The docker run example for disabling the browser was missing the -p 3000:3000 port mapping, which should be included for reference even when BROWSER=0. Co-authored-by: Daniel Chalef <danielchalef@users.noreply.github.com> * default to browser enabled --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Daniel Chalef <danielchalef@users.noreply.github.com>
7.1 KiB
FalkorDB + Graphiti MCP Server Combined Image
This Docker setup bundles FalkorDB (graph database) and the Graphiti MCP Server into a single container image for simplified deployment.
Overview
The combined image extends the official FalkorDB Docker image to include:
- FalkorDB: Redis-based graph database running on port 6379
- FalkorDB Web UI: Graph visualization interface on port 3000
- Graphiti MCP Server: Knowledge graph API on port 8000
Both services are managed by a startup script that launches FalkorDB as a daemon and the MCP server in the foreground.
Quick Start
Using Docker Compose (Recommended)
- Create a
.envfile in themcp_serverdirectory:
# Required
OPENAI_API_KEY=your_openai_api_key
# Optional
GRAPHITI_GROUP_ID=main
SEMAPHORE_LIMIT=10
FALKORDB_PASSWORD=
- Start the combined service:
cd mcp_server
docker compose -f docker/docker-compose-falkordb-combined.yml up
- Access the services:
- MCP Server: http://localhost:8000/mcp/
- FalkorDB Web UI: http://localhost:3000
- FalkorDB (Redis): localhost:6379
Using Docker Run
docker run -d \
-p 6379:6379 \
-p 3000:3000 \
-p 8000:8000 \
-e OPENAI_API_KEY=your_key \
-e GRAPHITI_GROUP_ID=main \
-v falkordb_data:/var/lib/falkordb/data \
zepai/graphiti-falkordb:latest
Building the Image
Build with Default Version
docker compose -f docker/docker-compose-falkordb-combined.yml build
Build with Specific Graphiti Version
GRAPHITI_CORE_VERSION=0.22.0 docker compose -f docker/docker-compose-falkordb-combined.yml build
Build Arguments
GRAPHITI_CORE_VERSION: Version of graphiti-core package (default: 0.22.0)MCP_SERVER_VERSION: MCP server version tag (default: 1.0.0rc0)BUILD_DATE: Build timestampVCS_REF: Git commit hash
Configuration
Environment Variables
All environment variables from the standard MCP server are supported:
Required:
OPENAI_API_KEY: OpenAI API key for LLM operations
Optional:
BROWSER: Enable FalkorDB Browser web UI on port 3000 (default: "1", set to "0" to disable)GRAPHITI_GROUP_ID: Namespace for graph data (default: "main")SEMAPHORE_LIMIT: Concurrency limit for episode processing (default: 10)FALKORDB_PASSWORD: Password for FalkorDB (optional)FALKORDB_DATABASE: FalkorDB database name (default: "default_db")
Other LLM Providers:
ANTHROPIC_API_KEY: For Claude modelsGOOGLE_API_KEY: For Gemini modelsGROQ_API_KEY: For Groq models
Volumes
/var/lib/falkordb/data: Persistent storage for graph data/var/log/graphiti: MCP server and FalkorDB Browser logs
Service Management
View Logs
# All logs (both services stdout/stderr)
docker compose -f docker/docker-compose-falkordb-combined.yml logs -f
# Only container logs
docker compose -f docker/docker-compose-falkordb-combined.yml logs -f graphiti-falkordb
Restart Services
# Restart entire container (both services)
docker compose -f docker/docker-compose-falkordb-combined.yml restart
# Check FalkorDB status
docker compose -f docker/docker-compose-falkordb-combined.yml exec graphiti-falkordb redis-cli ping
# Check MCP server status
curl http://localhost:8000/health
Disabling the FalkorDB Browser
To disable the FalkorDB Browser web UI (port 3000), set the BROWSER environment variable to 0:
# Using docker run
docker run -d \
-p 6379:6379 \
-p 3000:3000 \
-p 8000:8000 \
-e BROWSER=0 \
-e OPENAI_API_KEY=your_key \
zepai/graphiti-falkordb:latest
# Using docker-compose
# Add to your .env file:
BROWSER=0
When disabled, only FalkorDB (port 6379) and the MCP server (port 8000) will run.
Health Checks
The container includes a health check that verifies:
- FalkorDB is responding to ping
- MCP server health endpoint is accessible
Check health status:
docker compose -f docker/docker-compose-falkordb-combined.yml ps
Architecture
Process Structure
start-services.sh (PID 1)
├── redis-server (FalkorDB daemon)
├── node server.js (FalkorDB Browser - background, if BROWSER=1)
└── uv run main.py (MCP server - foreground)
The startup script launches FalkorDB as a background daemon, waits for it to be ready, optionally starts the FalkorDB Browser (if BROWSER=1), then starts the MCP server in the foreground. When the MCP server stops, the container exits.
Directory Structure
/app/mcp/ # MCP server application
├── main.py
├── src/
├── config/
│ └── config.yaml # FalkorDB-specific configuration
└── .graphiti-core-version # Installed version info
/var/lib/falkordb/data/ # Persistent graph storage
/var/lib/falkordb/browser/ # FalkorDB Browser web UI
/var/log/graphiti/ # MCP server and Browser logs
/start-services.sh # Startup script
Benefits of Combined Image
- Simplified Deployment: Single container to manage
- Reduced Network Latency: Localhost communication between services
- Easier Development: One command to start entire stack
- Unified Logging: All logs available via docker logs
- Resource Efficiency: Shared base image and dependencies
Troubleshooting
FalkorDB Not Starting
Check container logs:
docker compose -f docker/docker-compose-falkordb-combined.yml logs graphiti-falkordb
MCP Server Connection Issues
- Verify FalkorDB is running:
docker compose -f docker/docker-compose-falkordb-combined.yml exec graphiti-falkordb redis-cli ping
- Check MCP server health:
curl http://localhost:8000/health
- View all container logs:
docker compose -f docker/docker-compose-falkordb-combined.yml logs -f
Port Conflicts
If ports 6379, 3000, or 8000 are already in use, modify the port mappings in docker-compose-falkordb-combined.yml:
ports:
- "16379:6379" # Use different external port
- "13000:3000"
- "18000:8000"
Production Considerations
- Resource Limits: Add resource constraints in docker-compose:
deploy:
resources:
limits:
cpus: '2'
memory: 4G
- Persistent Volumes: Use named volumes or bind mounts for production data
- Monitoring: Export logs to external monitoring system
- Backups: Regular backups of
/var/lib/falkordb/datavolume - Security: Set
FALKORDB_PASSWORDin production environments
Comparison with Separate Containers
| Aspect | Combined Image | Separate Containers |
|---|---|---|
| Setup Complexity | Simple (one container) | Moderate (service dependencies) |
| Network Latency | Lower (localhost) | Higher (container network) |
| Resource Usage | Lower (shared base) | Higher (separate images) |
| Scalability | Limited | Better (scale independently) |
| Debugging | Harder (multiple processes) | Easier (isolated services) |
| Production Use | Development/Single-node | Recommended |