Skip to main content

Backend Switching

Memanto keeps cloud and on-prem state strictly separated so you can flip between them at will. The data on each side stays intact — switching backends never deletes or moves your agents or memories.

The Two Backends

BackendSelected withData lives inAuth
Cloud (default)memanto config backend cloud~/.memanto/MOORCHEH_API_KEY in ~/.memanto/.env
On-Premmemanto config backend on-prem~/.memanto/on-prem/None — talks to local Moorcheh server at http://localhost:8080
memanto status always shows the active backend and its server health.

Inspect the Current Backend

memanto config backend
Sample output (cloud):
Active backend: cloud
Sample output (on-prem):
Active backend: on-prem
Server:    http://localhost:8080
Embedding: ollama

Switch to On-Prem

memanto config backend on-prem
What happens:
  1. If on-prem has never been configured on this machine, the on-prem onboarding wizard runs (Docker check, provider prompts, moorcheh up, model pulls). See On-Prem Quickstart.
  2. If on-prem has been configured before, the wizard skips the prompts and reuses your previous embedding_provider, embedding_model, and (where possible) provider API keys from ~/.moorcheh/config.json.
  3. The active session is cleared (sessions are backend-specific — you don’t want to send a cloud session token to the on-prem server).
  4. backend: on-prem is persisted in ~/.memanto/config.yaml.
  5. The in-process client singleton is reset so the next call immediately uses the new backend.
Confirmation:
Switched backend to on-prem.
Active session was cleared.

Switch Back to Cloud

memanto config backend cloud
If your cloud API key is already saved in ~/.memanto/.env, the switch is instant. Otherwise the cloud setup prompts you for MOORCHEH_API_KEY and verifies it against the Moorcheh API.

What’s Preserved Across Switches

StatePreserved?Where
Cloud agents and memoriesYesMoorcheh Cloud (server-side) + ~/.memanto/agents.
On-prem agents and memoriesYesLocal Moorcheh container + ~/.memanto/on-prem/agents.
Cloud API keyYes~/.memanto/.env.
On-prem provider configYes~/.memanto/on-prem/state.json + ~/.moorcheh/config.json.
Active sessionNoCleared on every switch (intentional — tokens don’t cross backends).
Integrations (memanto connect …)Yes~/.memanto/connections.json — these are IDE wiring, not backend state.
Switching backends never mutates or deletes data on either side. You can flip back and forth as often as you like.

Troubleshooting Switches

”On-Prem Server: ● offline” after switching to on-prem

The wizard sets up the stack but doesn’t keep it running across machine reboots. Bring Moorcheh back up:
moorcheh up
If moorcheh isn’t on PATH, re-open your terminal (so pip’s scripts dir is loaded) or run python -m moorcheh up.

”Invalid Moorcheh API key” after switching to cloud

Your ~/.memanto/.env is missing or stale. Re-enter the key:
memanto config backend cloud   # triggers the cloud setup flow again
Or set it directly:
echo "MOORCHEH_API_KEY=mk_…" > ~/.memanto/.env

Agents missing after switching

Cloud and on-prem maintain separate agent registries. An agent created on cloud is not visible from on-prem (and vice versa). Re-create the agent under the target backend, or import a memory export.