mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
51 lines
17 KiB
JavaScript
51 lines
17 KiB
JavaScript
import{_ as s,o as a,c as e,ag as i}from"./chunks/framework.ePeAWSvT.js";const k=JSON.parse('{"title":"config.toml Reference","description":"","frontmatter":{},"headers":[],"relativePath":"installation/config-toml.md","filePath":"installation/config-toml.md","lastUpdated":1771874735000}'),d={name:"installation/config-toml.md"};function n(o,t,h,r,l,p){return a(),e("div",null,[...t[0]||(t[0]=[i(`<h1 id="config-toml-reference" tabindex="-1">config.toml Reference <a class="header-anchor" href="#config-toml-reference" aria-label="Permalink to "config.toml Reference""></a></h1><p>Memoh uses a TOML configuration file. By default it looks for <code>config.toml</code> in the current directory. With Docker, you can mount a custom config via <code>MEMOH_CONFIG</code> (see <a href="./docker.html#custom-configuration">Docker installation</a>).</p><h2 id="full-example" tabindex="-1">Full Example <a class="header-anchor" href="#full-example" aria-label="Permalink to "Full Example""></a></h2><div class="language-toml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">toml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">level = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"info"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">format = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"text"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">addr = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">":8080"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">admin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">username = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"admin"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">password = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"change-your-password"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">email = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"admin@example.com"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">auth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">jwt_secret = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"your-secret-from-openssl-rand-base64-32"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">jwt_expires_in = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"168h"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">containerd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">socket_path = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"/run/containerd/containerd.sock"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">namespace = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"default"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mcp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">image = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"docker.io/library/memoh-mcp:latest"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">snapshotter = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"overlayfs"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">data_root = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"data"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">postgres</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">host = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"127.0.0.1"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">port = </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">5432</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">user = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"postgres"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">password = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"your-password"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">database = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"memoh"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">sslmode = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"disable"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">qdrant</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">base_url = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"http://127.0.0.1:6334"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">api_key = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">collection = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"memory"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">timeout_seconds = </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">10</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent_gateway</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">host = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"127.0.0.1"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">port = </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">8081</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">web</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">host = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"127.0.0.1"</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">port = </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">8082</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brave</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">api_key = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span></span>
|
||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">base_url = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://api.search.brave.com/res/v1/"</span></span></code></pre></div><h2 id="section-reference" tabindex="-1">Section Reference <a class="header-anchor" href="#section-reference" aria-label="Permalink to "Section Reference""></a></h2><h3 id="log" tabindex="-1"><code>[log]</code> <a class="header-anchor" href="#log" aria-label="Permalink to "\`[log]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>level</code></td><td>string</td><td><code>"info"</code></td><td>Log level: <code>debug</code>, <code>info</code>, <code>warn</code>, <code>error</code></td></tr><tr><td><code>format</code></td><td>string</td><td><code>"text"</code></td><td>Log format: <code>text</code> or <code>json</code></td></tr></tbody></table><h3 id="server" tabindex="-1"><code>[server]</code> <a class="header-anchor" href="#server" aria-label="Permalink to "\`[server]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>addr</code></td><td>string</td><td><code>":8080"</code></td><td>HTTP listen address. Use <code>:8080</code> for all interfaces, or <code>host:port</code> (e.g. <code>server:8080</code> in Docker).</td></tr></tbody></table><h3 id="admin" tabindex="-1"><code>[admin]</code> <a class="header-anchor" href="#admin" aria-label="Permalink to "\`[admin]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>username</code></td><td>string</td><td><code>"admin"</code></td><td>Admin login username</td></tr><tr><td><code>password</code></td><td>string</td><td>—</td><td>Admin login password. <strong>Change in production.</strong></td></tr><tr><td><code>email</code></td><td>string</td><td>—</td><td>Admin email (for display)</td></tr></tbody></table><h3 id="auth" tabindex="-1"><code>[auth]</code> <a class="header-anchor" href="#auth" aria-label="Permalink to "\`[auth]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>jwt_secret</code></td><td>string</td><td>—</td><td>Secret for signing JWT tokens. <strong>Required.</strong> Generate with <code>openssl rand -base64 32</code>.</td></tr><tr><td><code>jwt_expires_in</code></td><td>string</td><td><code>"24h"</code></td><td>JWT expiration, e.g. <code>"24h"</code>, <code>"168h"</code> (7 days)</td></tr></tbody></table><h3 id="containerd" tabindex="-1"><code>[containerd]</code> <a class="header-anchor" href="#containerd" aria-label="Permalink to "\`[containerd]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>socket_path</code></td><td>string</td><td><code>"/run/containerd/containerd.sock"</code></td><td>Path to containerd socket</td></tr><tr><td><code>namespace</code></td><td>string</td><td><code>"default"</code></td><td>Containerd namespace for bot containers</td></tr></tbody></table><h3 id="mcp" tabindex="-1"><code>[mcp]</code> <a class="header-anchor" href="#mcp" aria-label="Permalink to "\`[mcp]\`""></a></h3><p>MCP (Model Context Protocol) container configuration. Each bot runs in a container built from this image.</p><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>image</code></td><td>string</td><td><code>"docker.io/library/memoh-mcp:latest"</code></td><td>MCP container image</td></tr><tr><td><code>snapshotter</code></td><td>string</td><td><code>"overlayfs"</code></td><td>Containerd snapshotter</td></tr><tr><td><code>data_root</code></td><td>string</td><td><code>"data"</code></td><td>Host path for bot data (Docker: <code>/opt/memoh/data</code>)</td></tr></tbody></table><h3 id="postgres" tabindex="-1"><code>[postgres]</code> <a class="header-anchor" href="#postgres" aria-label="Permalink to "\`[postgres]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>host</code></td><td>string</td><td><code>"127.0.0.1"</code></td><td>PostgreSQL host</td></tr><tr><td><code>port</code></td><td>int</td><td><code>5432</code></td><td>PostgreSQL port</td></tr><tr><td><code>user</code></td><td>string</td><td><code>"postgres"</code></td><td>Database user</td></tr><tr><td><code>password</code></td><td>string</td><td>—</td><td>Database password</td></tr><tr><td><code>database</code></td><td>string</td><td><code>"memoh"</code></td><td>Database name</td></tr><tr><td><code>sslmode</code></td><td>string</td><td><code>"disable"</code></td><td>SSL mode: <code>disable</code>, <code>require</code>, <code>verify-ca</code>, <code>verify-full</code></td></tr></tbody></table><h3 id="qdrant" tabindex="-1"><code>[qdrant]</code> <a class="header-anchor" href="#qdrant" aria-label="Permalink to "\`[qdrant]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>base_url</code></td><td>string</td><td><code>"http://127.0.0.1:6334"</code></td><td>Qdrant HTTP API URL</td></tr><tr><td><code>api_key</code></td><td>string</td><td><code>""</code></td><td>Optional API key for Qdrant Cloud</td></tr><tr><td><code>collection</code></td><td>string</td><td><code>"memory"</code></td><td>Vector collection name for memories</td></tr><tr><td><code>timeout_seconds</code></td><td>int</td><td><code>10</code></td><td>Request timeout in seconds</td></tr></tbody></table><h3 id="agent-gateway" tabindex="-1"><code>[agent_gateway]</code> <a class="header-anchor" href="#agent-gateway" aria-label="Permalink to "\`[agent_gateway]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>host</code></td><td>string</td><td><code>"127.0.0.1"</code></td><td>Agent gateway bind host</td></tr><tr><td><code>port</code></td><td>int</td><td><code>8081</code></td><td>Agent gateway port</td></tr></tbody></table><p>In Docker Compose, <code>host</code> is typically <code>"agent"</code> (service name). The agent reads <code>[server].addr</code> to call the main API.</p><h3 id="web" tabindex="-1"><code>[web]</code> <a class="header-anchor" href="#web" aria-label="Permalink to "\`[web]\`""></a></h3><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>host</code></td><td>string</td><td><code>"127.0.0.1"</code></td><td>Web UI bind host</td></tr><tr><td><code>port</code></td><td>int</td><td><code>8082</code></td><td>Web UI port</td></tr></tbody></table><h3 id="brave" tabindex="-1"><code>[brave]</code> <a class="header-anchor" href="#brave" aria-label="Permalink to "\`[brave]\`""></a></h3><p>Brave Search API for the web search tool. Leave <code>api_key</code> empty to disable web search.</p><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>api_key</code></td><td>string</td><td><code>""</code></td><td>Brave Search API key. Get one at <a href="https://brave.com/search/api" target="_blank" rel="noreferrer">brave.com/search/api</a>.</td></tr><tr><td><code>base_url</code></td><td>string</td><td><code>"https://api.search.brave.com/res/v1/"</code></td><td>Brave Search API base URL</td></tr></tbody></table>`,30)])])}const E=s(d,[["render",n]]);export{k as __pageData,E as default};
|