---
title: 'Self-Host Your .NET App with Dokploy (Full Guide)'
source: 'https://youtube.com/watch?v=6E7l2CRGtos'
video_id: '6E7l2CRGtos'
date: 2026-08-08
duration_sec: 1027
---

# Self-Host Your .NET App with Dokploy (Full Guide)

> Source: [Self-Host Your .NET App with Dokploy (Full Guide)](https://youtube.com/watch?v=6E7l2CRGtos)

## Summary

This video is a step-by-step guide to self-hosting a full-stack .NET application on a VPS using Dokploy, a platform-as-a-service that simplifies deployment on your own infrastructure. The presenter demonstrates the entire process, from setting up a Hostinger VPS to deploying a Docker Compose stack with a React frontend, .NET API, PostgreSQL, and Grafana, and finally securing it with HTTPS.

### Key Points

- **Introduction to Self-Hosting with Dokploy** [00:01] — The video introduces Dokploy as a simpler alternative to complex managed services, requiring only Docker, shell commands, and a VPS. It promises a step-by-step walkthrough of deploying a .NET application.
- **Dokploy Setup and Hostinger VPS** [00:28] — Dokploy is installed with a single shell command. The video uses a Hostinger KVM2 VPS (2 CPU cores, 8GB RAM, 100GB disk) for $9.49/month, with a 10% discount using coupon code 'Milan'.
- **Application Architecture** [03:01] — The demo app consists of a React UI, a .NET Web API, a PostgreSQL instance, and an all-in-one Grafana stack for logs, traces, and metrics. The React app is served via an Nginx proxy that also routes API requests.
- **SSH Key Generation and Server Setup** [05:55] — The process begins by generating an SSH key, adding the public key to the VPS via Hostinger's dashboard, and then SSHing into the server. Initial setup includes updating the system and configuring a firewall to allow SSH, HTTP, HTTPS, and port 3000 for Dokploy.
- **Installing Dokploy and Enabling HTTPS** [07:57] — Dokploy is installed via a one-line command. After accessing the UI, the presenter enables HTTPS by adding a domain (e.g., dokploy.dayark-todoapp.cloud) and using Let's Encrypt for certificates.
- **Deploying the Application with Docker Compose** [11:05] — Dokploy groups services into projects. The presenter creates a project, connects it to a GitHub repo via a GitHub App, and configures the Docker Compose file with Traefik labels for routing. Environment variables (like app domain and secrets) are set before deploying.
- **Deployment and Verification** [14:42] — After hitting deploy, Dokploy pulls images, builds containers, and starts the stack. The application is accessible at the configured domain, and the presenter demonstrates creating an account and adding a task.
- **Automating Deployments with Webhooks** [16:23] — Dokploy supports webhooks with API keys, which can be triggered from GitHub Actions to automate deployments on merges to the main branch.

### Conclusion

The video successfully demonstrates how to self-host a full-stack .NET application on a VPS using Dokploy, covering everything from server setup to deployment and automation. It provides a practical, cost-effective alternative to managed cloud services.

## Transcript

can become pretty complicated. You have to learn all these managed services which come with a hefty cost attached. But what if there was a simpler alternative? One that requires you to only learn a couple of fundamental
only learn a couple of fundamental skills like Docker, some shell commands, and owning a VPS where you can actually deploy your application. Well, that's exactly what I want to show you in this video. The first piece of our
self-hosting puzzle is going to be Docloy. It's a platform as a service lets you easily deploy and manage your application on infrastructure that you own. It's incredibly easy to set up. You just run this one shell command and it's
going to install Docky. It's going to add Docker if it doesn't already exist and spin everything up so that you can access the Dockflow UI and start managing your services. Now, I already mentioned Docloy in a previous video on
this channel, and at the time, I promised you a step-by-step walkthrough of how you can get a net application up and running using Doclo. So, in this video, I'm delivering on that promise. Now, we also need one more thing, and
that is an actual VVS where we are going to run Docloy and also our application services. And this is where Hostinger, the sponsor of today's video, comes in the sponsor of today's video, comes in with some amazing offers for long-term
virtual private servers. All of their VPSs come with powerful AMD epic processors and fast NVME SSD storage, which we are going to use to run Docky and our full stacknet application. Now, to get started, we have to choose a VPS
plan. And this is basically going to be how much compute we want to get out of a VPS instance. So, the perfect option from a price to performance ratio is the KVM2 offering, which comes with two CPU cores and 8 GB of RAM and also 100 GB of
disk space. So, I'm going to choose this plan. And the cost for a KVM2 instance plan. And the cost for a KVM2 instance comes out to $9.49 a month if you are on a 24 month term. However, since I've partnered with Hostinger, you can also
enter the coupon code Milan. And once you apply it, you're going to get an additional 10% off. You can also configure daily automatic backups of all of the data on your VPS instance. And we can also decide which data center we
want the VPS hosted in. Now, in my case, I'm going to choose Germany, which gives me the lowest latency. And then we have to pick an operating system. I will be using Ubuntu and specifically version 24, which is a long-term release. And a
choose here is installing some ready-made applications like Doc Ploy or its main competitor Coolify and a bunch of other cool things that are available out of the box as well as more than 1,000 additional application that you
can add to your VPS instance. Now, in our case, we're just going to stick with the plain operating system as I want to install Docky myself and I'm going to click continue here and wait for my VPS instance to get set up. So while my VPS
is getting ready, let's look at the actual application that I want to deploy on this VPS. It consists of our React user interface, a net web API, a
posgress instance, and an all-in-one graphana stack available with just this one image. This will take care of logs, traces, and metrics. Although I will usually run these as separate services in production, but is great for a demo.
Another thing that's interesting here is the Docker file for the web application. I said that this is a React app. So, how am I serving it from a Docker file? Well, you can use an EngineX proxy as your runtime and configure it to return
static files for the React application while proxying any requests to our API through the engineext config. This is how we are able to package up the React Although you would usually want to run this as a statically hosted application,
I think it's interesting for this demo as it allows me to run everything natively from docker compose and also deploy it as a single stack and only expose the web application as the only public component. So here's a highle
view of our system which is running on a VPS instance inside of hostinger. We're using a KVM2 instance as it has enough compute for our requirements and on this instance we're going to deploy dock ploy. Now, doc ploy is going to spin up
traffic as a proxy in front of all of your services and this is how we are going to expose them to the outside world. Now, all of our components are going to be packaged inside of the docloy network. And here we are going to
docloy network. And here we are going to have our react application, our net API and our database and observability stack running while the react application is the only thing that we expose publicly. This is also interesting because it lets
us keep the back end completely private as the UI and the backend can communicate through the local network using engine X as a proxy. Now let me show you what the application actually looks like when we run it locally. I can
run it from my terminal by saying docker compose up and build. And this is going to first build all of my docker images that I can run as containers. After
everything is built, it's going to spin up the application instance and we can see our stack is up and running inside of Docker Compose. Now the UI is available on port 4173. And here's what the UI looks like. And this is what we
actually want to and this is what we actually want to get deployed in production. So you can create an account or log in with an existing account. In here you can see any of your to-do items like my task to record a video which I'm
going to mark as completed as I'm doing this right now. And you can see that this is just a nice simple application powered by React andnet and I want to get this deployed on our VPS instance. So how can we go about this? I'll start
by creating an SSH key that we are going to add to our VPS instance and we're going to use this to SSH into our server instance. So I already ran this command but basically you just do SSH key gen specify the type and the name of your
key. Then you click enter and this gets created. The next step is adding the public key to our VPS instance. For this I'm going to use another command which is just going to give me the contents of the public part of our SSH key and I'm
going to add this to the clipboard. So let me run this and then let's head over to Hostinger and take a look at our VPS. And here's our VPS instance up and running. You can already see some initial metrics from the dashboard which
are going to be idle because we don't currently have anything running on this server. Now, what we are interested in is the IPv4 address, which is what we are going to need to SSH into the server. And while we're here, I want to
scroll down and head over to the SSH key section. Now I already added my SSH key previously but how you would do this is click add SSH key and just copy the contents of the clipboard which are going to contain the public part of the
SSH key and also the name and you hit save. And now we are able to SSH into our server using our SSH that we have previously generated. So going back to our terminal I'm going to SSH into the server using the root user and
specifying the IP address of our VPS instance. And once I've hit enter, you can see that we are now connected to our VPS and we can start doing some work. One of the first things that I like to do with a new VPS instance is perform
some updates and set up a firewall. So, we're going to configure the firewall to we're going to configure the firewall to allow SSH access ports 80 and 443D, which are HTTP and HTTPS, and also the port 3000, which is used by Doc Lloy.
So, I'm going to hit enter. And this may take some time to complete, but I won't make you wait and I'll just cut to the interesting part. And you can see that everything is up and running. Now, the next part is installing Docky. So, we
just run the oneline command from the Docplay website if you recall from the set up everything that we need. It's going to install Docklo, Docker, and get everything up and running. And once this completes, it's going to set up traffic
the Dockflow instance and any other services it needs. And you'll be able to access Dockflow from your server's IP address on the port 3000. So I'm going to copy this and head over into my browser. And you can see that our
Docflowy server is up and running. Now a couple of things you'll notice here is that our connection is not secure. So we are running over HTTP. Now, how you could solve this before even getting here is adding your server to a private
subnet using something like tail scale and then accessing your docloy server from that private subnet. That should mitigate a part of the possible security the scope of this video. I just wanted to mention it and I may cover that in
some future video. Now, we're going to do here is create our initial user hit register. And the first thing I'm going to do here is immediately enable HTTPS. So, how we're going to do this is
head over to web server. And here we can add a domain for our docloy server. So, the next thing we're going to need is an actual domain that we can manage. Luckily, I've already picked up a domain on Hostinger. So, I'm going to go into
it. Luckily, I already picked up a cloud domain on Hostinger. So, I'm going to head over there and edit the DNS records. And what we want to do is add an a record pointing to the doc ploy subdomain with the IP address of our VPS
instance. I'll set the time to live for this record to 60 seconds. And then let's click add record. So remember that our top level domain name is dayark todoapp.cloud. And now let's add this to our docloy instance. So here I want to
our docloy instance. So here I want to say docloy.Artodoapp.cloud. certificate expiry and we want to enable HTTPS and we're going to use let's encrypt as the certificate provider. I'll hit save. And now we should be able
to head over to this address and access our docloy user interface. And if I head over to dockflarttodoapp.cloud, you can see that our connection is secure and we are using https. So now I'm going to log in using my credentials
and you can see that we are able to access our doclo instance using https. The next thing I want to do is set up the DNS record for our actual application instance. So for that I'll go back to hostinger. And here I want to
add another a record. We're going to use the ad sign for the root domain and I want to use the same IP address as our dolo instance as everything is running on the same VPS. So I'll click add record and then we can continue with our
setup. And the reason we are able to do this is because we have a reverse proxy as the entry point to our doc services and it's going to take care of routing the correct domain name to the respective service that we are trying to
access. So back in the docflow UI, let's see how we can actually get our application deployed. So the way docy manages your applications is by grouping them into projects where you can run any number of services inside of that one
project. So let's create a project and I'll call this project day mark. So inside of this project is where we actually create our services and this can be either some application a database or you can choose some of the
readymade options but in our case I want to run this using docker compose. So let's just call this app and it's going to assign it an app name of daymark app. And if I go in here, we have an option to configure how we want to actually
deploy this. So right now this is just a placeholder inside of docloy. And for me personally, I much prefer the compose approach rather than running all of the services individually as they are much easier to manage this way. And the
easiest way to get this deployed is by connecting it to your GitHub repo. So I'm going to head over to settings where I need to configure my GitHub connection. So I'll click GitHub and this is going to ask me to create a
GitHub app which is how doclo can connect to my GitHub repo. So let's do that and I'll be prompted to create a GitHub app which I'm going to call docloy dayark app. So let's create it and this should redirect us back to our
docloy UI. Now, there's one small step that you have to take here, which is to actually install the app. So, I'll click that as well. And we're going to be prompted to install and authorize this application to access our data. Now,
this is where I like to restrict it to only access select repositories. And I'm only going to allow it access to my Dayark to-do app repo. So, let's go ahead and install and authorize access for this repo. And now I can go back to
my projects access dayark app. And from here I'm going to select my GitHub app. Select the repository that we have access to. The branch I want to deploy from which is going to be main. And then the name of the compose file that we
I'm going to use the docker compose docloy yaml file. And let's hit save here. Now this only saves our settings. It doesn't actually deploy our steps before we can get this up and running. Now, I want to first take a
look at this docker compose file. What's different here is the addition of some labels and these are specific to the traffic instance that doclo is running and this just simplifies how we configure the domain for our UI
application. So here we are enabling traffic as a proxy. We're telling it to use the docloy network. And then for our UI application, we are configuring the host using an app domain environment variable. We're telling it to use HTTPS
and let's encrypt for the certificate. And we're also pointing it to the engineext proxy available on port 80. Other than that, the compos file is mostly the same. And this is what I will actually be deploying with docloy. Back
actually be deploying with docloy. Back in the doc UI, I also want to set a couple of environment variables before we actually get this deployed. And here the most important thing is setting up the app domain. Now, you also want to
use some strong secrets for the posress password and the jot secret is used for going to leave the placeholders here, but I trust that you're going to use some strong passwords for this. But I trust that you're going to use strong
secrets in production. Finally, let's go back to the general tab where we can hit the deploy button. And this is finally going to get our application deployed. You can observe the deployment from the deployments tab where you're going to
see a lot of action as our hostinger VPS instance is going to first pull all the missing images to our server and then it's also going to build our docker images to be able to spin them up as containers. Now this process may take a
while so I'm going to speed this up and in the end we should see a success message show up like this where all of our container instances are started and running. We can also confirm this if we go to the logs tab and you can see a
list of the services that are up in this project where we've got our web UI, our web API, our observability stack and our Postgress instance. And our final test is going to be trying to access our UI from the domain that we configured. And
if I head over to dayark to-doapp.cloud, you can see that our application is available. So now I can create an account. I'll fill in the details, create my workspace, and we can start using it. So, I'm going to create my
first task to wrap up this video with a top priority and a due date. And let's create this. And you can see that it shows up. Now, if you want to connect to your other services like your database instance or the observability stack
where you might be interested in looking at Graphana, you can do so with an SSH tunnel to your VPS instance. This is also something I'm going to cover in a future video. And with this, we can wrap it up. We took our Docker Compose file
and got it deployed on a VPS using Docky. The next step is to automate this and you can do this with a simple web hook which Docky supports where you create an API key and you can trigger this web hook using that API key as
authentication from something like GitHub actions. So now you can automate your deployment. for example, whenever you merge a pull request to the main branch of your repo. So, I hope you enjoyed this video. In the pinned
comment right below, I'm going to leave a link where you can also get your VPS instance from Hostinger. And don't forget to use the coupon code Milan to get an additional 10% off. Thanks a lot for watching and until next time, stay
for watching and until next time, stay awesome.
