These are host-only commands - they run locally and do not require a Lerim server (they start/stop the server).
Prerequisites
- Docker installed and running (Get Docker)
lerim initcompleted- At least one project registered with
lerim project add
lerim up
Start the Lerim Docker container. Reads configuration from~/.lerim/config.toml, generates a docker-compose.yml file with volume mounts for agents and projects, and starts the container.
Syntax
Flags
Build the Docker image from the local Default: Pull the pre-built image from
Dockerfile instead of pulling the pre-built image from GitHub Container Registry (GHCR).Use this when:- Developing Lerim locally
- Testing Dockerfile changes
- Working in an environment without GHCR access
ghcr.io/lerim-dev/lerim:latestWhat it does
- Reads config - Loads
~/.lerim/config.tomlto find registered projects and connected agents - Generates docker-compose.yml - Creates
~/.lerim/docker-compose.ymlwith volume mounts:- Agent session stores (e.g.
~/.claude/projects) mounted read-only - Project directories (e.g.
~/codes/my-app) mounted read-only - Lerim data directory (
~/.lerim) mounted read-write
- Agent session stores (e.g.
- Pulls or builds image:
- Without
--build: Pullsghcr.io/lerim-dev/lerim:latest - With
--build: Builds from localDockerfile
- Without
- Starts container - Runs
docker compose up -dto start the service - Starts background daemon - Inside the container,
lerim serveruns the HTTP API, dashboard, and sync/maintain daemon loop
Examples
Standard usage (pull GHCR image)
Local development (build from Dockerfile)
First-time setup
Generated docker-compose.yml
Example generated file (~/.lerim/docker-compose.yml):
Exit codes
| Code | Meaning |
|---|---|
0 | Container started successfully |
1 | Docker error (daemon not running, build failed, etc.) |
lerim down
Stop the Lerim Docker container and clean up.Syntax
What it does
- Stops container - Runs
docker compose downusing~/.lerim/docker-compose.yml - Removes container - Cleans up the stopped container
- Preserves data - Volumes and data in
~/.lerim/are not deleted
Examples
Output
Exit codes
| Code | Meaning |
|---|---|
0 | Container stopped or wasn’t running |
1 | Docker error |
lerim logs
View or tail the Docker container logs.Syntax
Flags
Follow log output in real-time (like Default: Show logs and exit
tail -f). Press Ctrl+C to stop.Short form: -fWhat it does
Runsdocker compose logs to display container logs. Without --follow, shows recent logs and exits. With --follow, streams logs continuously.
Examples
View recent logs
Stream logs in real-time
Ctrl+C to stop following.
Debug sync issues
Log levels
Lerim logs include:- HTTP API requests (
POST /api/sync,GET /api/status) - Daemon loop activity (sync/maintain cycles)
- Session indexing and extraction
- Memory operations (add, update, merge, archive)
- Errors and warnings
Exit codes
| Code | Meaning |
|---|---|
0 | Logs displayed successfully (or interrupted with Ctrl+C) |
1 | Docker error or compose file not found |
Common workflows
Start and monitor
Restart after config changes
Check if running
Debug startup issues
Update to latest version
Run without Docker
If you prefer not to use Docker:Troubleshooting
”Docker daemon not running”
Start Docker Desktop or the Docker daemon:“No compose file found”
Runlerim up to generate the compose file:
~/.lerim/docker-compose.yml.
Container won’t start
Check logs:- API keys not set (
OPENROUTER_API_KEYrequired) - Port 8765 already in use
- Volume mount permissions
Port already in use
Change the port in~/.lerim/config.toml:
API keys not working
Set environment variables before starting:~/.lerim/docker-compose.yml and restart.
Related commands
lerim init- Initial setup before starting Dockerlerim project add- Register projects to mountlerim status- Check if Lerim is runninglerim serve- Run without Dockerlerim daemon- Run background loop without Docker
Dashboard access
After starting Lerim withlerim up, the dashboard is available at:
http://localhost:8765
(or whatever port you configured in server_port)
The dashboard shows:
- Session analytics and activity charts
- Memory library with search and editing
- Sync/maintain pipeline status
- Runtime configuration