Deploy ASP.NET Core in minutes

ASP.NET Core deploys on Darmi Cloud with the Dockerfile preset. The multi-stage Dockerfile below publishes your app with the .NET SDK and runs it on the slim ASP.NET runtime image behind automatic HTTPS.

Deploy from GitHub Automatic HTTPS subdomain Live build & runtime logs
Step by step

How to deploy ASP.NET Core

Darmi Cloud doesn't have a dedicated ASP.NET Core preset yet — but the Dockerfile preset gets you deployed just as fast.

  1. 1

    Add a Dockerfile to your repo

    Commit the Dockerfile below to the root of your ASP.NET Core repository. Darmi Cloud will build the image from it.

  2. 2

    Sign in with GitHub

    Open darmicloud.tech and sign in with GitHub (or Google). On first sign-in you grant read access so the deploy worker can clone your repositories.

  3. 3

    Import your repository

    Click New Project, pick your ASP.NET Core repository, and choose the branch to deploy — the default branch is preselected.

  4. 4

    Select the Dockerfile preset

    Choose the Dockerfile preset so Darmi Cloud builds and runs the image from your committed Dockerfile. Set the container port to 8080.

  5. 5

    Add environment variables

    Add any environment variables your app needs (database URLs, API keys, secrets). Mark sensitive values as secrets — they are injected into the container and hidden in the UI afterwards.

  6. 6

    Deploy and watch it go live

    Click Deploy. Watch the live build and runtime logs, and your app goes live on an automatic HTTPS subdomain. Every push to your branch redeploys automatically.

Dockerfile for ASP.NET Core

Copy this into a file named Dockerfile at the root of your repository.

# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish -c Release -o /app

FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app .
ENV ASPNETCORE_URLS=http://0.0.0.0:8080
EXPOSE 8080
# Replace MyApp.dll with your project's published DLL
CMD ["dotnet", "MyApp.dll"]

Tips for ASP.NET Core on Darmi Cloud

  • Replace MyApp.dll with the DLL name from your .csproj (usually <project-name>.dll).
  • ASPNETCORE_URLS binds Kestrel to 0.0.0.0:8080 — keep the project port setting at 8080 to match.
  • Store connection strings as environment variables (e.g. ConnectionStrings__Default) in project settings.
FAQ

ASP.NET Core deployment FAQ

Does Darmi Cloud support .NET?

Yes, through the Dockerfile preset. The multi-stage Dockerfile above publishes with the .NET 8 SDK and runs on the official ASP.NET runtime image.

How do I configure Kestrel's port in a container?

Set ASPNETCORE_URLS=http://0.0.0.0:8080 (as in the Dockerfile) and use the same port in project settings so Traefik routes traffic correctly.

Can I use my own custom domain?

Yes. Connect an existing domain or buy one inside Darmi Cloud. DNS is configured automatically and every domain gets free SSL via Let's Encrypt.

Can I self-host instead of using darmicloud.tech?

Yes. Darmi Cloud is fully self-hostable on any VPS with Docker, PostgreSQL, Redis and Traefik using a single docker-compose file — same features, your infrastructure.

Deploy other frameworks

Ready to deploy your ASP.NET Core app?

Connect GitHub and ship in minutes — on a free HTTPS subdomain, or on your own custom domain.

Deploy ASP.NET Core now