And now, we can do the same for our .NET Core application. Of course, we are using different tools to deploy .NET Core applications. For .NET Core, we cannot use PM2, which is a Node.js tool. Instead, we will create a service (script that executes on start up) that starts the cross-platform web server Kestrel, which is used to run the ASP.NET Core software. It is the same web server that is used when you run your web shop from Visual Studio Code. Again, we will need NGINX as a reverse proxy, but we already set that up when we installed NGINX, so that part is covered.
To create the service that will start Kestrel and run our .NET Core application, we can simply create a new file under /etc/systemd/system named kestrel-webshop-net.service ...