[GH-ISSUE #7684] Documentation about session files location #4905

Closed
opened 2026-04-12 15:57:19 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @josephernest on GitHub (Nov 15, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7684

Congrats for this project!

A little documentation clarification would be useful: where are the saved session files located?

ollama run llama3.1
... 30-minute long conversation ...
/save session_test

I only see 2 additional files:

  • /usr/share/ollama/.ollama/models/manifests/registry.ollama.ai/library/session_test/latest which is only a 1KB size JSON file. It only contains a few SHA256 hashes. So this is impossible that it contains the past history of pages of conversation.
  • /usr/share/ollama/.ollama/models/blobs/sha256-... which is a ~ 500 bytes file. Impossible to contain all the history of this session.

To do a further test, I deleted history of ~/.ollama/history and history.tmp, but still, when loading ollama run session_test, the past history is still there. Where, in which files, is the history saved for sessions saved with /save session_test?

Originally created by @josephernest on GitHub (Nov 15, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7684 Congrats for this project! A little documentation clarification would be useful: where are the saved session files located? ollama run llama3.1 ... 30-minute long conversation ... /save session_test I only see 2 additional files: * `/usr/share/ollama/.ollama/models/manifests/registry.ollama.ai/library/session_test/latest` which is only a 1KB size JSON file. It only contains a few SHA256 hashes. So this is **impossible** that it contains the past history of pages of conversation. * `/usr/share/ollama/.ollama/models/blobs/sha256-...` which is a ~ 500 bytes file. Impossible to contain all the history of this session. To do a further test, I deleted history of `~/.ollama/history` and `history.tmp`, but still, when loading `ollama run session_test`, the past history is still there. **Where, in which files, is the history saved for sessions saved with `/save session_test`**?
GiteaMirror added the question label 2026-04-12 15:57:19 -05:00
Author
Owner

@rick-github commented on GitHub (Nov 15, 2024):

The messages are stored in a sha256 blob. The manifest file has entry tagged with mediaType of application/vnd.ollama.image.messages, that will point to the blob with the message history.

<!-- gh-comment-id:2478555956 --> @rick-github commented on GitHub (Nov 15, 2024): The messages are stored in a sha256 blob. The manifest file has entry tagged with `mediaType` of `application/vnd.ollama.image.messages`, that will point to the blob with the message history.
Author
Owner

@josephernest commented on GitHub (Nov 15, 2024):

Thanks @rick-github! Is there a built-in way in ollama to create encrypted sessions: the file vnd.ollama.image.messages would be password-encrypted/decrypted when saving/loading.

I think many people who use local LLMs (instead of online LLM) are interested in privacy features.

<!-- gh-comment-id:2478611093 --> @josephernest commented on GitHub (Nov 15, 2024): Thanks @rick-github! Is there a built-in way in ollama to create encrypted sessions: the file `vnd.ollama.image.messages` would be password-encrypted/decrypted when saving/loading. I think many people who use local LLMs (instead of online LLM) are interested in privacy features.
Author
Owner

@rick-github commented on GitHub (Nov 15, 2024):

Authentication and authorisation are not features of ollama, it's expected that those sorts of functions are handled by supporting infrastructure, eg nginx frontend with SSO.

<!-- gh-comment-id:2478621553 --> @rick-github commented on GitHub (Nov 15, 2024): Authentication and authorisation are not features of ollama, it's expected that those sorts of functions are handled by supporting infrastructure, eg nginx frontend with SSO.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4905