Microsoft.Extensions.Hosting.Systemd 9.0.0-rc.2.24473.5

About

Provides an implementation for hosting an application as a Linux systemd service.

The package ensures proper communication between .NET applications and systemd, making it easier to build, deploy, and run applications as Linux services.

Key Features

  • Systemd service integration
  • Health check support
  • Logging and diagnostics with different log levels
  • Notify systemd on application state changes

How to Use

Wherever you configure your host, add the UseSystemd method to the builder chain:

public static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .UseSystemd() // Enable running as a Systemd service
        .ConfigureServices((hostContext, services) =>
        {
            ...
        });

The UseSystemd method will no-op when not running as a daemon, allowing normal debugging or production use both with and without systemd.

Registering the service requires a special file, called a unit file, to be added to the /etc/systemd/system directory.

For more information on this part, check the run your app as a Linux service with systemd guide.

Main Types

The main types provided by this library are:

  • Microsoft.Extensions.Hosting.Systemd.SystemdNotifier
  • Microsoft.Extensions.Hosting.Systemd.SystemdLifetime
  • Microsoft.Extensions.Hosting.SystemdHostBuilderExtensions

Additional Documentation

Feedback & Contributing

Microsoft.Extensions.Hosting.Systemd is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

No packages depend on Microsoft.Extensions.Hosting.Systemd.

https://go.microsoft.com/fwlink/?LinkID=799421

.NET 8.0

.NET 9.0

.NET Standard 2.1

Version Downloads Last updated
9.0.1 1 01/24/2025
9.0.0 2 11/26/2024
9.0.0-rc.2.24473.5 3 11/11/2024
9.0.0-rc.1.24431.7 3 10/08/2024
9.0.0-preview.7.24405.7 2 10/08/2024
9.0.0-preview.6.24327.7 2 10/08/2024
9.0.0-preview.5.24306.7 2 10/08/2024
9.0.0-preview.4.24266.19 3 10/08/2024
9.0.0-preview.3.24172.9 2 10/08/2024
9.0.0-preview.2.24128.5 2 10/08/2024
9.0.0-preview.1.24080.9 2 10/08/2024
8.0.1 2 11/05/2024
8.0.0 4 10/08/2024
8.0.0-rc.2.23479.6 3 10/08/2024
8.0.0-rc.1.23419.4 2 10/08/2024
8.0.0-preview.7.23375.6 3 10/08/2024
8.0.0-preview.6.23329.7 3 10/08/2024
8.0.0-preview.5.23280.8 2 10/08/2024
8.0.0-preview.4.23259.5 3 10/08/2024
8.0.0-preview.3.23174.8 3 10/08/2024
8.0.0-preview.2.23128.3 2 10/08/2024
8.0.0-preview.1.23110.8 2 10/08/2024
7.0.0 3 10/08/2024
7.0.0-rc.2.22472.3 2 10/08/2024
7.0.0-rc.1.22426.10 3 10/08/2024
7.0.0-preview.7.22375.6 2 10/08/2024
7.0.0-preview.6.22324.4 4 10/08/2024
7.0.0-preview.5.22301.12 3 10/08/2024
7.0.0-preview.4.22229.4 3 10/08/2024
7.0.0-preview.3.22175.4 2 10/08/2024
7.0.0-preview.2.22152.2 2 10/08/2024
7.0.0-preview.1.22076.8 3 10/08/2024
6.0.1 2 11/26/2024
6.0.0 4 10/08/2024
6.0.0-rc.2.21480.5 3 10/08/2024
6.0.0-rc.1.21451.13 3 10/08/2024
6.0.0-preview.7.21377.19 2 10/08/2024
6.0.0-preview.6.21352.12 3 10/08/2024
6.0.0-preview.5.21301.5 3 10/08/2024
6.0.0-preview.4.21253.7 3 10/08/2024
6.0.0-preview.3.21201.4 3 10/08/2024
6.0.0-preview.2.21154.6 2 10/08/2024
5.0.1 3 10/08/2024
5.0.0 5 09/19/2022
5.0.0-rc.2.20478.4 3 10/08/2024
5.0.0-rc.1.20451.7 2 10/08/2024
5.0.0-preview.8.20407.3 4 10/08/2024
5.0.0-preview.7.20365.4 2 10/08/2024
5.0.0-preview.6.20306.1 3 10/08/2024
5.0.0-preview.5.20278.3 3 10/08/2024
5.0.0-preview.4.20251.2 3 10/08/2024
5.0.0-preview.3.20215.2 3 10/08/2024
5.0.0-preview.2.20160.3 3 10/08/2024
5.0.0-preview.1.20120.4 2 10/08/2024
3.1.32 3 10/08/2024
3.1.31 3 10/08/2024
3.1.30 4 10/08/2024
3.1.29 3 10/08/2024
3.1.28 2 10/08/2024
3.1.27 3 10/08/2024
3.1.26 3 10/08/2024
3.1.25 3 10/08/2024
3.1.24 4 10/08/2024
3.1.23 3 10/08/2024
3.1.22 3 10/08/2024
3.1.21 3 10/08/2024
3.1.20 4 10/08/2024
3.1.19 3 10/08/2024
3.1.18 3 10/08/2024
3.1.17 3 10/08/2024
3.1.16 2 10/08/2024
3.1.15 4 10/08/2024
3.1.14 3 10/08/2024
3.1.13 3 10/08/2024
3.1.12 3 10/08/2024
3.1.11 3 10/08/2024
3.1.10 3 10/08/2024
3.1.9 3 10/08/2024
3.1.8 4 10/08/2024
3.1.7 3 10/08/2024
3.1.6 4 10/08/2024
3.1.5 3 10/08/2024
3.1.4 3 10/08/2024
3.1.3 3 10/08/2024
3.1.2 3 10/08/2024
3.1.1 4 10/08/2024
3.1.0 2 10/08/2024
3.1.0-preview3.19553.2 3 10/08/2024
3.1.0-preview2.19525.4 3 10/08/2024
3.1.0-preview1.19506.1 2 10/08/2024
3.0.3 3 10/08/2024
3.0.2 3 10/08/2024
3.0.1 2 10/08/2024
3.0.0 3 10/08/2024
3.0.0-rc1.19456.10 1 01/20/2025
3.0.0-preview9.19423.4 2 10/08/2024
3.0.0-preview8.19405.4 2 10/08/2024
3.0.0-preview7.19362.4 4 10/08/2024