← All posts

How to deploy ASP.NET Core to DigitalOcean

Deploying an ASP.NET Core app to a plain Ubuntu droplet on DigitalOcean is well-trodden ground, but it’s a lot of one-time setup and ongoing upkeep for something that should be routine.

What it takes to do by hand

  1. Provision the droplet. Pick a region, a size, an Ubuntu image, and an SSH key.
  2. Harden it. A non-root deploy user, a firewall (ufw), unattended security updates, and something like fail2ban against brute-force SSH attempts.
  3. Install the ASP.NET Core runtime. The version has to match what your project targets, and it has to be kept patched.
  4. Install and configure nginx as a reverse proxy in front of Kestrel, including the WebSocket headers Blazor Server or SignalR need if you use them.
  5. Get a TLS certificate. Certbot with the nginx plugin handles issuance, but renewal has to keep working unattended for the life of the app.
  6. Set up the service. A systemd unit so the app starts on boot and restarts if it crashes.
  7. Build and release. Pull the repo, build, and swap in the new build without downtime — commonly a timestamped release directory and a symlink you repoint.
  8. Wire up a deploy trigger. A GitHub Action that SSHes in and runs your release script, or a webhook your server listens for.
  9. Set environment variables for connection strings and secrets, without putting them in the repo.
  10. Plan for rollback. Keep enough old releases around that a bad deploy is one symlink swap away from being undone.

None of this is hard on its own. It’s the number of moving pieces — and keeping all of them correct on every server you run — that adds up.

What a control plane does instead

DotDeployer runs all ten of those steps for you against a DigitalOcean droplet in your own account: it provisions and hardens the server, installs the runtime your project needs, configures nginx and TLS, and turns a git push into a release with a one-click rollback if it goes wrong. You still own the droplet and pay DigitalOcean directly for it — DotDeployer only automates what happens on top of it.

See Getting started for the ten-minute version.