I have configured a dev cert in my project. The cert path is in my HOME directory.
When I configure environment variable ASPNETCORE_Kestrel__Certificates__Default__Path, none of
$HOME/.aspnet/https/localhost.pfx
$(env:HOME)/.aspnet/https/localhost.pfx
${HOME}/.aspnet/https/localhost.pfx
works. Now I set it to /home/nemo/.aspnet/https/localhost.pfx and it can run normally.
I refer to this answer, but it seems to only work on PowerShell, while I use zsh.