Microsoft.Extensions.Hosting.Systemd 10.0.0-preview.2.25163.2

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 10.0

.NET Standard 2.1

Version Downloads Last updated
10.0.0-preview.2.25163.2 2 30.03.2025
10.0.0-preview.1.25080.5 0 25.02.2025
9.0.3 1 31.03.2025
9.0.2 0 11.02.2025
9.0.1 2 19.01.2025
9.0.0 2 19.01.2025
9.0.0-rc.2.24473.5 8 24.10.2024
9.0.0-rc.1.24431.7 8 22.09.2024
9.0.0-preview.7.24405.7 8 22.09.2024
9.0.0-preview.6.24327.7 8 22.09.2024
9.0.0-preview.5.24306.7 8 22.09.2024
9.0.0-preview.4.24266.19 8 22.09.2024
9.0.0-preview.3.24172.9 10 22.09.2024
9.0.0-preview.2.24128.5 7 19.10.2024
9.0.0-preview.1.24080.9 8 22.09.2024
8.0.1 7 19.10.2024
8.0.0 7 19.10.2024
8.0.0-rc.2.23479.6 8 22.09.2024
8.0.0-rc.1.23419.4 14 22.09.2024
8.0.0-preview.7.23375.6 10 22.09.2024
8.0.0-preview.6.23329.7 9 19.10.2024
8.0.0-preview.5.23280.8 7 19.10.2024
8.0.0-preview.4.23259.5 16 22.09.2024
8.0.0-preview.3.23174.8 10 22.09.2024
8.0.0-preview.2.23128.3 8 22.09.2024
8.0.0-preview.1.23110.8 10 28.10.2024
7.0.0 9 28.02.2024
7.0.0-rc.2.22472.3 10 22.09.2024
7.0.0-rc.1.22426.10 11 22.09.2024
7.0.0-preview.7.22375.6 10 20.10.2024
7.0.0-preview.6.22324.4 7 19.10.2024
7.0.0-preview.5.22301.12 14 22.09.2024
7.0.0-preview.4.22229.4 5 18.11.2024
7.0.0-preview.3.22175.4 8 22.09.2024
7.0.0-preview.2.22152.2 8 22.09.2024
7.0.0-preview.1.22076.8 10 22.09.2024
6.0.1 3 14.11.2024
6.0.0 7 20.10.2024
6.0.0-rc.2.21480.5 11 27.10.2024
6.0.0-rc.1.21451.13 8 22.09.2024
6.0.0-preview.7.21377.19 15 22.09.2024
6.0.0-preview.6.21352.12 9 19.10.2024
6.0.0-preview.5.21301.5 2 19.01.2025
6.0.0-preview.4.21253.7 10 19.10.2024
6.0.0-preview.3.21201.4 15 28.10.2024
6.0.0-preview.2.21154.6 8 22.09.2024
5.0.1 12 22.09.2024
5.0.0 7 19.10.2024
5.0.0-rc.2.20478.4 11 22.09.2024
5.0.0-rc.1.20451.7 17 22.09.2024
5.0.0-preview.8.20407.3 7 28.10.2024
5.0.0-preview.7.20365.4 12 22.09.2024
5.0.0-preview.6.20306.1 7 19.10.2024
5.0.0-preview.5.20278.3 13 22.09.2024
5.0.0-preview.4.20251.2 8 22.09.2024
5.0.0-preview.3.20215.2 8 22.09.2024
5.0.0-preview.2.20160.3 8 22.09.2024
5.0.0-preview.1.20120.4 12 22.09.2024
3.1.32 12 22.09.2024
3.1.31 10 22.09.2024
3.1.30 7 19.10.2024
3.1.29 12 22.09.2024
3.1.28 11 22.09.2024
3.1.27 12 22.09.2024
3.1.26 13 22.09.2024
3.1.25 10 22.09.2024
3.1.24 11 28.10.2024
3.1.23 10 22.09.2024
3.1.22 8 22.09.2024
3.1.21 11 28.10.2024
3.1.20 8 22.09.2024
3.1.19 11 22.09.2024
3.1.18 13 22.09.2024
3.1.17 11 22.09.2024
3.1.16 8 22.09.2024
3.1.15 7 19.10.2024
3.1.14 5 26.11.2024
3.1.13 12 22.09.2024
3.1.12 17 22.09.2024
3.1.11 10 22.09.2024
3.1.10 2 19.01.2025
3.1.9 10 22.09.2024
3.1.8 2 19.01.2025
3.1.7 10 19.10.2024
3.1.6 9 22.09.2024
3.1.5 10 22.09.2024
3.1.4 15 22.09.2024
3.1.3 14 22.09.2024
3.1.2 8 22.09.2024
3.1.1 10 22.09.2024
3.1.0 8 22.09.2024
3.1.0-preview3.19553.2 2 19.01.2025
3.1.0-preview2.19525.4 12 22.09.2024
3.1.0-preview1.19506.1 12 19.10.2024
3.0.3 10 22.09.2024
3.0.2 12 22.09.2024
3.0.1 10 20.10.2024
3.0.0 11 22.09.2024
3.0.0-rc1.19456.10 8 22.09.2024
3.0.0-preview9.19423.4 13 22.09.2024
3.0.0-preview8.19405.4 14 22.09.2024
3.0.0-preview7.19362.4 10 22.09.2024