简体   繁体   中英

How to start asp.net core server on linux and keep it running

I have created basic ASP.Net Core server on Azure Ubuntu VM. I have exposed the server to a port 80 using nginx. I am conecting to the VM via ssh. And starting the server with "dotnet run" command. That works fine.

However, every time I close the ssh connection, the server is stopping as well. Is there a way to start and keep running the asp.net core server on Linux without having an active ssh connection?

Basically what happens is:

  1. You login with ssh
  2. you startup an application under your user ( dotnet run )
  3. Close your ssh => logging out user, which means application is closed.

You need to start a service outside of your user. Here is some information:

Otherwise i'd advice you to ask on https://askubuntu.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM