When to use native mode
Choose native over Docker when:- Developing Lerim: You’re working on the Lerim codebase and need fast iteration
- Custom environments: You have specific Python version requirements or system dependencies
- No Docker: Docker isn’t available or allowed in your environment
- Debugging: You want direct access to the process for debugging and profiling
Setup
Initialize config
Run the interactive setup:This creates
~/.lerim/config.toml with your agent connections.Running the server
Thelerim serve command starts everything you need in a single process:
- HTTP API on port 8765 (configurable)
- Web dashboard at
http://localhost:8765 - Background daemon for sync and maintain loops
lerim serve is the Docker container entrypoint, but works perfectly on the host. It runs a continuous daemon loop with automatic sync and maintenance.Custom host and port
Running the daemon manually
If you want more control over the daemon behavior, run it separately from the HTTP server:One-shot execution
Run a single sync + maintain cycle and exit:- Testing extraction pipelines
- Cron jobs or scheduled tasks
- CI/CD integration
Custom poll interval
Override sync and maintain intervals uniformly:Service commands
Oncelerim serve or lerim daemon is running, these commands talk to the HTTP API:
Local-only commands
Some commands run directly on the host without needing a server:Development workflow
For active development on Lerim:Process management
Unlike Docker, native mode requires manual process management.Running in background
Usenohup or screen to keep Lerim running after logout:
screen:
Systemd service
For Linux systems, create a systemd unit file:/etc/systemd/system/lerim.service
Daemon intervals
The daemon runs two independent loops:- Sync interval: Default 10 minutes — indexes new sessions and extracts memories
- Maintain interval: Default 60 minutes — merges duplicates, archives stale items
~/.lerim/config.toml:
Comparing workflows
| Feature | Docker | Native |
|---|---|---|
| Setup | lerim up | lerim serve |
| Process isolation | Yes | No |
| Auto-restart | Yes (Docker restart policy) | No (manual or systemd) |
| Port binding | Configured in docker-compose | Configured in CLI flags |
| Logs | lerim logs | Stdout or manual redirection |
| Updates | Pull new image | pip install --upgrade lerim |
| Development | Requires rebuild | Instant edits with -e |
Accessing the dashboard
Withlerim serve running, open your browser:
Troubleshooting
Command not found: lerim
Command not found: lerim
The Or activate your virtual environment:
lerim executable isn’t in your PATH.Solution: Ensure the Python bin directory is in your PATH:Port already in use
Port already in use
Another process is using port 8765.Solution: Use a different port:Or find and kill the conflicting process:
API key not found
API key not found
Lerim can’t find an LLM provider API key.Solution: Export your API key in the current shell:For persistent keys, add to
~/.bashrc, ~/.zshrc, or ~/.profile:Daemon not syncing
Daemon not syncing
Check that the daemon is actually running:Force a sync manually:Verify connected platforms:
Next steps
- Query memories with lerim ask
- Explore the dashboard interface
- Switch to Docker workflow for production