$Profit //empty publish folder then... dotnet publish -c Release -o ./../publish/ --no-self-contained -r linux-x64 backup last contact in contact.last folder remove all files from contact.last then cp -a ../contact/. . copy up to server .NET Core apps: /srv/coreapps/contact , then to restart the service do restart: systemctl restart kestrel-contact.service systemctl status kestrel-contact.service systemctl start kestrel-contact.service systemctl stop kestrel-contact.service