Microsoft.Extensions.Hosting.Systemd integrates a long-running .NET worker or console application with systemd on Linux. Add the NuGet package and call UseSystemd() on the IHostBuilder; the application then has the integration hooks required to run as a systemd daemon. section 34.2.2
A typical setup is small:
- Add the Microsoft.Extensions.Hosting.Systemd NuGet package. section 34.2.2
- Call UseSystemd() on the application's IHostBuilder in Program.cs. section 34.2.2
- Keep configuring hosted services normally; systemd support adds hosting integration rather than changing the worker's business logic. section 34.2.2
