---
title: "Deploy ASP.NET Minimal API"
description: "ASP.NET Core 10 Minimal API with Scalar, health checks and tracing"
category: "Starters"
url: https://railway.com/deploy/aspnet-minimal-api
---

# Deploy ASP.NET Minimal API

ASP.NET Core 10 Minimal API with Scalar, health checks and tracing

**[Deploy ASP.NET Minimal API on Railway](https://railway.com/template/aspnet-minimal-api)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/aspnet-minimal-api/manifest.json

- **Creator:** justMax
- **Category:** Starters

## Template content

### Api https://raw.githubusercontent.com/dotnet/brand/main/logo/dotnet-logo.svg

- **Source:** https://github.com/maxstue/aspnet-minimal-api
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host ASP.NET Minimal API with Railway

ASP.NET Minimal API is a lean way to build HTTP APIs with ASP.NET Core 10 and C#: endpoints are plain lambdas grouped by feature, without controllers. This starter adds what a production API needs from day one: health checks, OpenAPI with a Scalar UI, ProblemDetails errors, request validation and OpenTelemetry tracing.

## About Hosting ASP.NET Minimal API

Railway builds the API from the repository's Dockerfile. The .NET 10 SDK restores and publishes the app, and the result runs on Microsoft's chiseled `aspnet:10.0` image: about 55 MB, no shell, non-root user. Railway routes the public domain to port 8080 and waits for `/health` before it switches traffic to a new deployment, so a broken release never goes live. Forwarded headers are enabled because Railway terminates TLS at its edge. Tracing is switched on for the service: Railway injects the `OTEL_*` variables and every request shows up as a trace without extra setup.

## Common Use Cases

- REST backend for a web or mobile frontend
- Internal service reached over Railway's private network
- Starting point for a larger .NET API with a database such as PostgreSQL

## Dependencies for ASP.NET Minimal API Hosting

- .NET 10 SDK, only for local development; Railway builds inside Docker
- A GitHub repository with the template's code, created for you on deploy

### Deployment Dependencies

- [ASP.NET Core Minimal APIs](https://learn.microsoft.com/aspnet/core/fundamentals/minimal-apis)
- [Scalar API reference](https://github.com/scalar/scalar)
- [Railway tracing for .NET](https://docs.railway.com/observability/tracing/dotnet)

### Implementation Details

| Path | Purpose |
| --- | --- |
| `/` | Redirects to the Scalar API reference |
| `/scalar` | Interactive API reference |
| `/openapi/v1.json` | OpenAPI 3.1 document |
| `/health` | Health check used by Railway |
| `/api/greetings/{name}` | Example endpoint with validation |

Endpoints live in `src/Api/Endpoints`, one folder per feature group. Railway settings are kept as Infrastructure as Code in `.railway/railway.ts`.

## Why Deploy ASP.NET Minimal API on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying ASP.NET Minimal API on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Openfront Gym](https://railway.com/deploy/openfront-gym) — Opensource Mindbody alternative based on Next.js and Keystone.js
- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [Next.js + Prisma + PostgreSQL Starter](https://railway.com/deploy/nextjs-prisma-postgres) — Deploy a Next.js app with Prisma ORM and PostgreSQL in one click.

Open this page in a browser: https://railway.com/deploy/aspnet-minimal-api
