UseSystemd() adds systemd integration to a .NET worker service or ASP.NET Core application through the generic host. It prepares the application to run as a Linux systemd daemon. section 34.2.2 section 34.4
Enable systemd support by completing these setup steps:
- Add the Microsoft.Extensions.Hosting.Systemd NuGet package. section 34.2.2
- Call UseSystemd() on the IHostBuilder while configuring the application in Program.cs. section 34.2.2
- Keep using the generic host APIs, including IHostBuilder.ConfigureServices(), for worker-service configuration. section 34.4
- Run the same application as a console app during development; service integration does nothing in that mode. section 34.4
