Skip to main content

.NET

Containerized .NET (ASP.NET Core) applications can be created and managed in OpenPanel Enterprise Edition.

Step-by-step guide: Deploy a .NET / ASP.NET Core app


Create an Application​

To create a new .NET application, navigate to OpenPanel > Websites > Install app and click Set up .NET application.

On the next page, you can configure the following settings:

  • Name – The name of the application and container as displayed in OpenPanel.
  • Port – The port your app listens on. Prefilled with 8080, the default of the .NET 8+ container images.
  • Domain Name / Subfolder – The domain (and optional subfolder) where the application will be publicly accessible.
  • Startup file – The .dll executed at startup with the dotnet command, for example /var/www/html/example.com/out/MyApp.dll.
  • Custom startup command – Use a custom startup command instead of the default dotnet <startup file>.
  • Git repository URL – Optional. The app's code is fetched from this repository every time the container starts, and the startup file is detected from the project file.
  • Version – Select a .NET version (8.0 and newer) from Microsoft's official mcr.microsoft.com/dotnet/sdk images.
  • Run dotnet publish – Run dotnet publish -c Release -o out in the app folder before starting the application, so the startup file is then out/MyApp.dll. Skip this if you upload an already published app.
  • Resource presets – Small (0.25 CPU, 0.25 GB, 100 processes), Medium (0.5 CPU, 1 GB, 500 processes) or Large (1 CPU, 2 GB, 1000 processes) fill in the three limits below in one click. Medium is the default.
  • CPU cores – Number of CPU cores allocated to the application.
  • Memory – Amount of memory (in GB) allocated to the application.
  • Max processes – The most processes the application's container can run at once.

After completing the form, click Start installation. The installation process will be displayed below the form. Once complete, you’ll be redirected to the management page where you can view all your applications.

INFORMATION

.NET applications run on Linux with ASP.NET Core's built-in Kestrel server, and the domain's web server (Nginx, Apache, OpenResty or LiteSpeed) forwards requests to it. You don't pick a different web server for .NET. Classic ASP.NET Framework 4.x apps (WebForms, MVC 5) need Windows and IIS and can't run on OpenPanel.

Example App​

A minimal ASP.NET Core app is available at stefanpejcic/net-helloworld.

HelloWorld.csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RollForward>Major</RollForward>
</PropertyGroup>

</Project>

Program.cs:

var app = WebApplication.CreateBuilder(args).Build();

app.MapGet("/", () => $"Hello, World! (from .NET {Environment.Version} on OpenPanel)");

app.Run();

Put both files in the domain folder, enable Run dotnet publish, set the port to 8080 and the startup file to /var/www/html/example.com/out/HelloWorld.dll.


Manage Applications​

Once your application is created, you can manage it from OpenPanel > Websites > Sites.

Click Manage next to the application name to open its management page.

On this page, you can view important details such as:

  • Screenshot – Preview of the application’s domain.
  • Status – Current container status.
  • Version – .NET version in use.
  • CPU limit – Configured CPU allocation.
  • Memory limit – Configured memory allocation.
  • Speed – Google PageSpeed Insights data for the website.
  • Files – Current folder path and size.
  • Firewall – WAF (Web Application Firewall) status for the domain (if enabled).

You also have several management options:

  • Actions – Start, stop, or restart the container. A restart also pulls the image for the selected .NET version.
  • Overview – Modify startup file or command, working directory, the publish setting, version, and resource limits (CPU, Memory, PIDs).
  • Install packages – View the project file (.csproj) with its target framework and NuGet packages, and run dotnet publish.
  • Logs – View container logs for troubleshooting.
  • Remove – Delete the application.
Was this helpful?