Search code examples
pm2asp.net-core-5.0

Running a .NET core application using PM2


If I run my .NET core 5 webAPI console app via the exe file, it's listening to all interfaces just as I configured in my appsettings.json

If I run it via pm2, it's accessible only from 127.0.0.1 even though my app logs show it listening to all interfaces.

Why?


Solution

  • The SSL certificate I used was exported from IIS into a pfx file with a password and then imported into the Windows certificates store. For some reason pm2 didn't like that certificate.

    When created a new certificate using Openssl into 2 pem files and used that for my .NET core project, pm2 gave me no problems.