ASP.NET Core hosting in 2026: how to deploy a .NET web app
A .NET web project is recognised from its .csproj or .sln file, published with dotnet publish, and started on the port Livops assigns. A project with its own Dockerfile is built from that file instead.
By Livops team, the people who build and run LivopsUpdated
Livops finds a .NET web project from a .csproj or .sln file. It publishes the project that uses the Microsoft.NET.Sdk.Web SDK as the web app, and the libraries it references come with it. Test projects in the same repository are not started.
What runs
- build:
dotnet publish -c Release -o out, for the web project, followed by removing thebinandobjfolders - start: the app in
outis started withdotnet. Livops reads the name fromout/web.configif it exists, otherwise from theruntimeconfig.jsonthat the publish wrote.
Publishing into one folder means the start command does not need to know your project’s name.
The port
Livops sets PORT, and the start command makes Kestrel listen on http://0.0.0.0:$PORT. Do not configure Kestrel endpoints in appsettings.json or hard-code a port, so that the port stays under Livops’ control. A fixed port makes the app unreachable.
Set the health check path to /, or to a page that always answers. If the check fails, the app is restarted.
Runtime version
The app runs on the .NET version it targets. Livops sets DOTNET_ROLL_FORWARD=LatestMajor unless you set it yourself, so a project built for a version that is no longer installed can still start on the newest installed major version. If your project pins one exact SDK in global.json, Livops loosens that pin before the build.
Environment variables
Put secrets and settings in the Variables section of the cabinet. ASP.NET Core reads them as configuration, so a variable named ConnectionStrings__Default maps to ConnectionStrings:Default. A change takes effect after a restart.
Common mistakes
- A fixed URL in the code. Let Livops set the port with
PORT. - Publishing the whole solution by hand. Livops publishes the web project. If you have a tests project in the solution, it is not the one started.
- A Dockerfile that listens on a different port. It must listen on the value in
PORT. - Secrets in
appsettings.json. Put them in the Variables section, and keep the file for defaults only.
Questions
Is an ASP.NET Core app free on Livops?
It is a web app, a server process, so it is paid by the memory it uses. Only a site built to plain files is free.
Which port does the app listen on?
The port in the PORT variable that Livops sets. The server is told to listen on all addresses at that port with ASPNETCORE_URLS. Do not set your own URL in the code or in appsettings.
What if my project has a Dockerfile?
Then Livops builds that Dockerfile and does not use the .NET preset. Your Dockerfile must start the app on the port in PORT.
Sources
- .NET — dotnet publish (learn.microsoft.com). Checked .
- ASP.NET Core — Kestrel endpoint configuration (learn.microsoft.com). Checked .
Put your project online today
Connect GitHub or drop a folder. No card is asked for.
Deploy your .NET appRelated
- Docker hosting: how to deploy a Docker container or a DockerfileTo host a container you need a host that builds or pulls the image, starts its CMD, sends traffic to the port it listens on and stops it with SIGTERM. On Livops a Dockerfile at the root of the repository is built on Livops's servers and runs for 39 credits a month (39,000 so'm); a public image from Docker Hub, GHCR or Quay runs without a build. Here is what a container needs, and how a VPS, Render, Railway, Fly.io, DigitalOcean and Heroku compare.
- App not listening on $PORT: why the health check failed after deployThe platform started your app, tried the port it gave it, and nothing answered in time. Almost always the app listens on its own fixed port instead of the PORT variable, listens on localhost (127.0.0.1) instead of 0.0.0.0, or crashed or was still starting when the check gave up. Listen on 0.0.0.0 and the port in PORT, and it passes.
- 502 Bad Gateway after deploying: what it means and how to fix itThe proxy in front of your app reached for it and got no valid answer: nothing was listening on the port it tried, or the process closed the connection mid-request. After a deploy that is almost always one of five things: the app listens on the wrong port or on 127.0.0.1, it crashed on start, it was still starting, it ran out of memory, or the proxy points at the wrong port. The app's own log says which.
- Node.js hosting in 2026: how to deploy an Express appA Node.js server in production needs one long-running process that listens on the port it is given, restarts when it crashes and exits cleanly on SIGTERM. On Livops you push a repository with package.json and it runs as a web app for 39 credits a month (39,000 so'm). Here is what Node needs, and how a VPS, Render, Railway, Fly.io, DigitalOcean and Heroku compare.
- Spring Boot hosting in 2026: deploying a Java app built with Maven or GradleA Spring Boot app in production is one executable jar, a JVM sized to the container rather than the machine, the port from the environment and a build that fits the time limit. On Livops a repository with pom.xml or build.gradle is built into that jar and runs as a web app for 39 credits a month (39,000 so'm), with the heap set to 75% of the container's memory. Here is how Render, Railway, Fly.io, Heroku and a VPS compare.