How to Set Up dotnet Development Certificates in Manjaro Linux

As of dotnet 7, the HTTPS certificate created by dotnet dev-certs https doesn’t seem to work in Chrome on Manjaro Linux.

Here are the steps that I took in order to make that work.

First, close any Chrome-based browsers.

# start at home
cd ~

# let's start fresh and clean out any old certificates generated by dotnet
dotnet dev-certs https --clean

# remove the CA cert9.db file that Chromium based browsers use
rm ~/.pki/nssdb/cert9.db

# generate the certificate
dotnet dev-certs https

# export the certificate created by dotnet dev-certs
sudo -E dotnet dev-certs https -ep localhost.crt --format PEM

# trust the certificate globally
sudo trust anchor --store localhost.crt

Once the certificate is trusted globally, Chrome will re-import and create the cert9.db it the next time it is launched.

Leave a Comment