Back to Openviking

Server Configuration

docs/en/configuration/01-server.md

0.4.1213.0 KB
Original Source

Server Configuration

For initial setup, run openviking-server init, then run openviking-server doctor after saving the configuration.

The OpenViking server and embedded Python SDK mode read ov.conf. The default path is:

text
~/.openviking/ov.conf

Use an environment variable or startup option to select another file:

bash
export OPENVIKING_CONFIG_FILE=/path/to/ov.conf
openviking-server --config /path/to/ov.conf

The server reads the file at startup. Restart the server after changing models, retrieval, storage, or server settings, then run openviking-server doctor.

Configuration Structure

json
{
  "embedding": {},
  "vlm": {},
  "query_planner": {},
  "rerank": {},
  "retrieval": {},
  "storage": {},
  "server": {},
  "memory": {},
  "parsers": {},
  "encryption": {},
  "log": {},
  "telemetry": {}
}

Optional sections use their defaults when omitted. Unknown fields are rejected.

Top-Level Settings

SettingType / valuesDefaultPurpose
default_accountstring"default"Default account in embedded SDK mode
default_userstring"default"Default user in embedded SDK mode
embeddingobjectbuilt-in local dense modelDense, sparse, and hybrid embedding; defaults to local / bge-small-zh-v1.5-f16
vlmobjectempty configContent understanding, summaries, and memory extraction; configure a working model before using these capabilities
query_plannerobject / nullnullRetrieval intent model; falls back to vlm
rerankobjectdisabledRetrieval result reranking
retrievalobjectsee belowRanking and intent-analysis behavior
grepobjectbuilt-in defaultsText search engine
storageobjectlocalWorkspace, file system, and vector database
serverobjectlocal developmentHTTP, authentication, uploads, and observability
memoryobjectsee belowMemory and skill extraction on session commit
parsersobjectparser defaultsPDF, code, image, audio, video, and text parsing
semanticobjectbuilt-in defaultsAbstract and overview generation limits
parser_apiobjectdisabledThird-party file parser API
connectorobjectdisabledExternal Connector ingestion service
encryptionobjectdisabledFile and secret encryption
gitobjectlocalVersion backend: local or s3
logobjectconsoleLog level, format, and file output
telemetryobjectdisabledOpenTelemetry tracing
oauthobjectdisabledMCP OAuth 2.1
promptsobjectbuilt-in templatesCustom prompt template directory
ingestobjectbuilt-in defaultsConversation-log ingestion
output_language_overridestring""Force summary/memory language; empty means auto-detect
allow_private_networksbooleanfalseAllow fetching private-network resources

auto_generate_l0, auto_generate_l1, default_search_mode, and default_search_limit are deprecated compatibility fields. They are accepted when loading older configuration files but have no runtime effect.

Model Settings

API-based embedding, vlm, query_planner, and rerank configurations reuse some field names, but each module has its own schema. Use only fields supported by the applicable module below.

json
{
  "embedding": {
    "dense": {
      "provider": "volcengine",
      "model": "doubao-embedding-vision-251215",
      "api_base": "https://ark.cn-beijing.volces.com/api/v3",
      "api_key": "<your-ark-api-key>",
      "dimension": 1024,
      "input": "multimodal"
    }
  },
  "vlm": {
    "provider": "volcengine",
    "model": "doubao-seed-2-0-code-preview-260215",
    "api_base": "https://ark.cn-beijing.volces.com/api/v3",
    "api_key": "<your-ark-api-key>",
    "temperature": 0,
    "max_retries": 3,
    "thinking": false
  },
  "query_planner": {
    "provider": "volcengine",
    "model": "doubao-seed-2-0-code-preview-260215",
    "api_base": "https://ark.cn-beijing.volces.com/api/v3",
    "api_key": "<your-ark-api-key>",
    "thinking": false
  },
  "rerank": {
    "provider": "vikingdb",
    "ak": "<your-volcengine-ak>",
    "sk": "<your-volcengine-sk>",
    "host": "api-vikingdb.vikingdb.cn-beijing.volces.com",
    "model_name": "doubao-seed-rerank",
    "model_version": "251028",
    "threshold": 0.1,
    "max_input_tokens": 0
  }
}
Field / pathApplies toPurpose
provider, model, api_base, api_keyEmbedding, VLM, Query Planner, RerankModel service, endpoint, and credential
api_versionEmbedding, VLM, Query PlannerAPI version for providers such as Azure
extra_headersEmbedding, VLM, Query Planner, RerankAdditional request headers
extra_request_bodyVLM, Query PlannerAdditional completion request fields
extra_bodyembedding.dense / sparse / hybridAdditional embedding request fields
timeoutVLM, Query Planner, RerankPer-request timeout in seconds
embedding.max_retries, vlm.max_retries, query_planner.max_retriesEmbedding, VLM, Query PlannerRetry count; Rerank has no max_retries field

embedding.dense

FieldType / valuesPurpose
provideropenai, volcengine, azure, ollama, local, etc.Dense embedding service
dimensioninteger, > 0Vector dimension; must match model output and existing collections
input"text" / "multimodal"Input type
encoding_format"float" / "base64"OpenAI-compatible vector encoding

Changing the model or dimension can make existing vector collections incompatible and may require migration or reindexing.

rerank

FieldType / valuesDefaultPurpose
providervikingdb, cohere, openai, litellm / nullnullRerank service; inferred from credentials when omitted
modelstring / nullnullOpenAI-compatible or LiteLLM rerank model
thresholdnumber0.1Minimum score considered relevant
max_input_tokensinteger; 0 or >= 1280Maximum estimated tokens per query-document pair; 0 disables truncation

Rerank has no separate enabled field. It becomes available when the required provider credentials are configured.

Retrieval Settings

json
{
  "retrieval": {
    "hotness_alpha": 0,
    "score_propagation_alpha": 1,
    "enable_intent": true
  }
}

retrieval

FieldType / valuesDefaultPurpose
hotness_alphanumber, 010Hotness score weight; 0 disables it
score_propagation_alphanumber, 011Child-result score weight in hierarchical retrieval
enable_intentbooleantrueRun intent analysis/query planning when session_id is present

Search and Find requests default to limit: 10; override the limit on each API or SDK request. retrieval.enable_intent controls LLM query planning for session-aware Search, while result reranking is enabled only when rerank has a usable provider configuration.

Storage Settings

json
{
  "storage": {
    "workspace": "./data",
    "skip_process_lock": false,
    "agfs": {
      "backend": "local"
    },
    "vectordb": {
      "backend": "local"
    }
  }
}

storage

FieldType / common valuesDefaultPurpose
workspacepath"./data"OpenViking workspace
agfs.backendlocal, memory, s3localFile and metadata backend
vectordb.backendlocal, cuvs, http, volcengine, vikingdb, qdrant, opengausslocalVector database backend
vectordb.dimensionintegerfollows EmbeddingVector collection dimension
skip_process_lockbooleanfalseSkip the workspace process lock; use only when accepting concurrent-write risk

Remote backends also require endpoint, bucket/collection, credentials, and timeout fields. See Configuration for complete examples.

HTTP Server Settings

json
{
  "server": {
    "host": "127.0.0.1",
    "port": 1933,
    "workers": 1,
    "auth_mode": "dev",
    "cors_origins": ["http://localhost:5173"],
    "profile_enabled": false,
    "temp_upload": {
      "default_mode": "local"
    }
  }
}

server

FieldType / valuesDefaultPurpose
hostIP / hostname"127.0.0.1"Listen address
portinteger1933Listen port
workersinteger1Worker process count
auth_modedev, api_key, trusted / nullnullAuth mode; null is inferred from root_api_key
root_api_keystring / nullnullRoot key; setting it defaults auth to api_key
cors_originsstring[]["*"]Allowed origins
profile_enabledbooleanfalseAllow performance profiles
with_botbooleanfalseEnable the VikingBot API proxy
bot_api_urlURLhttp://localhost:18790VikingBot OpenAPI endpoint
public_base_urlURL / nullnullExternally visible base URL
upload_signed_ttl_secondsinteger600Signed upload URL lifetime
temp_upload.default_mode"local" / "shared""local"Temporary upload storage

Encryption and API Key Hashing

File encryption and API key hashing are configured in the top-level encryption section, not under server:

json
{
  "encryption": {
    "enabled": false,
    "api_key_hashing": {
      "enabled": false
    }
  }
}
FieldType / valuesDefaultPurpose
encryption.enabledbooleanfalseEnable file-level AES encryption
encryption.api_key_hashing.enabledbooleanfalseStore API keys with Argon2id

See Encryption for provider and key-management settings.

Authentication Modes

ValueUse case
devLocal-only development without API keys
api_keyValidate root/user/admin keys
trustedTrust an upstream gateway to inject account/user identity

Memory Settings

json
{
  "memory": {
    "custom_templates_dir": "",
    "experimental_memory_switch": false,
    "eager_prefetch": true,
    "prefetch_search_topn": 5,
    "extraction_enabled": true,
    "session_skill_extraction_enabled": false,
    "link_enabled": false,
    "v2_lock_retry_interval_seconds": 0.2,
    "v2_lock_max_retries": 0
  }
}

memory

FieldType / valuesDefaultPurpose
custom_templates_dirpath""Additional memory template directory
experimental_memory_switchbooleanfalseEnable experimental templates
eager_prefetchbooleantrueSearch and read memories before extraction
prefetch_search_topninteger, >= 15Results read during prefetch
extraction_enabledbooleantrueExtract long-term memories on session commit
session_skill_extraction_enabledbooleanfalseAlso extract reusable skills
link_enabledbooleanfalseGenerate and resolve memory links
v2_lock_retry_interval_secondsnumber, >= 00.2Memory-lock retry interval
v2_lock_max_retriesinteger, >= 00Retry limit; 0 means unlimited

Parser Settings

Parsers live under parsers:

json
{
  "parsers": {
    "pdf": {},
    "code": {
      "code_summary_mode": "ast",
      "extract_functions": true,
      "extract_classes": true,
      "max_token_limit": 50000
    },
    "image": {},
    "audio": {},
    "video": {},
    "markdown": {},
    "excel": {},
    "html": {},
    "text": {},
    "directory": {},
    "feishu": {
      "domain": "https://open.feishu.cn",
      "max_rows_per_sheet": 1000,
      "max_records_per_table": 1000,
      "download_images": true
    },
    "webfeed": {}
  }
}
SettingPurpose
pdfPDF text, image, and layout parsing
codeRepository file types, ignore rules, and network safety
imageImage understanding and OCR
audio, videoAudio/video parsing
markdown, html, textText document chunking
excelWorkbook parsing and chunking
directoryDirectory scanning and ignore rules
feishuFeishu/Lark access and parsing
webfeedSitemap, RSS, and Atom ingestion

Provider-, parser-, storage-, and encryption-specific fields are documented in Configuration.

Minimal Example

json
{
  "embedding": {
    "dense": {
      "provider": "volcengine",
      "model": "doubao-embedding-vision-251215",
      "api_base": "https://ark.cn-beijing.volces.com/api/v3",
      "api_key": "<your-ark-api-key>",
      "dimension": 1024,
      "input": "multimodal"
    }
  },
  "vlm": {
    "provider": "volcengine",
    "model": "doubao-seed-2-0-code-preview-260215",
    "api_base": "https://ark.cn-beijing.volces.com/api/v3",
    "api_key": "<your-ark-api-key>",
    "thinking": false
  },
  "storage": {
    "workspace": "./data"
  },
  "server": {
    "host": "127.0.0.1",
    "port": 1933
  }
}