Deploy .NET

Deploy .NET on your own server.

Deploy an ASP.NET Core app on your own server: EF Core migrations before each release, Postgres alongside, and zero-downtime rollouts.

.NET on Beep
Build
Railpack (auto)
Start
dotnet YourApp.dll
Port
$PORT, set by Beep
Pre-deploy
./efbundle
Health check
/healthz

Step by step.

  1. Connect a server

    Use Beep Cloud, a server in your own cloud account, or any Ubuntu or Debian VPS. Beep installs its runtime and agent and locks the server down: inbound traffic is denied, and app ports are reachable only from Beep’s edge.

  2. Create a service from your repository

    Pick the GitHub or GitLab repository and the branch to track. In a monorepo, set the root directory for this service; watch paths limit rebuilds to changes that touch it.

  3. Let Beep build it

    Beep builds .NET apps with Railpack. Add a Dockerfile if you want to pin the SDK and runtime images yourself. You can override the install, build or start command on the service.

    Start command
    dotnet YourApp.dll
  4. Listen on $PORT

    Beep sets PORT for every service unless you set it yourself, and routes traffic from its edge to that port. Bind to 0.0.0.0 so the edge can reach the container.

    Program.cs
    var port = Environment.GetEnvironmentVariable("PORT") ?? "8080";
    builder.WebHost.UseUrls($"http://0.0.0.0:{port}");
  5. Add a database

    Add managed Postgres (16 to 18, with pgvector and PostGIS), Redis or Valkey to the project, then reference its connection string from your service. References resolve at deploy time.

    Program.cs
    // PGHOST=${{ postgres.PGHOST }}, and PGPORT, PGDATABASE, PGUSER, PGPASSWORD the same way
    string Env(string key) => Environment.GetEnvironmentVariable(key)!;
    var connection = $"Host={Env("PGHOST")};Port={Env("PGPORT")};Database={Env("PGDATABASE")};" +
      $"Username={Env("PGUSER")};Password={Env("PGPASSWORD")}";
    builder.Services.AddDbContext<AppDb>(o => o.UseNpgsql(connection));
  6. Run migrations before each release

    Set a pre-deploy command. It runs before each release, so the schema is ready before the new version takes traffic.

    Pre-deploy command
    ./efbundle
  7. Set a health check and deploy

    Set the health check path to /healthz. Every push to the tracked branch builds and releases; traffic moves to the new version only once it passes, and rolling back re-releases an earlier image without a rebuild.

  8. Add your domain

    Every service starts with a URL on edge.usebeep.sh. When it works, point a CNAME for your domain at Beep; the certificate is issued and renewed for you. Each GitHub pull request also gets its own preview environment, removed when it closes.

.NET tips.

Npgsql wants key=value connection strings, so reference each PG variable instead of DATABASE_URL.

Build an EF Core migrations bundle with dotnet ef migrations bundle and run it as the pre-deploy command.

Map a health endpoint with app.MapHealthChecks("/healthz").

.NET on Beep, answered.

Straight answers. Anything missing, ask us directly.

Do I need a Dockerfile to deploy .NET?

No. Beep builds .NET apps with Railpack. Add a Dockerfile if you want to pin the SDK and runtime images yourself. If your project already has a Dockerfile, you can build with that instead.

Where does the .NET app run?

On the server you connected: Beep Cloud, your own cloud account or any Ubuntu or Debian VPS. Beep bills per server, so databases, workers and previews on the same server add nothing to the plan.

Can I SSH into the server?

No, and that’s deliberate: Beep manages each host end to end so manual changes can’t drift from its setup. To debug, open a shell inside any container from the dashboard, next to its logs and metrics.

Own your infrastructure again.

Plans from $1 a month, billed per server, never per service.

Early access · We’ll set up your workspace

Or talk to us →