Version: v0.58.0 Status: Active Related ADR: ADR-021: Configuration Consolidation and Simplification
This guide helps you migrate from the old configuration variables to the new consolidated approach introduced in v0.58.0.
Key Changes:
VECTOR_SYNC_ENABLED→ENABLE_SEMANTIC_SEARCHENABLE_OFFLINE_ACCESS→ENABLE_BACKGROUND_OPERATIONS- New:
MCP_DEPLOYMENT_MODEfor explicit mode selection - Automatic dependency resolution: semantic search auto-enables background operations
Backward Compatibility:
- Old variable names still work in v0.58.0+
- Deprecation warnings logged when old names used
- Old names will be removed in v1.0.0
| Old Name | New Name | Status |
|---|---|---|
VECTOR_SYNC_ENABLED |
ENABLE_SEMANTIC_SEARCH |
Deprecated |
ENABLE_OFFLINE_ACCESS |
ENABLE_BACKGROUND_OPERATIONS |
Deprecated |
ENABLE_TOKEN_EXCHANGE |
MCP_DEPLOYMENT_MODE=login_flow |
Removed (now ignored) |
| N/A (auto-detected) | MCP_DEPLOYMENT_MODE |
New (optional) |
ENABLE_TOKEN_EXCHANGEwas removed. The OAuth token-exchange mode was never fully implemented and was retired in the ADR-022/ADR-023 consolidation. The variable is now silently ignored — useMCP_DEPLOYMENT_MODE=login_flowfor multi-user OAuth.
Tuning parameters unchanged:
VECTOR_SYNC_SCAN_INTERVAL- Keep as-isVECTOR_SYNC_PROCESSOR_WORKERS- Keep as-isVECTOR_SYNC_QUEUE_MAX_SIZE- Keep as-is
Before (v0.57.x):
NEXTCLOUD_HOST=http://localhost:8080
NEXTCLOUD_USERNAME=admin
NEXTCLOUD_PASSWORD=password
VECTOR_SYNC_ENABLED=true
QDRANT_LOCATION=:memory:
OLLAMA_BASE_URL=http://ollama:11434After (v0.58.0+):
NEXTCLOUD_HOST=http://localhost:8080
NEXTCLOUD_USERNAME=admin
NEXTCLOUD_PASSWORD=password
# Optional: Explicit mode declaration (recommended)
MCP_DEPLOYMENT_MODE=single_user_basic
# Updated variable name
ENABLE_SEMANTIC_SEARCH=true # Previously VECTOR_SYNC_ENABLED
QDRANT_LOCATION=:memory:
OLLAMA_BASE_URL=http://ollama:11434What Changed:
- ✅ Renamed
VECTOR_SYNC_ENABLEDtoENABLE_SEMANTIC_SEARCH - ✅ Added optional
MCP_DEPLOYMENT_MODEfor clarity - ✅ Background operations NOT auto-enabled (not needed in single-user mode)
Migration Steps:
- Replace
VECTOR_SYNC_ENABLED=truewithENABLE_SEMANTIC_SEARCH=true - Optionally add
MCP_DEPLOYMENT_MODE=single_user_basic - Restart server
- Verify deprecation warnings are gone
Before (v0.57.x):
NEXTCLOUD_HOST=https://nextcloud.example.com
NEXTCLOUD_USERNAME=
NEXTCLOUD_PASSWORD=
# Both variables required - confusing!
ENABLE_OFFLINE_ACCESS=true
VECTOR_SYNC_ENABLED=true
TOKEN_ENCRYPTION_KEY=your-key-here
TOKEN_STORAGE_DB=/app/data/tokens.db
QDRANT_URL=http://qdrant:6333
OLLAMA_BASE_URL=http://ollama:11434
NEXTCLOUD_OIDC_CLIENT_ID=mcp-server
NEXTCLOUD_OIDC_CLIENT_SECRET=secretAfter (v0.58.0+ - Simplified):
NEXTCLOUD_HOST=https://nextcloud.example.com
NEXTCLOUD_USERNAME=
NEXTCLOUD_PASSWORD=
# Optional: Explicit mode declaration
MCP_DEPLOYMENT_MODE=login_flow
# One variable does it all!
ENABLE_SEMANTIC_SEARCH=true # Automatically enables background operations
TOKEN_ENCRYPTION_KEY=your-key-here
TOKEN_STORAGE_DB=/app/data/tokens.db
QDRANT_URL=http://qdrant:6333
OLLAMA_BASE_URL=http://ollama:11434
NEXTCLOUD_OIDC_CLIENT_ID=mcp-server
NEXTCLOUD_OIDC_CLIENT_SECRET=secret
# Note: ENABLE_OFFLINE_ACCESS no longer needed!
# Background operations are auto-enabled by ENABLE_SEMANTIC_SEARCHWhat Changed:
- ✅ Removed need for explicit
ENABLE_OFFLINE_ACCESS - ✅
ENABLE_SEMANTIC_SEARCHautomatically enables background operations in multi-user modes - ✅ Renamed
VECTOR_SYNC_ENABLEDtoENABLE_SEMANTIC_SEARCH - ✅ Added optional explicit mode declaration
Migration Steps:
- Replace
VECTOR_SYNC_ENABLED=truewithENABLE_SEMANTIC_SEARCH=true - Remove
ENABLE_OFFLINE_ACCESS=true(auto-enabled) - Optionally add
MCP_DEPLOYMENT_MODE=login_flow - Restart server
- Check logs for confirmation: "Automatically enabled background operations for semantic search"
Before (v0.57.x):
NEXTCLOUD_HOST=https://nextcloud.example.com
NEXTCLOUD_USERNAME=
NEXTCLOUD_PASSWORD=
# Enable background operations for future features
ENABLE_OFFLINE_ACCESS=true
TOKEN_ENCRYPTION_KEY=your-key-here
TOKEN_STORAGE_DB=/app/data/tokens.db
NEXTCLOUD_OIDC_CLIENT_ID=mcp-server
NEXTCLOUD_OIDC_CLIENT_SECRET=secretAfter (v0.58.0+):
NEXTCLOUD_HOST=https://nextcloud.example.com
NEXTCLOUD_USERNAME=
NEXTCLOUD_PASSWORD=
# Optional: Explicit mode declaration
MCP_DEPLOYMENT_MODE=login_flow
# Renamed for clarity
ENABLE_BACKGROUND_OPERATIONS=true # Previously ENABLE_OFFLINE_ACCESS
TOKEN_ENCRYPTION_KEY=your-key-here
TOKEN_STORAGE_DB=/app/data/tokens.db
NEXTCLOUD_OIDC_CLIENT_ID=mcp-server
NEXTCLOUD_OIDC_CLIENT_SECRET=secretWhat Changed:
- ✅ Renamed
ENABLE_OFFLINE_ACCESStoENABLE_BACKGROUND_OPERATIONS - ✅ Added optional explicit mode declaration
Migration Steps:
- Replace
ENABLE_OFFLINE_ACCESS=truewithENABLE_BACKGROUND_OPERATIONS=true - Optionally add
MCP_DEPLOYMENT_MODE=login_flow - Restart server
Before (v0.57.x):
NEXTCLOUD_HOST=https://nextcloud.example.com
MCP_DEPLOYMENT_MODE=multi_user_basic
# Both required - redundant
ENABLE_OFFLINE_ACCESS=true
VECTOR_SYNC_ENABLED=true
TOKEN_ENCRYPTION_KEY=your-key-here
TOKEN_STORAGE_DB=/app/data/tokens.db
QDRANT_URL=http://qdrant:6333
OLLAMA_BASE_URL=http://ollama:11434
NEXTCLOUD_OIDC_CLIENT_ID=mcp-server
NEXTCLOUD_OIDC_CLIENT_SECRET=secretAfter (v0.58.0+ - Simplified):
NEXTCLOUD_HOST=https://nextcloud.example.com
MCP_DEPLOYMENT_MODE=multi_user_basic
# One variable handles both!
ENABLE_SEMANTIC_SEARCH=true # Auto-enables background operations
TOKEN_ENCRYPTION_KEY=your-key-here
TOKEN_STORAGE_DB=/app/data/tokens.db
QDRANT_URL=http://qdrant:6333
OLLAMA_BASE_URL=http://ollama:11434
NEXTCLOUD_OIDC_CLIENT_ID=mcp-server
NEXTCLOUD_OIDC_CLIENT_SECRET=secret
# Note: ENABLE_OFFLINE_ACCESS no longer needed!What Changed:
- ✅ Semantic search auto-enables background operations
- ✅ Removed need for explicit
ENABLE_OFFLINE_ACCESS - ✅ Clearer variable naming
Migration Steps:
- Replace
VECTOR_SYNC_ENABLED=truewithENABLE_SEMANTIC_SEARCH=true - Remove
ENABLE_OFFLINE_ACCESS=true(auto-enabled) - Optionally add
MCP_DEPLOYMENT_MODE=multi_user_basic - Restart server
In v0.58.0+, the server uses smart dependency resolution:
# In multi-user modes (OAuth, Multi-User BasicAuth):
if ENABLE_SEMANTIC_SEARCH == true:
background_operations = automatically enabled
refresh_tokens = automatically requested
token_storage = required (TOKEN_ENCRYPTION_KEY, TOKEN_STORAGE_DB)
oauth_credentials = required (for app password retrieval)What this means:
- ✅ Set
ENABLE_SEMANTIC_SEARCH=true - ✅ Provide required infrastructure (Qdrant, Ollama, encryption key)
- ✅ System automatically enables background operations
- ❌ No need to set
ENABLE_BACKGROUND_OPERATIONSseparately
| Deployment Mode | Semantic Search Enabled | Background Operations Auto-Enabled? |
|---|---|---|
| Single-User BasicAuth | ✅ | ❌ No (not needed) |
| Multi-User BasicAuth | ✅ | ✅ Yes |
| OAuth Single-Audience | ✅ | ✅ Yes |
| OAuth Token Exchange | ✅ | ✅ Yes |
Only needed when you want background operations without semantic search:
# Example: OAuth mode with background operations but NO semantic search
NEXTCLOUD_HOST=https://nextcloud.example.com
MCP_DEPLOYMENT_MODE=login_flow
# Explicitly enable background operations for future features
ENABLE_BACKGROUND_OPERATIONS=true
TOKEN_ENCRYPTION_KEY=your-key-here
TOKEN_STORAGE_DB=/app/data/tokens.db
# Semantic search disabled
ENABLE_SEMANTIC_SEARCH=falseBenefits:
- ✅ Removes ambiguity about which mode is active
- ✅ Validation errors reference specific mode requirements
- ✅ Catches configuration mistakes early
- ✅ Self-documenting configuration
Example:
# Without explicit mode:
NEXTCLOUD_HOST=https://nextcloud.example.com
# Is this OAuth or Multi-User BasicAuth? Not immediately clear.
# With explicit mode:
MCP_DEPLOYMENT_MODE=login_flow
NEXTCLOUD_HOST=https://nextcloud.example.com
# Clear: This is OAuth mode| Mode Value | Description |
|---|---|
single_user_basic |
Single-user with username/password |
multi_user_basic |
Multi-user with BasicAuth pass-through |
login_flow |
Multi-user OAuth via Login Flow v2 (recommended) |
When MCP_DEPLOYMENT_MODE is set:
- ✅ Explicit mode is used
- ✅ Server validates configuration matches explicit mode
- ❌ Auto-detection is skipped
When MCP_DEPLOYMENT_MODE is NOT set:
- ✅ Auto-detection runs (existing behavior)
- ✅ Priority: Token Exchange → Multi-User BasicAuth → Single-User BasicAuth → OAuth Single-Audience
Error: [multi_user_basic] ENABLE_OFFLINE_ACCESS is required when VECTOR_SYNC_ENABLED is enabled
Problem: User must understand internal dependency relationship
Error: [multi_user_basic] TOKEN_ENCRYPTION_KEY is required when ENABLE_SEMANTIC_SEARCH is enabled
Benefit: Clear what's needed, no mention of internal ENABLE_BACKGROUND_OPERATIONS flag
Symptom:
WARNING: VECTOR_SYNC_ENABLED is deprecated. Please use ENABLE_SEMANTIC_SEARCH instead.
Solution:
- Check for
VECTOR_SYNC_ENABLEDin.envfile - Replace with
ENABLE_SEMANTIC_SEARCH - Search for any scripts/CI configs using old name
- Restart server
Symptom:
WARNING: Both ENABLE_SEMANTIC_SEARCH and VECTOR_SYNC_ENABLED are set. Using ENABLE_SEMANTIC_SEARCH.
Solution:
- Remove
VECTOR_SYNC_ENABLEDfrom.env - Keep
ENABLE_SEMANTIC_SEARCH - Restart server
Symptom:
Error: [login_flow] TOKEN_ENCRYPTION_KEY is required when ENABLE_SEMANTIC_SEARCH is enabled
Solution: When semantic search is enabled in multi-user modes, you need:
TOKEN_ENCRYPTION_KEY- Generate with:python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"TOKEN_STORAGE_DB- Path to SQLite database (e.g.,/app/data/tokens.db)NEXTCLOUD_OIDC_CLIENT_IDandNEXTCLOUD_OIDC_CLIENT_SECRET- For app password retrieval
Symptom:
Server activates login_flow mode when you expected multi_user_basic
Solution: Add explicit mode declaration:
MCP_DEPLOYMENT_MODE=multi_user_basic# Set new variable names in .env
cat .env | grep -E "(ENABLE_SEMANTIC_SEARCH|ENABLE_BACKGROUND_OPERATIONS|MCP_DEPLOYMENT_MODE)"# Should return nothing after migration
cat .env | grep -E "(VECTOR_SYNC_ENABLED|ENABLE_OFFLINE_ACCESS)"# Start server
docker-compose up mcp
# Look for:
# 1. No deprecation warnings
# 2. Correct mode detected
# 3. Auto-enablement messages (if using semantic search in multi-user mode)Expected Log Output (Multi-User OAuth + Semantic Search):
INFO: Using explicit deployment mode: login_flow
INFO: Automatically enabled background operations for semantic search in multi-user mode.
INFO: Vector sync enabled. Starting background scanner...
Test that existing features still work:
- Semantic search returns results
- Background indexing runs
- OAuth flow completes successfully
- Refresh tokens are stored/retrieved
We provide mode-specific templates for new deployments:
| Template | Use Case |
|---|---|
env.sample.single-user |
Simplest setup |
env.sample.oauth-multi-user |
Recommended multi-user (Login Flow v2) |
Usage:
cp env.sample.oauth-multi-user .env
# Edit .env with your values
docker-compose up -d| Version | Status | Old Variable Support |
|---|---|---|
| v0.57.x | Stable | Old names only |
| v0.58.0 | Current | Both old and new (with warnings) |
| v1.0.0 | Breaking | New names only |
Recommendation: Migrate before v1.0.0 (12+ months minimum)
If you encounter issues during migration:
- Check the logs - Look for deprecation warnings and error messages
- Review ADR-021 - See docs/ADR-021-configuration-consolidation.md
- Use mode-specific templates - See
env.sample.*files - File an issue - Include your
.env(redacted), logs, and mode
What You Need to Do:
- ✅ Rename
VECTOR_SYNC_ENABLED→ENABLE_SEMANTIC_SEARCH - ✅ (Optional) Rename
ENABLE_OFFLINE_ACCESS→ENABLE_BACKGROUND_OPERATIONS - ✅ (Recommended) Add
MCP_DEPLOYMENT_MODEfor clarity - ✅ Remove redundant settings (semantic search auto-enables background ops in multi-user modes)
- ✅ Test your configuration
What the Server Does Automatically:
- ✅ Supports both old and new variable names
- ✅ Logs deprecation warnings for old names
- ✅ Auto-enables background operations when semantic search is enabled in multi-user modes
- ✅ Validates configuration and provides clear error messages
Migration Timeline:
- Now → v1.0.0: Both old and new names work
- v1.0.0+: Only new names supported
Questions? See docs/configuration.md or file an issue.