Manual configuration
Configure the Lore server and agent integrations by hand when you do not use the installer script.
Manual configuration is for installations where you do not want the installer to make every choice for you. Use it when you are deploying Lore on a remote host, connecting to an existing database, or installing only selected agent integrations.
You will configure four things:
| Layer | What you set up | Result |
|---|---|---|
| Server | Database URL, optional auth token, cache, and file storage | Lore Web starts and exposes /setup and /api/mcp |
| Runtime settings | Embedding, View LLM, boot memory, recall, Dream, and backup settings | Lore can search, view, and maintain memory |
| Shared client config | Server URL and token for local hooks | Local integrations know where Lore is |
| Agent runtime | Native plugin or MCP endpoint, environment variables, and runtime-specific hooks | Agents can load boot memory and use recall |
Keep server secrets on the server, and keep agent-specific configuration in the agent runtime. A client config should not contain DATABASE_URL; a server .env should not contain Claude, Codex, or OpenClaw hook settings.
Before you start
You need:
- a machine that can run Lore Web;
- PostgreSQL with
pgvectoravailable, either bundled through Docker Compose or managed by you; - optional Redis for shared cache;
- an API token if the server should not be open on your network;
- one or more agent runtimes to connect after setup.
Start the server with Docker Compose
For the standard Docker Compose deployment, create a .env next to docker-compose.yml:
Start Lore:
If you set API_TOKEN, use the same token when you open the Web Console and when you configure MCP or hooks.
Start the server without bundled PostgreSQL
Use this path when you already operate PostgreSQL yourself. Point Lore Web at that database:
The database role should be allowed to create the schema and required extensions during first startup. If your production role is restricted, run the first startup with a migration-capable role, then switch to the restricted role after the schema exists.
Start Lore (still using Docker Compose for the Web and Redis containers, pointing at your external database):
Lore also needs writable storage for backups and review changesets. In Docker Compose this is provided by SNAPSHOT_DATA_DIR. In a custom deployment, mount persistent storage at the path used by the container image.
Complete /setup
After the server is healthy, open:
Complete these steps in order:
- Embedding setup — choose an OpenAI-compatible embedding endpoint.
- View LLM setup — choose OpenAI-compatible chat, OpenAI Responses, or Anthropic Messages.
- Boot memory setup — review the startup memories that agents will receive.
- Final check — confirm setup is complete before connecting agents.
You can also save settings through the API:
Skip the authorization header only when your server has no API_TOKEN.
Create shared client config
Local Lore integrations, including Claude Code, Codex, and OpenCode, can read the same client config. Create ~/.lore/config.json on the machine where the agents run:
Rules:
base_urlis the Lore server origin without a trailing slash;- omit
api_tokenwhen the server has noAPI_TOKEN; - keep
docker_managedfalse when you manage the server yourself.
Connect Claude Code
Claude Code hooks read the shared ~/.lore/config.json. If you configure Claude MCP manually, register the HTTP endpoint with a bearer header when the server uses API_TOKEN:
For an unprotected local server, omit the --header option.
If you install the Claude Code plugin by hand, install the plugin files and hooks, then restart Claude Code. Do not copy local guidance into CLAUDE.md; the hooks forward lifecycle events to the Lore server and use the server-returned host output.
The exact plugin path may differ by release. Check the Lore repository for the current plugin layout.
Restart Claude Code after changing settings, plugin files, or CLAUDE.md.
Connect Codex
Enable plugins and hooks in ~/.codex/config.toml:
Register MCP without server auth:
Register MCP with server auth by keeping the URL plain and storing the bearer header in ~/.codex/config.toml:
Install Codex hooks from the plugin package when you need startup boot memory and per-prompt recall. Hooks read ~/.lore/config.json, so no extra token environment variable is required:
Restart Codex, open /hooks, and trust the Lore hooks if Codex asks for approval.
Connect OpenCode
The native OpenCode integration is a prerelease in v1.3.15-pre.4, tested with OpenCode 1.18.3. It reads the same ~/.lore/config.json shown above and installs one managed file:
The preferred path is the prerelease installer:
To install lore-opencode.zip manually, preserve any unmarked file already at the target path:
Restart OpenCode after installation. The plugin registers exactly these native tools:
lore_guidancelore_statuslore_bootlore_get_nodelore_searchlore_list_domainslore_create_nodelore_update_nodelore_delete_nodelore_move_node
Boot is injected into system context with experimental.chat.system.transform; it is never inserted into the user message. Prompt Recall runs through chat.message and appends a separate current-turn text part. If Lore or the experimental system hook is unavailable, the plugin warns and fails open. Native tools remain available, and prompt Recall continues when only system injection is unavailable.
Standard OpenCode installation does not configure /api/mcp. If native plugin loading is impossible, generic MCP at /api/mcp?client_type=opencode is a manual fallback only and does not reproduce the native lifecycle behavior.
Manual ZIP installation does not apply this compatibility edit: if oh-my-openagent or legacy oh-my-opencode imports Claude Code plugins, add claude_code.plugins_override["lore@lore"] = false to the active user-level JSON/JSONC config before restarting OpenCode. This prevents duplicate Claude Lore lifecycle hooks; the native plugin still removes duplicate Lore MCP entries at runtime. Do not change Claude Code files. If you intentionally want the legacy fallback alongside native Lore, leave that override enabled and start OpenCode with LORE_OPENCODE_ALLOW_MCP=1.
To uninstall only the OpenCode integration, use the ownership-aware uninstaller. It removes lore-memory.js only when the file contains the Lore management marker and preserves unmarked plugins:
Connect OpenClaw
OpenClaw uses a plugin entry in ~/.openclaw/openclaw.json:
Restart OpenClaw after editing the plugin entry.
Connect Pi
Install or symlink the Lore extension into the Pi extension directory. From the cloned Lore repository:
Pi reads ~/.lore/config.json by default. If your Pi runtime supports extension config, use it only when you need a per-runtime override:
Run /reload inside Pi or restart the runtime.
Connect Hermes
Hermes reads the Lore server and token from ~/.lore/config.json:
LORE_BASE_URL and LORE_API_TOKEN remain fallback environment variables for older setups.
Then link the plugin package into the Hermes plugin directory. From the cloned Lore repository:
Restart Hermes after linking the plugin.
Verify the result
Before moving real instructions into Lore, check these items:
curl -fsS http://127.0.0.1:18901/api/healthreturns success./setupshows embedding, View LLM, and boot memory complete.- Every MCP-based agent URL includes the right
client_type; OpenCode uses its native plugin instead. - Protected servers receive the same bearer token from Web UI, MCP, hooks, and the OpenCode plugin.
- A new agent session includes boot context. For OpenCode, confirm
core://agent/opencodethroughlore_boot. - A realistic project prompt produces a recall block. In OpenCode this must still work when experimental system injection is unavailable.
- Opening a recalled node works in the Web Console.