[GH-ISSUE #72] Optional Age Folder Location #15

Closed
opened 2026-02-26 18:43:12 +03:00 by kerem · 2 comments
Owner

Originally created by @tylerdotrar on GitHub (Dec 31, 2025).
Original GitHub issue: https://github.com/devnullvoid/pvetui/issues/72

Originally assigned to: @devnullvoid on GitHub.

For context, my current pvetui configuration is storing the config YAML file along with cache_dir within a separate internal SMB share -- this allows me to share pvetui functionality between multiple internal hosts without duplicating API token configurations or storing duplicate configurations on hosts.

With that said, upon setting up a new personal workstation I was confused when trying to use pvetui with the configuration file stored on my SMB share resulted in an "authentication failed: invalid credentials" error message. After checking multiple times between my hosts, literal same verbatim syntax but getting a different result, I realized that the working workstation had .age-identity and .age-recipient files within $env:APPDATA despite my pve_cache being stored elsewhere.

To be fair, I am unfamiliar with age encryption, but after looking through the codebase (specifically encryption.go) and skimming through the age Github project -- I learned my invalid credentials message had to do with my new workstation not having the proper .age-identity and .age-recipient files stored within %appdata%.

Image

With all that said, would an optional age file location location within the config file be feasible? I recognize it may not be the most secure approach in the world, but a verbose override would be greatly appreciated. On one hand, it could be stored in the cache_dir by default (though I'd wager the --no-cache parameter would result in some issues), but also adding an optional age_folder within the config file could also prevent this.

pvetui versions tested are versions 1.0.12 - 1.0.15, all built from source via go install on both Windows 24H2 and 22H2. Happy to include more information if needed, as well as admit this is a very niche case and implementation may be low priority.

Originally created by @tylerdotrar on GitHub (Dec 31, 2025). Original GitHub issue: https://github.com/devnullvoid/pvetui/issues/72 Originally assigned to: @devnullvoid on GitHub. For context, my current `pvetui` configuration is storing the config YAML file along with `cache_dir` within a separate internal SMB share -- this allows me to share `pvetui` functionality between multiple internal hosts without duplicating API token configurations or storing duplicate configurations on hosts. With that said, upon setting up a new personal workstation I was confused when trying to use `pvetui` with the configuration file stored on my SMB share resulted in an "**authentication failed: invalid credentials**" error message. After checking multiple times between my hosts, literal same verbatim syntax but getting a different result, I realized that the working workstation had `.age-identity` and `.age-recipient` files within `$env:APPDATA` despite my `pve_cache` being stored elsewhere. To be fair, I am unfamiliar with `age` encryption, but after looking through the codebase (specifically `encryption.go`) and skimming through the `age` Github project -- I learned my invalid credentials message had to do with my new workstation not having the proper `.age-identity` and `.age-recipient` files stored within `%appdata%`. <img width="577" height="540" alt="Image" src="https://github.com/user-attachments/assets/4a616308-1d43-44d3-b859-18eb66f87b6c" /> With all that said, would an optional `age` file location location within the config file be feasible? I recognize it may not be the most secure approach in the world, but a verbose override would be greatly appreciated. On one hand, it could be stored in the `cache_dir` by default (though I'd wager the `--no-cache` parameter would result in some issues), but also adding an optional `age_folder` within the config file could also prevent this. `pvetui` versions tested are versions 1.0.12 - 1.0.15, all built from source via `go install` on both Windows 24H2 and 22H2. Happy to include more information if needed, _as well as admit this is a very niche case and implementation may be low priority._
kerem 2026-02-26 18:43:12 +03:00
Author
Owner

@devnullvoid commented on GitHub (Jan 1, 2026):

Ahh this is a use case I did not consider. The defaults on Windows are:

Config file and age keys: stored in %APPDATA%\pvetui
Cache files and debug log stored in %LOCALAPPDATA%\pvetui

On Linux\macOS:

Config and age keys: $XDG_CONFIG_HOME\pvetui
Cache files and debug log: $XDG_CACHE_HOME\pvetui

I was considering moving the age keys default locations to %LOCALAPPDATA%\pvetui on Windows and $XDG_STATE_HOME (or $XDG_DATA_HOME) on Linux/macOS... but keeping the existing locations as a fallback for current users... that could be for another time, though.

Adding a variable in the config file itself, such as age_dir should not be a problem at all, and should not be disruptive to any current users either.

Let me see if I can squeeze this is in with the fixes/changes I'm currently prepping for the next release (mostly for #69 and #70)

<!-- gh-comment-id:3703932223 --> @devnullvoid commented on GitHub (Jan 1, 2026): Ahh this is a use case I did not consider. The defaults on Windows are: Config file and age keys: stored in `%APPDATA%\pvetui` Cache files and debug log stored in `%LOCALAPPDATA%\pvetui` On Linux\macOS: Config and age keys: `$XDG_CONFIG_HOME\pvetui` Cache files and debug log: `$XDG_CACHE_HOME\pvetui` I was considering moving the age keys default locations to %LOCALAPPDATA%\pvetui on Windows and `$XDG_STATE_HOME` (or `$XDG_DATA_HOME`) on Linux/macOS... but keeping the existing locations as a fallback for current users... that could be for another time, though. Adding a variable in the config file itself, such as `age_dir` should not be a problem at all, and should not be disruptive to any current users either. Let me see if I can squeeze this is in with the fixes/changes I'm currently prepping for the next release (mostly for #69 and #70)
Author
Owner

@devnullvoid commented on GitHub (Jan 1, 2026):

Fix is on develop and verified (Windows, including UNC paths). Added age_dir/--age-dir/PVETUI_AGE_DIR override for age key location, plus ~ expansion. Release pending.

<!-- gh-comment-id:3704240551 --> @devnullvoid commented on GitHub (Jan 1, 2026): Fix is on develop and verified (Windows, including UNC paths). Added age_dir/--age-dir/PVETUI_AGE_DIR override for age key location, plus ~ expansion. Release pending.
Sign in to join this conversation.
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
starred/pvetui#15
No description provided.