https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#1604-
sudo dotnet yourapp.dll
cd /etc/systemd/system
sudo nano yourapp.service
[Unit]
Description={My application description}
[Service]
WorkingDirectory={/usr/share/myapp}
ExecStart=/usr/bin/dotnet {/usr/share/myapp/myapp.dll}
SyslogIdentifier={myapp}
User=www-data
[Install]
WantedBy=multi-user.target
sudo systemctl enable myapp
sudo systemctl daemon-reload
sudo systemctl start myapp