Picking the wrong hosting platform for your .NET app is an expensive mistake — both in dollars and developer time. This guide covers every serious option in 2025, with real pricing, real deployment experiences, and a concrete recommendation matrix at the end.
| Provider | From | Free | Docker | Auto-scale | Setup | DX |
|---|---|---|---|---|---|---|
🪁 Fly.io Global low-latency apps, multi-region | $2/mo | ✓ | ✓ | ✓ | ●●●●○ | ●●●●○ |
🚂 Railway Fastest possible deploy, hobby to startup | $5/mo | ✓ | ✓ | – | ●●●●● | ●●●●● |
🌊 DigitalOcean Apps Predictable pricing, developer-friendly | $5/mo | – | ✓ | ✓ | ●●●●○ | ●●●●○ |
🌀 Render.com Simple deploy, no DevOps overhead | $7/mo | ✓ | ✓ | ✓ | ●●●●● | ●●●●○ |
🟠 AWS Elastic Beanstalk Teams already invested in AWS ecosystem | $8/mo | ✓ | ✓ | ✓ | ●●○○○ | ●●○○○ |
☁️ Azure App Service Enterprises already on Azure / .NET teams | $13/mo | ✓ | ✓ | ✓ | ●●●●○ | ●●●●○ |
Pricing as of Jan 2025. "Setup" = fewer stars → simpler. "DX" = developer experience.
The Contenders
Six platforms worth your attention for .NET workloads:
- Azure App Service — Microsoft's own PaaS, deepest .NET integration
- AWS Elastic Beanstalk — Amazon's managed PaaS layer over EC2
- Railway — modern developer-focused PaaS with minimal config
- Fly.io — container-first platform with global edge deployment
- Render.com — Heroku successor with simple pricing
- DigitalOcean App Platform — straightforward PaaS from a familiar provider
Azure App Service
Overview
Azure App Service is the natural home for .NET apps. Microsoft builds and maintains it, the runtime support is always first-in-class, and the ecosystem integration (Azure SQL, Key Vault, Managed Identity, Application Insights) is unmatched.
Deployment
# Create resource group and App Service plan
az group create --name myapp-rg --location eastus
az appservice plan create --name myapp-plan --resource-group myapp-rg --sku B1 --is-linux
# Create the web app targeting .NET 8
az webapp create \
--name myapp-unique-name \
--resource-group myapp-rg \
--plan myapp-plan \
--runtime "DOTNETCORE:8.0"
# Deploy from a local folder
az webapp deploy \
--resource-group myapp-rg \
--name myapp-unique-name \
--src-path ./publish \
--type zipPricing Tiers
| Tier | Price/month | RAM | vCPU | Notes |
|---|---|---|---|---|
| F1 (Free) | $0 | 1 GB | Shared | 60 min/day CPU limit, no custom domain SSL |
| B1 (Basic) | ~$13 | 1.75 GB | 1 | No autoscale, suitable for dev/test |
| S1 (Standard) | ~$69 | 1.75 GB | 1 | Autoscale, deployment slots, custom domains |
| P1v3 (Premium) | ~$124 | 8 GB | 2 | Production-grade, Zone redundancy available |
The B1 tier is the sweet spot for small production apps. Upgrade to S1 when you need deployment slots (blue/green deploys) or auto-scaling rules.
Deployment Slots
Deployment slots let you run a staging environment and swap it to production with zero downtime:
# Create a staging slot
az webapp deployment slot create \
--name myapp-unique-name \
--resource-group myapp-rg \
--slot staging
# Swap staging to production
az webapp deployment slot swap \
--name myapp-unique-name \
--resource-group myapp-rg \
--slot staging \
--target-slot productionGitHub Actions CI/CD
# .github/workflows/deploy.yml
name: Deploy to Azure App Service
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Publish
run: dotnet publish -c Release -o ./publish
- name: Deploy to Azure
uses: azure/webapps-deploy@v3
with:
app-name: myapp-unique-name
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
package: ./publishVerdict
Best for: Enterprise .NET apps, teams already in Azure, apps needing Azure SQL, Key Vault, or Managed Identity.
Watch out for: Pricing jumps sharply between B1 and S1. Cold starts on lower tiers.
AWS Elastic Beanstalk
Overview
Elastic Beanstalk is AWS's PaaS abstraction over EC2. You get more control than Azure App Service but also more configuration surface. .NET support is solid via the Windows Server or Linux platforms.
Deployment
# Install EB CLI
pip install awsebcli
# Initialize and create environment
eb init myapp --platform "dotnet-core-on-al2023" --region us-east-1
eb create myapp-prod --instance-type t3.small
# Deploy
dotnet publish -c Release -o ./publish
cd ./publish
zip -r ../deploy.zip .
eb deployPricing
Elastic Beanstalk itself is free — you pay for the underlying EC2 instances, load balancers, and storage.
| Instance | Price/month (on-demand) | Notes |
|---|---|---|
| t3.micro | ~$8.50 | Free tier eligible, 1 vCPU burst |
| t3.small | ~$17 | Better baseline performance |
| t3.medium | ~$34 | 2 vCPU, 4 GB RAM |
Add ~$18/month for an Application Load Balancer if you need it (required for multi-instance).
Autoscaling
// .elasticbeanstalk/env.yaml
option_settings:
aws:autoscaling:asg:
MinSize: 1
MaxSize: 4
aws:autoscaling:trigger:
MeasureName: CPUUtilization
Unit: Percent
UpperThreshold: 70
LowerThreshold: 20Verdict
Best for: Teams already deep in AWS, apps needing fine-grained EC2 control, workloads with variable traffic that need auto-scaling cost optimization.
Watch out for: Steeper learning curve than Azure App Service. Configuration sprawl in .ebextensions.
Railway
Overview
Railway is the highest-DX option in this list. Push code, get a URL. No YAML manifests required for basic use. It runs containers internally and handles routing, TLS, and scaling transparently.
Deployment
# Install Railway CLI
npm install -g @railway/cli
# Login and initialize
railway login
railway init
# Add a Dockerfile or let Railway auto-detect .NET
# Then deploy
railway upA minimal Dockerfile for .NET 8:
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 .
ENTRYPOINT ["dotnet", "MyApp.dll"]Or use a railway.json for configuration:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"dockerfilePath": "Dockerfile"
},
"deploy": {
"startCommand": "dotnet MyApp.dll",
"healthcheckPath": "/health",
"restartPolicyType": "ON_FAILURE"
}
}Pricing
- Hobby plan: $5/month + usage ($0.000463/vCPU-minute, $0.000231/GB-minute)
- Pro plan: $20/month + usage
- Typical small .NET API: $5–15/month total
Railway's free trial gives $5 in credits — enough to run a small app for a month to evaluate it before committing.
Environment Variables
railway variables set DATABASE_URL="Server=...;Database=...;..."
railway variables set ASPNETCORE_ENVIRONMENT="Production"Verdict
Best for: Indie developers, startups, side projects, teams who want zero infrastructure management. Excellent for Postgres-backed .NET APIs.
Watch out for: Less mature enterprise features. No SLA for Hobby plan.
Fly.io
Overview
Fly.io runs your containers on hardware in 30+ regions worldwide. It's uniquely suited to latency-sensitive apps that need to run close to users globally.
Deployment
# Install flyctl
curl -L https://fly.io/install.sh | sh
# Launch a new app (detects Dockerfile)
fly launch --name myapp --region iad
# Deploy
fly deployThe fly.toml config:
app = "myapp"
primary_region = "iad"
[build]
dockerfile = "Dockerfile"
[env]
ASPNETCORE_ENVIRONMENT = "Production"
ASPNETCORE_URLS = "http://+:8080"
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
[[vm]]
memory = "512mb"
cpu_kind = "shared"
cpus = 1Pricing
- Free allowance: 3 shared-CPU-1x VMs with 256 MB RAM, 3 GB persistent storage
- shared-cpu-1x 256 MB: ~$1.94/month
- shared-cpu-1x 512 MB: ~$3.83/month
- dedicated-cpu-2x 4 GB: ~$62/month
Multi-Region
# Add regions
fly regions add lhr syd
# Scale to have at least 1 machine per region
fly scale count 2 --region lhr
fly scale count 2 --region sydSecrets Management
fly secrets set DATABASE_URL="..."
fly secrets set JWT_SECRET="..."Verdict
Best for: Global APIs, latency-sensitive workloads, teams comfortable with containers who want global distribution at reasonable cost.
Watch out for: Auto-stop/start machines add cold-start latency on the free tier. More ops-focused than Railway.
Render.com
Overview
Render is the closest modern Heroku replacement. Simple Git-connected deploys, managed Postgres, and straightforward pricing.
Deployment
# Render deploys from Git automatically
# Just connect your repo in the dashboard and set:
# Build Command: dotnet publish -c Release -o ./publish
# Start Command: dotnet ./publish/MyApp.dllOr use a Dockerfile (recommended for .NET).
Pricing
| Tier | Price/month | RAM | vCPU |
|---|---|---|---|
| Free | $0 | 512 MB | 0.1 |
| Starter | $7 | 512 MB | 0.5 |
| Standard | $25 | 2 GB | 1 |
| Pro | $85 | 4 GB | 2 |
The Free tier spins down after 15 minutes of inactivity and has a cold start of 30–60 seconds. Not suitable for production APIs that need to be always-on.
Verdict
Best for: Hobby projects, staging environments, teams migrating from Heroku.
Watch out for: Free tier sleep behavior, fewer advanced features than Railway or Fly.io.
DigitalOcean App Platform
Overview
DigitalOcean App Platform offers simple container-based deployments with predictable pricing — no surprise bills from usage-based charging.
Deployment
# Using doctl CLI
doctl apps create --spec app.yaml# app.yaml
name: myapp
region: nyc
services:
- name: api
dockerfile_path: Dockerfile
github:
repo: yourorg/yourrepo
branch: main
deploy_on_push: true
instance_size_slug: basic-xxs
instance_count: 1
http_port: 8080
envs:
- key: ASPNETCORE_ENVIRONMENT
value: ProductionPricing
| Plan | Price/month | RAM | vCPU |
|---|---|---|---|
| Basic XXS | $5 | 512 MB | 1 |
| Basic XS | $10 | 1 GB | 1 |
| Basic S | $20 | 2 GB | 1 |
| Professional S | $12 | 1 GB | 1 |
Verdict
Best for: Teams who want Heroku-like simplicity with predictable pricing and a familiar provider.
Watch out for: Fewer .NET-specific integrations than Azure. Limited regions compared to Fly.io.
Which Should You Pick? Recommendation Matrix
| Scenario | Recommended Platform |
|---|---|
| Enterprise / Azure shop | Azure App Service (S1+) |
| AWS shop, complex infrastructure | AWS Elastic Beanstalk |
| Indie dev / side project, fast start | Railway |
| Global API, latency matters | Fly.io |
| Migrating from Heroku | Render.com (paid tier) |
| Predictable-cost PaaS | DigitalOcean App Platform |
| Zero budget prototype | Fly.io (free allowance) or Render (free tier, tolerate cold starts) |
| Needs managed Postgres, minimal config | Railway or Render |
| Needs Managed Identity, Key Vault | Azure App Service |
| Multi-region active-active | Fly.io |
Performance Comparison
Cold start times (approximate, shared/burstable VMs, .NET 8 minimal API):
| Platform | Cold Start | Notes |
|---|---|---|
| Azure App Service B1 | 2–5 s | Always-on option available |
| AWS EB t3.small | 1–3 s | Usually always-on |
| Railway | 3–8 s | Scales to zero when not in use |
| Fly.io (auto-stop) | 2–6 s | Configurable min machines |
| Render free | 30–60 s | Long sleep cold start |
| DigitalOcean Basic | 2–4 s | Always-on |
Use .NET 8 Native AOT for apps that need sub-second cold starts on any platform. AOT-compiled .NET apps can start in under 200ms.
Auto-Scaling Comparison
| Platform | Auto-Scale | Min-to-Max Time | Config Complexity |
|---|---|---|---|
| Azure App Service S1 | Yes (rule-based + HTTP-based) | 3–5 min | Medium |
| AWS EB | Yes (EC2 Auto Scaling Groups) | 3–7 min | High |
| Railway | Yes (vertical scaling) | Seconds | Low |
| Fly.io | Yes (machine-based) | 5–30 s | Medium |
| Render | Yes (paid plans) | 1–3 min | Low |
| DigitalOcean | Yes (horizontal) | 1–3 min | Low |
Free Tier Summary
| Platform | Free Tier Details | Production-Ready? |
|---|---|---|
| Azure | F1: 60 CPU-min/day, no SSL | No |
| AWS | t2.micro for 12 months (new accounts) | Limited |
| Railway | $5/month credit | Yes (burns fast) |
| Fly.io | 3x 256MB VMs, 3 GB storage | Yes (small apps) |
| Render | 1 service, sleeps after 15 min | No |
| DigitalOcean | None (App Platform) | N/A |
Final Thoughts
For most .NET developers in 2025, the decision comes down to three options:
- Azure App Service if you're in the Microsoft ecosystem or need enterprise features
- Railway if you want the fastest path from code to production URL
- Fly.io if you need global distribution or cost-efficient always-on containers
The days of "just use Azure because it's .NET" are over. Railway and Fly.io offer compelling DX at lower costs for most workloads. Evaluate based on your team's expertise, scale requirements, and existing cloud commitments.