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

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.0-rc.2.24473.5 3 24.10.2024
9.0.0-rc.1.24431.7 6 22.09.2024
9.0.0-preview.7.24405.7 6 22.09.2024
9.0.0-preview.6.24327.7 6 22.09.2024
9.0.0-preview.5.24306.7 6 22.09.2024
9.0.0-preview.4.24266.19 6 22.09.2024
9.0.0-preview.3.24172.9 5 22.09.2024
9.0.0-preview.2.24128.5 4 19.10.2024
9.0.0-preview.1.24080.9 6 22.09.2024
8.0.1 4 19.10.2024
8.0.0 4 19.10.2024
8.0.0-rc.2.23479.6 6 22.09.2024
8.0.0-rc.1.23419.4 4 22.09.2024
8.0.0-preview.7.23375.6 5 22.09.2024
8.0.0-preview.6.23329.7 3 19.10.2024
8.0.0-preview.5.23280.8 4 19.10.2024
8.0.0-preview.4.23259.5 5 22.09.2024
8.0.0-preview.3.23174.8 3 22.09.2024
8.0.0-preview.2.23128.3 6 22.09.2024
8.0.0-preview.1.23110.8 2 28.10.2024
7.0.0 7 28.02.2024
7.0.0-rc.2.22472.3 4 22.09.2024
7.0.0-rc.1.22426.10 4 22.09.2024
7.0.0-preview.7.22375.6 3 20.10.2024
7.0.0-preview.6.22324.4 4 19.10.2024
7.0.0-preview.5.22301.12 5 22.09.2024
7.0.0-preview.4.22229.4 0 10.05.2022
7.0.0-preview.3.22175.4 6 22.09.2024
7.0.0-preview.2.22152.2 6 22.09.2024
7.0.0-preview.1.22076.8 4 22.09.2024
6.0.0 4 20.10.2024
6.0.0-rc.2.21480.5 2 27.10.2024
6.0.0-rc.1.21451.13 6 22.09.2024
6.0.0-preview.7.21377.19 5 22.09.2024
6.0.0-preview.6.21352.12 3 19.10.2024
6.0.0-preview.5.21301.5 0 15.06.2021
6.0.0-preview.4.21253.7 3 19.10.2024
6.0.0-preview.3.21201.4 3 28.10.2024
6.0.0-preview.2.21154.6 6 22.09.2024
5.0.1 4 22.09.2024
5.0.0 4 19.10.2024
5.0.0-rc.2.20478.4 4 22.09.2024
5.0.0-rc.1.20451.7 5 22.09.2024
5.0.0-preview.8.20407.3 4 28.10.2024
5.0.0-preview.7.20365.4 5 22.09.2024
5.0.0-preview.6.20306.1 4 19.10.2024
5.0.0-preview.5.20278.3 3 22.09.2024
5.0.0-preview.4.20251.2 6 22.09.2024
5.0.0-preview.3.20215.2 6 22.09.2024
5.0.0-preview.2.20160.3 6 22.09.2024
5.0.0-preview.1.20120.4 5 22.09.2024
3.1.32 5 22.09.2024
3.1.31 5 22.09.2024
3.1.30 4 19.10.2024
3.1.29 4 22.09.2024
3.1.28 4 22.09.2024
3.1.27 5 22.09.2024
3.1.26 3 22.09.2024
3.1.25 4 22.09.2024
3.1.24 2 28.10.2024
3.1.23 5 22.09.2024
3.1.22 4 22.09.2024
3.1.21 2 28.10.2024
3.1.20 6 22.09.2024
3.1.19 5 22.09.2024
3.1.18 5 22.09.2024
3.1.17 3 22.09.2024
3.1.16 6 22.09.2024
3.1.15 4 19.10.2024
3.1.14 0 06.04.2021
3.1.13 4 22.09.2024
3.1.12 4 22.09.2024
3.1.11 3 22.09.2024
3.1.10 0 09.11.2020
3.1.9 5 22.09.2024
3.1.8 0 08.09.2020
3.1.7 3 19.10.2024
3.1.6 4 22.09.2024
3.1.5 5 22.09.2024
3.1.4 5 22.09.2024
3.1.3 4 22.09.2024
3.1.2 3 22.09.2024
3.1.1 5 22.09.2024
3.1.0 6 22.09.2024
3.1.0-preview3.19553.2 0 13.11.2019
3.1.0-preview2.19525.4 5 22.09.2024
3.1.0-preview1.19506.1 3 19.10.2024
3.0.3 5 22.09.2024
3.0.2 5 22.09.2024
3.0.1 3 20.10.2024
3.0.0 5 22.09.2024
3.0.0-rc1.19456.10 3 22.09.2024
3.0.0-preview9.19423.4 5 22.09.2024
3.0.0-preview8.19405.4 5 22.09.2024
3.0.0-preview7.19362.4 5 22.09.2024