liveBook · Manning

Microsoft.Extensions.Hosting.Systemd

As explained in ASP.NET Core in Action, 3e

Microsoft.Extensions.Hosting.Systemd is a .NET hosting package that integrates applications with systemd on Linux.

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

How ASP.NET Core in Action, 3e covers it

How deep it goes
Explains the package and host-builder hook, but does not detail Linux installation or daemon-management steps.
Examples
Uses a Program.cs host-builder call to enable systemd support and contrasts it with UseWindowsService().
What it assumes
Assumes a .NET console-based worker application and explains systemd integration without requiring changes to hosted-service configuration.
What you can do after
Apply it via the UseSystemd() IHostBuilder extension when preparing a worker service for Linux systemd hosting.
How it connects
Connects worker services, .NET console applications, IHostBuilder, Windows Services, Docker containers, and managed platform deployment.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.