[GH-ISSUE #521] Recognize custom Firefox profile locations #313

Open
opened 2026-02-25 22:33:05 +03:00 by kerem · 4 comments
Owner

Originally created by @philnagel on GitHub (Apr 27, 2023).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/521

Environment

  • Operating system (including version): macOS Ventura 13.3.1
  • mkcert version (from mkcert -version): v1.4.4
  • Server (where the certificate is loaded): n/a
  • Client (e.g. browser, CLI tool, or script): n/a

What you did

Ran mkcert -install

What went wrong

The above command was partially successful but returned an error regarding Firefox:

The local CA is already installed in the system trust store! 👍
ERROR: no Firefox security databases found

I believe this is due to how this script (line 19) assumes Firefox profiles are always located at ~/Library/Application Support/Firefox/Profiles. However, Firefox supports custom profile locations. On my machine, the profiles are located elsewhere. Instead of assuming the above path, the script should check the file ~/Library/Application Support/Firefox/Profiles/profiles.ini, which has the following pertinent sections:

[Profile1]
Name=Work
IsRelative=0
Path=/Users/philna/firefox_profiles/phil_work

[Profile0]
Name=Personal
IsRelative=0
Path=/Users/philna/firefox_profiles/personal

I would normally submit a pull request, but I have never used go before so I am not sure it would be very elegant. I can attempt if desired.

Originally created by @philnagel on GitHub (Apr 27, 2023). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/521 ## Environment * Operating system (including version): macOS Ventura 13.3.1 * mkcert version (from `mkcert -version`): v1.4.4 * Server (where the certificate is loaded): n/a * Client (e.g. browser, CLI tool, or script): n/a ## What you did Ran `mkcert -install` ## What went wrong The above command was partially successful but returned an error regarding Firefox: ``` The local CA is already installed in the system trust store! 👍 ERROR: no Firefox security databases found ``` I believe this is due to how this [script (line 19)](https://github.com/FiloSottile/mkcert/blob/master/truststore_darwin.go) assumes Firefox profiles are always located at `~/Library/Application Support/Firefox/Profiles`. However, Firefox supports custom profile locations. On my machine, the profiles are located elsewhere. Instead of assuming the above path, the script should check the file `~/Library/Application Support/Firefox/Profiles/profiles.ini`, which has the following pertinent sections: ``` [Profile1] Name=Work IsRelative=0 Path=/Users/philna/firefox_profiles/phil_work [Profile0] Name=Personal IsRelative=0 Path=/Users/philna/firefox_profiles/personal ``` I would normally submit a pull request, but I have never used `go` before so I am not sure it would be very elegant. I can attempt if desired.
Author
Owner

@g0t4 commented on GitHub (Jan 19, 2024):

+1 in linux environments, firefox-esr uses ~/.mozilla/firefox-esr/ and currently mkcert checks ~/.mozilla/firefox/

<!-- gh-comment-id:1901075043 --> @g0t4 commented on GitHub (Jan 19, 2024): +1 in linux environments, `firefox-esr` uses `~/.mozilla/firefox-esr/` and currently mkcert checks `~/.mozilla/firefox/`
Author
Owner

@g0t4 commented on GitHub (Jan 29, 2024):

FYI https://github.com/FiloSottile/mkcert/pull/566

<!-- gh-comment-id:1915636424 --> @g0t4 commented on GitHub (Jan 29, 2024): FYI https://github.com/FiloSottile/mkcert/pull/566
Author
Owner

@c33s commented on GitHub (Feb 1, 2024):

in general it would be good to allow the developers to override data. being able to manually provide things like profile dir and name of the CA would really help.

<!-- gh-comment-id:1922354757 --> @c33s commented on GitHub (Feb 1, 2024): in general it would be good to allow the developers to override data. being able to manually provide things like profile dir and name of the CA would really help.
Author
Owner

@IanVS commented on GitHub (Jan 26, 2026):

I also got this error (using zen browser), is there any workaround?

Edit: found this: https://github.com/FiloSottile/mkcert/issues/370#issuecomment-1280377305

<!-- gh-comment-id:3801831765 --> @IanVS commented on GitHub (Jan 26, 2026): I also got this error (using zen browser), is there any workaround? Edit: found this: https://github.com/FiloSottile/mkcert/issues/370#issuecomment-1280377305
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/mkcert#313
No description provided.