[PR #160] Redirect ~/.cache outside of $HOME #145

Open
opened 2026-10-18 21:11:12 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-terminal/pull/160
Author: @maurerle
Created: 8/23/2026
Status: 🔄 Open

Base: main ← Head: redirect-user-cache-dir


📝 Commits (1)

  • 61f8a67 Redirect ~/.cache outside of $HOME

📊 Changes

5 files changed (+45 additions, -0 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 README.md (+8 -0)
📝 entrypoint.sh (+8 -0)
📝 open_terminal/env.py (+6 -0)
📝 open_terminal/utils/user_isolation.py (+17 -0)

📄 Description

Both OPEN_TERMINAL_MULTI_USER accounts and the default single-user account get $HOME/.cache symlinked to CACHE_DIR/ (default /cache, overridable via OPEN_TERMINAL_CACHE_DIR). When $HOME is a bind mount or PVC, this keeps pip/npm/etc. cache growth off of it entirely: wiped on container recreation, and doesn't count against the mount's storage quota.

Only symlinks when nothing already exists at ~/.cache, so existing cache data from before this change is left untouched.

Fixes the multi-user case reported upstream: .cache from every provisioned user currently lands on the shared /home mount.

Closes #159


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-terminal/pull/160 **Author:** [@maurerle](https://github.com/maurerle) **Created:** 8/23/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `redirect-user-cache-dir` --- ### 📝 Commits (1) - [`61f8a67`](https://github.com/open-webui/open-terminal/commit/61f8a67ca7927c4acd8c5996c1ef39223b5d96e4) Redirect ~/.cache outside of $HOME ### 📊 Changes **5 files changed** (+45 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `README.md` (+8 -0) 📝 `entrypoint.sh` (+8 -0) 📝 `open_terminal/env.py` (+6 -0) 📝 `open_terminal/utils/user_isolation.py` (+17 -0) </details> ### 📄 Description Both OPEN_TERMINAL_MULTI_USER accounts and the default single-user account get $HOME/.cache symlinked to CACHE_DIR/<username> (default /cache, overridable via OPEN_TERMINAL_CACHE_DIR). When $HOME is a bind mount or PVC, this keeps pip/npm/etc. cache growth off of it entirely: wiped on container recreation, and doesn't count against the mount's storage quota. Only symlinks when nothing already exists at ~/.cache, so existing cache data from before this change is left untouched. Fixes the multi-user case reported upstream: .cache from every provisioned user currently lands on the shared /home mount. Closes #159 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/open-terminal#145
No description provided.