fix: mount PVC at /config to persist Chrome and app state #24

Merged
cpfarhood merged 2 commits from fix/persist-config-to-pvc into main 2026-02-20 22:27:47 +00:00
cpfarhood commented 2026-02-20 22:22:16 +00:00 (Migrated from github.com)

Summary

  • Mount the PVC at /config instead of /home to align with the jlesage/baseimage-gui convention
  • The baseimage-gui sets XDG_CONFIG_HOME=/config/xdg/config at runtime, so Chrome was writing its profile to ephemeral storage — causing a fresh install on every pod restart
  • User home directory moved to /config/userdata (on the PVC)
  • Chrome wrapper now cleans up crash lock files and patches Preferences to prevent session/cookie loss after unclean pod shutdown
  • All scripts updated to use new paths (sshd, init-repo, git-credentials, Happy Coder)

What persists now

Data Location Persisted?
Chrome profile/auth /config/userdata/.config/google-chrome (via --user-data-dir)
XDG app config /config/xdg/config/ (baseimage-gui managed)
XDG app data /config/xdg/data/
SSH keys /config/userdata/.ssh/
Git credentials /config/userdata/.git-credentials
Happy Coder state /config/userdata/.happy/
Shell history/dotfiles /config/userdata/

Test plan

  • Deploy with a fresh PVC and verify Chrome opens normally on first boot
  • Log into Google in Chrome, then restart the pod — verify login persists
  • Verify SSH host keys persist across restarts (no known_hosts warning)
  • Verify Happy Coder daemon starts correctly with new paths
  • Verify git clone/pull works with GITHUB_TOKEN

🤖 Generated with Claude Code
via Happy

## Summary - Mount the PVC at `/config` instead of `/home` to align with the jlesage/baseimage-gui convention - The baseimage-gui sets `XDG_CONFIG_HOME=/config/xdg/config` at runtime, so Chrome was writing its profile to ephemeral storage — causing a fresh install on every pod restart - User home directory moved to `/config/userdata` (on the PVC) - Chrome wrapper now cleans up crash lock files and patches `Preferences` to prevent session/cookie loss after unclean pod shutdown - All scripts updated to use new paths (sshd, init-repo, git-credentials, Happy Coder) ## What persists now | Data | Location | Persisted? | |------|----------|------------| | Chrome profile/auth | `/config/userdata/.config/google-chrome` (via `--user-data-dir`) | ✅ | | XDG app config | `/config/xdg/config/` (baseimage-gui managed) | ✅ | | XDG app data | `/config/xdg/data/` | ✅ | | SSH keys | `/config/userdata/.ssh/` | ✅ | | Git credentials | `/config/userdata/.git-credentials` | ✅ | | Happy Coder state | `/config/userdata/.happy/` | ✅ | | Shell history/dotfiles | `/config/userdata/` | ✅ | ## Test plan - [ ] Deploy with a fresh PVC and verify Chrome opens normally on first boot - [ ] Log into Google in Chrome, then restart the pod — verify login persists - [ ] Verify SSH host keys persist across restarts (no known_hosts warning) - [ ] Verify Happy Coder daemon starts correctly with new paths - [ ] Verify git clone/pull works with GITHUB_TOKEN 🤖 Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering)
Sign in to join this conversation.