Skip to content

Instantly share code, notes, and snippets.

@ixkipe
Created November 18, 2023 21:36
Show Gist options
  • Save ixkipe/1ff1083aa1968264e85cf43d1ada1c69 to your computer and use it in GitHub Desktop.
Save ixkipe/1ff1083aa1968264e85cf43d1ada1c69 to your computer and use it in GitHub Desktop.
A .NET service file that works for me
# all files in the working directory must be owned by user {yourusername}
[Unit]
Description=Your App
[Service]
WorkingDirectory=/opt/appdir
ExecStart=/usr/share/dotnet/dotnet /opt/appdir/App.dll
SyslogIdentifier=AppName
User=yourusername
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment