While developing webapps you may need to use HTTPS to match production environment.
For local purposes you may not need a real certificate and a self-signed SSL certificate could be enough.
A self-signed certificate is a SSL certificate which is not signed by any of the recognized certification authorities.
If you want you can create your self-signed certificate in 2 minutes
Browsers do not trust self-signed certificate by default and display an error message that warns the user that the site you are connecting to does not have a recognized certificate and that this could be a potential security risk.
For local development these warnings could be pretty annoying so you may want to ensure that your browser recognizes your certificate as valid.
Let's see how to add a self-signed certificate to Firefox!
All the customizations you make in Firefox are stored in a special folder called
To add a certificate the first thing to do is to find out where your proile is stored. You can find it simply by typing
about:profiles in Firefox’s address bar, and then press Enter.
The folder you are looking for is the one with label
For example my profile is stored at
To install the certificate you have to ensure that
certutil is installed on your system.
In case it is missing you can install it with:
sudo apt install libnss3-tools
Now you are ready to add the certificate:
certutil -A -n "<CERT_NICKNAME>" -t "TCu,Cu,Tu" -i <PATH_FILE_CRT> -d sql:<FIREFOX_PROFILE_PATH>
- CERT_NICKNAME: is an alias for the certificate
- PATH_FILE_CRT: is the path of the certificate you want to add
- FIREFOX_PROFILE_PATH: is the path where your Firefox profile is stored
For example to add the certificate on my PC I have to use:
certutil -A -n "slope" -t "TCu,Cu,Tu" -i ~/Downloads/slope.crt -d sql:/home/lorenzo/.mozilla/firefox/57w4ghfg.default-1394286602246-1560669052441
NOTE: after you installed the certificate you have to restart Firefox for these changes to take effect.
To ensure that the certificate is added correctly you can display all the installed certificates using:
certutil -d sql:<FIREFOX_PROFILE_PATH> -L
If you need to remove an installed certificate you can do it with:
certutil -D -n "<CERT_NICKNAME>" -d sql:<FIREFOX_PROFILE_PATH>
And voila! You're all done, ready and up and running!