certmagic icon indicating copy to clipboard operation
certmagic copied to clipboard

Data directory should be located in APPDATA on Windows

Open klkq opened this issue 3 years ago • 3 comments

What would you like to have changed?

On Windows, certmagic stores its data in %USERPROFILE%/.local/share by default at the moment, which should be located in %APPDATA% as Windows' convention.

Why is this feature a useful, necessary, and/or important addition to this project?

Following the operating system's convention gives users better understanding of the directory's function and eliminates unnecessary directory paths.

What alternatives are there, or what are you doing in the meantime to work around the lack of this feature?

Certmagic is used by Hysteria, which is considering

provide an option in "acme" for customizing the certificate storage directory.

Please link to any relevant issues, pull requests, or other discussions.

My issue in Hysteria repo

klkq avatar May 19 '22 02:05 klkq

That's probably a good idea. I'm not a Windows user; does the data just go into %APPDATA%? Or is there a subfolder, or how does that work?

mholt avatar May 19 '22 03:05 mholt

In Caddy, the default is %AppData%\Caddy

https://caddyserver.com/docs/conventions#data-directory

I think the problem with simply changing the default is it might cause people to have all their certs reissued, unless they explicitly set the storage location otherwise. I think it would have to check both locations and move files over to the new location, if the old location still had files

francislavoie avatar May 19 '22 03:05 francislavoie

Forgot about that 😅 Thanks

Yeah, the moving files thing is a good idea, but not always successful (if, for example, the two folders are on different drives). I will try, but maybe this is just better for the release notes (and give some instructions).

mholt avatar May 19 '22 05:05 mholt