← Back
Milan Jovanovic August 7, 2026 17m

Self-Host Your .NET App with Dokploy (full guide)

Read full transcript 13 segments
  1. Running your applications in the cloud Running your applications in the cloud can become pretty complicated. You have can become pretty complicated. You have can become pretty complicated. You have to learn all these managed services to learn all these managed services to learn all these managed services which come with a hefty cost attached. which come with a hefty cost attached. which come with a hefty cost attached. But what if there was a simpler But what if there was a simpler But what if there was a simpler alternative? One that requires you to alternative? One that requires you to alternative? One that requires you to only learn a couple of fundamental only learn a couple of fundamental only learn a couple of fundamental skills like Docker, some shell commands, skills like Docker, some shell commands, skills like Docker, some shell commands, and owning a VPS where you can actually and owning a VPS where you can actually and owning a VPS where you can actually deploy your application. Well, that's deploy your application. Well, that's deploy your application. Well, that's exactly what I want to show you in this exactly what I want to show you in this exactly what I want to show you in this video. The first piece of our video. The first piece of our video. The first piece of our self-hosting puzzle is going to be self-hosting puzzle is going to be self-hosting puzzle is going to be Docloy. It's a platform as a service Docloy. It's a platform as a service Docloy. It's a platform as a service lets you easily deploy and manage your lets you easily deploy and manage your lets you easily deploy and manage your application on infrastructure that you application on infrastructure that you application on infrastructure that you own. It's incredibly easy to set up. You own. It's incredibly easy to set up. You own. It's incredibly easy to set up. You just run this one shell command and it's just run this one shell command and it's just run this one shell command and it's going to install Docky. It's going to going to install Docky. It's going to going to install Docky. It's going to add Docker if it doesn't already exist add Docker if it doesn't already exist add Docker if it doesn't already exist and spin everything up so that you can and spin everything up so that you can and spin everything up so that you can access the Dockflow UI and start access the Dockflow UI and start access the Dockflow UI and start managing your services. Now, I already managing your services. Now, I already managing your services. Now, I already mentioned Docloy in a previous video on mentioned Docloy in a previous video on mentioned Docloy in a previous video on this channel, and at the time, I this channel, and at the time, I this channel, and at the time, I promised you a step-by-step walkthrough promised you a step-by-step walkthrough promised you a step-by-step walkthrough of how you can get a net application up of how you can get a net application up of how you can get a net application up and running using Doclo. So, in this and running using Doclo. So, in this and running using Doclo. So, in this video, I'm delivering on that promise.

  2. video, I'm delivering on that promise. video, I'm delivering on that promise. Now, we also need one more thing, and Now, we also need one more thing, and Now, we also need one more thing, and that is an actual VVS where we are going that is an actual VVS where we are going that is an actual VVS where we are going to run Docloy and also our application to run Docloy and also our application to run Docloy and also our application services. And this is where Hostinger, services. And this is where Hostinger, services. And this is where Hostinger, the sponsor of today's video, comes in the sponsor of today's video, comes in the sponsor of today's video, comes in with some amazing offers for long-term with some amazing offers for long-term with some amazing offers for long-term virtual private servers. All of their virtual private servers. All of their virtual private servers. All of their VPSs come with powerful AMD epic VPSs come with powerful AMD epic VPSs come with powerful AMD epic processors and fast NVME SSD storage, processors and fast NVME SSD storage, processors and fast NVME SSD storage, which we are going to use to run Docky which we are going to use to run Docky which we are going to use to run Docky and our full stacknet application. Now, and our full stacknet application. Now, and our full stacknet application. Now, to get started, we have to choose a VPS to get started, we have to choose a VPS to get started, we have to choose a VPS plan. And this is basically going to be plan. And this is basically going to be plan. And this is basically going to be how much compute we want to get out of a how much compute we want to get out of a how much compute we want to get out of a VPS instance. So, the perfect option VPS instance. So, the perfect option VPS instance. So, the perfect option from a price to performance ratio is the from a price to performance ratio is the from a price to performance ratio is the KVM2 offering, which comes with two CPU KVM2 offering, which comes with two CPU KVM2 offering, which comes with two CPU cores and 8 GB of RAM and also 100 GB of cores and 8 GB of RAM and also 100 GB of cores and 8 GB of RAM and also 100 GB of disk space. So, I'm going to choose this disk space. So, I'm going to choose this 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 plan. And the cost for a KVM2 instance comes out to $9.49 a month if you are on comes out to $9.49 a month if you are on comes out to $9.49 a month if you are on a 24 month term. However, since I've a 24 month term. However, since I've a 24 month term. However, since I've partnered with Hostinger, you can also partnered with Hostinger, you can also partnered with Hostinger, you can also enter the coupon code Milan. And once enter the coupon code Milan. And once enter the coupon code Milan. And once you apply it, you're going to get an you apply it, you're going to get an you apply it, you're going to get an additional 10% off. You can also additional 10% off. You can also additional 10% off. You can also configure daily automatic backups of all configure daily automatic backups of all configure daily automatic backups of all of the data on your VPS instance. And we of the data on your VPS instance. And we of the data on your VPS instance. And we can also decide which data center we can also decide which data center we can also decide which data center we want the VPS hosted in. Now, in my case, want the VPS hosted in. Now, in my case, want the VPS hosted in. Now, in my case, I'm going to choose Germany, which gives I'm going to choose Germany, which gives I'm going to choose Germany, which gives me the lowest latency. And then we have me the lowest latency. And then we have me the lowest latency. And then we have to pick an operating system. I will be to pick an operating system. I will be to pick an operating system. I will be using Ubuntu and specifically version using Ubuntu and specifically version using Ubuntu and specifically version 24, which is a long-term release. And a 24, which is a long-term release. And a 24, which is a long-term release. And a couple of other things that we can

  3. couple of other things that we can couple of other things that we can choose here is installing some choose here is installing some choose here is installing some ready-made applications like Doc Ploy or ready-made applications like Doc Ploy or ready-made applications like Doc Ploy or its main competitor Coolify and a bunch its main competitor Coolify and a bunch its main competitor Coolify and a bunch of other cool things that are available of other cool things that are available of other cool things that are available out of the box as well as more than out of the box as well as more than out of the box as well as more than 1,000 additional application that you 1,000 additional application that you 1,000 additional application that you can add to your VPS instance. Now, in can add to your VPS instance. Now, in can add to your VPS instance. Now, in our case, we're just going to stick with our case, we're just going to stick with our case, we're just going to stick with the plain operating system as I want to the plain operating system as I want to the plain operating system as I want to install Docky myself and I'm going to install Docky myself and I'm going to install Docky myself and I'm going to click continue here and wait for my VPS click continue here and wait for my VPS click continue here and wait for my VPS instance to get set up. So while my VPS instance to get set up. So while my VPS instance to get set up. So while my VPS is getting ready, let's look at the is getting ready, let's look at the is getting ready, let's look at the actual application that I want to deploy actual application that I want to deploy actual application that I want to deploy on this VPS. It consists of our React on this VPS. It consists of our React on this VPS. It consists of our React user interface, a net web API, a user interface, a net web API, a user interface, a net web API, a posgress instance, and an all-in-one posgress instance, and an all-in-one posgress instance, and an all-in-one graphana stack available with just this graphana stack available with just this graphana stack available with just this one image. This will take care of logs, one image. This will take care of logs, one image. This will take care of logs, traces, and metrics. Although I will traces, and metrics. Although I will traces, and metrics. Although I will usually run these as separate services usually run these as separate services usually run these as separate services in production, but is great for a demo. in production, but is great for a demo. in production, but is great for a demo. Another thing that's interesting here is Another thing that's interesting here is Another thing that's interesting here is the Docker file for the web application. the Docker file for the web application. the Docker file for the web application. I said that this is a React app. So, how I said that this is a React app. So, how I said that this is a React app. So, how am I serving it from a Docker file? am I serving it from a Docker file? am I serving it from a Docker file? Well, you can use an EngineX proxy as Well, you can use an EngineX proxy as Well, you can use an EngineX proxy as your runtime and configure it to return your runtime and configure it to return your runtime and configure it to return static files for the React application static files for the React application static files for the React application while proxying any requests to our API while proxying any requests to our API while proxying any requests to our API through the engineext config. This is through the engineext config. This is through the engineext config. This is how we are able to package up the React how we are able to package up the React how we are able to package up the React application inside of a Docker file.

  4. application inside of a Docker file. application inside of a Docker file. Although you would usually want to run Although you would usually want to run Although you would usually want to run this as a statically hosted application, this as a statically hosted application, this as a statically hosted application, I think it's interesting for this demo I think it's interesting for this demo I think it's interesting for this demo as it allows me to run everything as it allows me to run everything as it allows me to run everything natively from docker compose and also natively from docker compose and also natively from docker compose and also deploy it as a single stack and only deploy it as a single stack and only deploy it as a single stack and only expose the web application as the only expose the web application as the only expose the web application as the only public component. So here's a highle public component. So here's a highle public component. So here's a highle view of our system which is running on a view of our system which is running on a view of our system which is running on a VPS instance inside of hostinger. We're VPS instance inside of hostinger. We're VPS instance inside of hostinger. We're using a KVM2 instance as it has enough using a KVM2 instance as it has enough using a KVM2 instance as it has enough compute for our requirements and on this compute for our requirements and on this compute for our requirements and on this instance we're going to deploy dock instance we're going to deploy dock instance we're going to deploy dock ploy. Now, doc ploy is going to spin up ploy. Now, doc ploy is going to spin up ploy. Now, doc ploy is going to spin up traffic as a proxy in front of all of traffic as a proxy in front of all of traffic as a proxy in front of all of your services and this is how we are your services and this is how we are your services and this is how we are going to expose them to the outside going to expose them to the outside going to expose them to the outside world. Now, all of our components are world. Now, all of our components are world. Now, all of our components are going to be packaged inside of the going to be packaged inside of the going to be packaged inside of the docloy network. And here we are going to docloy network. And here we are going to docloy network. And here we are going to have our react application, our net API have our react application, our net API have our react application, our net API and our database and observability stack and our database and observability stack and our database and observability stack running while the react application is running while the react application is running while the react application is the only thing that we expose publicly. the only thing that we expose publicly. the only thing that we expose publicly. This is also interesting because it lets This is also interesting because it lets This is also interesting because it lets us keep the back end completely private us keep the back end completely private us keep the back end completely private as the UI and the backend can as the UI and the backend can as the UI and the backend can communicate through the local network communicate through the local network communicate through the local network using engine X as a proxy. Now let me using engine X as a proxy. Now let me using engine X as a proxy. Now let me show you what the application actually show you what the application actually show you what the application actually looks like when we run it locally. I can looks like when we run it locally. I can looks like when we run it locally. I can run it from my terminal by saying docker run it from my terminal by saying docker run it from my terminal by saying docker compose up and build. And this is going compose up and build. And this is going compose up and build. And this is going to first build all of my docker images to first build all of my docker images to first build all of my docker images that I can run as containers. After that I can run as containers. After that I can run as containers. After everything is built, it's going to spin everything is built, it's going to spin everything is built, it's going to spin up the application instance and we can up the application instance and we can up the application instance and we can see our stack is up and running inside see our stack is up and running inside see our stack is up and running inside of Docker Compose. Now the UI is of Docker Compose. Now the UI is of Docker Compose. Now the UI is available on port 4173. And here's what

  5. available on port 4173. And here's what available on port 4173. And here's what the UI looks like. And this is what we the UI looks like. And this is what we the UI looks like. And this is what we actually want to and this is what we actually want to and this is what we actually want to and this is what we actually want to get deployed in actually want to get deployed in actually want to get deployed in production. So you can create an account production. So you can create an account production. So you can create an account or log in with an existing account. In or log in with an existing account. In or log in with an existing account. In here you can see any of your to-do items here you can see any of your to-do items here you can see any of your to-do items like my task to record a video which I'm like my task to record a video which I'm like my task to record a video which I'm going to mark as completed as I'm doing going to mark as completed as I'm doing going to mark as completed as I'm doing this right now. And you can see that this right now. And you can see that this right now. And you can see that this is just a nice simple application this is just a nice simple application this is just a nice simple application powered by React andnet and I want to powered by React andnet and I want to powered by React andnet and I want to get this deployed on our VPS instance. get this deployed on our VPS instance. get this deployed on our VPS instance. So how can we go about this? I'll start So how can we go about this? I'll start So how can we go about this? I'll start by creating an SSH key that we are going by creating an SSH key that we are going by creating an SSH key that we are going to add to our VPS instance and we're to add to our VPS instance and we're to add to our VPS instance and we're going to use this to SSH into our server going to use this to SSH into our server going to use this to SSH into our server instance. So I already ran this command instance. So I already ran this command instance. So I already ran this command but basically you just do SSH key gen but basically you just do SSH key gen but basically you just do SSH key gen specify the type and the name of your specify the type and the name of your specify the type and the name of your key. Then you click enter and this gets key. Then you click enter and this gets key. Then you click enter and this gets created. The next step is adding the created. The next step is adding the created. The next step is adding the public key to our VPS instance. For this public key to our VPS instance. For this public key to our VPS instance. For this I'm going to use another command which I'm going to use another command which I'm going to use another command which is just going to give me the contents of is just going to give me the contents of is just going to give me the contents of the public part of our SSH key and I'm the public part of our SSH key and I'm the public part of our SSH key and I'm going to add this to the clipboard. So going to add this to the clipboard. So going to add this to the clipboard. So let me run this and then let's head over let me run this and then let's head over let me run this and then let's head over to Hostinger and take a look at our VPS.

  6. to Hostinger and take a look at our VPS. to Hostinger and take a look at our VPS. And here's our VPS instance up and And here's our VPS instance up and And here's our VPS instance up and running. You can already see some running. You can already see some running. You can already see some initial metrics from the dashboard which initial metrics from the dashboard which initial metrics from the dashboard which are going to be idle because we don't are going to be idle because we don't are going to be idle because we don't currently have anything running on this currently have anything running on this currently have anything running on this server. Now, what we are interested in server. Now, what we are interested in server. Now, what we are interested in is the IPv4 address, which is what we is the IPv4 address, which is what we is the IPv4 address, which is what we are going to need to SSH into the are going to need to SSH into the are going to need to SSH into the server. And while we're here, I want to server. And while we're here, I want to server. And while we're here, I want to scroll down and head over to the SSH key scroll down and head over to the SSH key scroll down and head over to the SSH key section. Now I already added my SSH key section. Now I already added my SSH key section. Now I already added my SSH key previously but how you would do this is previously but how you would do this is previously but how you would do this is click add SSH key and just copy the click add SSH key and just copy the click add SSH key and just copy the contents of the clipboard which are contents of the clipboard which are contents of the clipboard which are going to contain the public part of the going to contain the public part of the going to contain the public part of the SSH key and also the name and you hit SSH key and also the name and you hit SSH key and also the name and you hit save. And now we are able to SSH into save. And now we are able to SSH into save. And now we are able to SSH into our server using our SSH that we have our server using our SSH that we have our server using our SSH that we have previously generated. So going back to previously generated. So going back to previously generated. So going back to our terminal I'm going to SSH into the our terminal I'm going to SSH into the our terminal I'm going to SSH into the server using the root user and server using the root user and server using the root user and specifying the IP address of our VPS specifying the IP address of our VPS specifying the IP address of our VPS instance. And once I've hit enter, you instance. And once I've hit enter, you instance. And once I've hit enter, you can see that we are now connected to our can see that we are now connected to our can see that we are now connected to our VPS and we can start doing some work. VPS and we can start doing some work. VPS and we can start doing some work. One of the first things that I like to One of the first things that I like to One of the first things that I like to do with a new VPS instance is perform do with a new VPS instance is perform do with a new VPS instance is perform some updates and set up a firewall. So, some updates and set up a firewall. So, some updates and set up a firewall. So, we're going to configure the firewall to we're going to configure the firewall to we're going to configure the firewall to allow SSH access ports 80 and 443D, allow SSH access ports 80 and 443D, allow SSH access ports 80 and 443D, which are HTTP and HTTPS, and also the which are HTTP and HTTPS, and also the which are HTTP and HTTPS, and also the port 3000, which is used by Doc Lloy.

  7. port 3000, which is used by Doc Lloy. port 3000, which is used by Doc Lloy. So, I'm going to hit enter. And this may So, I'm going to hit enter. And this may So, I'm going to hit enter. And this may take some time to complete, but I won't take some time to complete, but I won't take some time to complete, but I won't make you wait and I'll just cut to the make you wait and I'll just cut to the make you wait and I'll just cut to the interesting part. And you can see that interesting part. And you can see that interesting part. And you can see that everything is up and running. Now, the everything is up and running. Now, the everything is up and running. Now, the next part is installing Docky. So, we next part is installing Docky. So, we next part is installing Docky. So, we just run the oneline command from the just run the oneline command from the just run the oneline command from the Docplay website if you recall from the Docplay website if you recall from the Docplay website if you recall from the start of the video. And this is going to start of the video. And this is going to start of the video. And this is going to set up everything that we need. It's set up everything that we need. It's set up everything that we need. It's going to install Docklo, Docker, and get going to install Docklo, Docker, and get going to install Docklo, Docker, and get everything up and running. And once this everything up and running. And once this everything up and running. And once this completes, it's going to set up traffic completes, it's going to set up traffic completes, it's going to set up traffic the Dockflow instance and any other the Dockflow instance and any other the Dockflow instance and any other services it needs. And you'll be able to services it needs. And you'll be able to services it needs. And you'll be able to access Dockflow from your server's IP access Dockflow from your server's IP access Dockflow from your server's IP address on the port 3000. So I'm going address on the port 3000. So I'm going address on the port 3000. So I'm going to copy this and head over into my to copy this and head over into my to copy this and head over into my browser. And you can see that our browser. And you can see that our browser. And you can see that our Docflowy server is up and running. Now a Docflowy server is up and running. Now a Docflowy server is up and running. Now a couple of things you'll notice here is couple of things you'll notice here is couple of things you'll notice here is that our connection is not secure. So we that our connection is not secure. So we that our connection is not secure. So we are running over HTTP. Now, how you are running over HTTP. Now, how you are running over HTTP. Now, how you could solve this before even getting could solve this before even getting could solve this before even getting here is adding your server to a private here is adding your server to a private here is adding your server to a private subnet using something like tail scale subnet using something like tail scale subnet using something like tail scale and then accessing your docloy server and then accessing your docloy server and then accessing your docloy server from that private subnet. That should from that private subnet. That should from that private subnet. That should mitigate a part of the possible security mitigate a part of the possible security mitigate a part of the possible security problems, but it's a little outside of problems, but it's a little outside of problems, but it's a little outside of the scope of this video. I just wanted the scope of this video. I just wanted the scope of this video. I just wanted to mention it and I may cover that in to mention it and I may cover that in to mention it and I may cover that in some future video. Now, we're going to some future video. Now, we're going to some future video. Now, we're going to do here is create our initial user do here is create our initial user do here is create our initial user account. I'll fill in the details and account. I'll fill in the details and account. I'll fill in the details and hit register. And the first thing I'm hit register. And the first thing I'm hit register. And the first thing I'm going to do here is immediately enable going to do here is immediately enable going to do here is immediately enable HTTPS. So, how we're going to do this is HTTPS. So, how we're going to do this is HTTPS. So, how we're going to do this is head over to web server. And here we can head over to web server. And here we can head over to web server. And here we can add a domain for our docloy server. So, add a domain for our docloy server. So, add a domain for our docloy server. So, the next thing we're going to need is an

  8. the next thing we're going to need is an the next thing we're going to need is an actual domain that we can manage. actual domain that we can manage. actual domain that we can manage. Luckily, I've already picked up a domain Luckily, I've already picked up a domain Luckily, I've already picked up a domain on Hostinger. So, I'm going to go into on Hostinger. So, I'm going to go into on Hostinger. So, I'm going to go into it. Luckily, I already picked up a cloud it. Luckily, I already picked up a cloud it. Luckily, I already picked up a cloud domain on Hostinger. So, I'm going to domain on Hostinger. So, I'm going to domain on Hostinger. So, I'm going to head over there and edit the DNS head over there and edit the DNS head over there and edit the DNS records. And what we want to do is add records. And what we want to do is add records. And what we want to do is add an a record pointing to the doc ploy an a record pointing to the doc ploy an a record pointing to the doc ploy subdomain with the IP address of our VPS subdomain with the IP address of our VPS subdomain with the IP address of our VPS instance. I'll set the time to live for instance. I'll set the time to live for instance. I'll set the time to live for this record to 60 seconds. And then this record to 60 seconds. And then this record to 60 seconds. And then let's click add record. So remember that let's click add record. So remember that let's click add record. So remember that our top level domain name is dayark our top level domain name is dayark our top level domain name is dayark todoapp.cloud. And now let's add this to todoapp.cloud. And now let's add this to 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 our docloy instance. So here I want to say docloy.Artodoapp.cloud. Let's add an email to get notified of Let's add an email to get notified of certificate expiry and we want to enable certificate expiry and we want to enable certificate expiry and we want to enable HTTPS and we're going to use let's HTTPS and we're going to use let's HTTPS and we're going to use let's encrypt as the certificate provider. encrypt as the certificate provider. encrypt as the certificate provider. I'll hit save. And now we should be able I'll hit save. And now we should be able I'll hit save. And now we should be able to head over to this address and access to head over to this address and access to head over to this address and access our docloy user interface. And if I head our docloy user interface. And if I head our docloy user interface. And if I head over to dockflarttodoapp.cloud, over to dockflarttodoapp.cloud, over to dockflarttodoapp.cloud, you can see that our connection is you can see that our connection is you can see that our connection is secure and we are using https. So now secure and we are using https. So now secure and we are using https. So now I'm going to log in using my credentials I'm going to log in using my credentials I'm going to log in using my credentials and you can see that we are able to and you can see that we are able to and you can see that we are able to access our doclo instance using https.

  9. access our doclo instance using https. access our doclo instance using https. The next thing I want to do is set up The next thing I want to do is set up The next thing I want to do is set up the DNS record for our actual the DNS record for our actual the DNS record for our actual application instance. So for that I'll application instance. So for that I'll application instance. So for that I'll go back to hostinger. And here I want to go back to hostinger. And here I want to go back to hostinger. And here I want to add another a record. We're going to use add another a record. We're going to use add another a record. We're going to use the ad sign for the root domain and I the ad sign for the root domain and I the ad sign for the root domain and I want to use the same IP address as our want to use the same IP address as our want to use the same IP address as our dolo instance as everything is running dolo instance as everything is running dolo instance as everything is running on the same VPS. So I'll click add on the same VPS. So I'll click add on the same VPS. So I'll click add record and then we can continue with our record and then we can continue with our record and then we can continue with our setup. And the reason we are able to do setup. And the reason we are able to do setup. And the reason we are able to do this is because we have a reverse proxy this is because we have a reverse proxy this is because we have a reverse proxy as the entry point to our doc services as the entry point to our doc services as the entry point to our doc services and it's going to take care of routing and it's going to take care of routing and it's going to take care of routing the correct domain name to the the correct domain name to the the correct domain name to the respective service that we are trying to respective service that we are trying to respective service that we are trying to access. So back in the docflow UI, let's access. So back in the docflow UI, let's access. So back in the docflow UI, let's see how we can actually get our see how we can actually get our see how we can actually get our application deployed. So the way docy application deployed. So the way docy application deployed. So the way docy manages your applications is by grouping manages your applications is by grouping manages your applications is by grouping them into projects where you can run any them into projects where you can run any them into projects where you can run any number of services inside of that one number of services inside of that one number of services inside of that one project. So let's create a project and project. So let's create a project and project. So let's create a project and I'll call this project day mark. So I'll call this project day mark. So I'll call this project day mark. So inside of this project is where we inside of this project is where we inside of this project is where we actually create our services and this actually create our services and this actually create our services and this can be either some application a can be either some application a can be either some application a database or you can choose some of the database or you can choose some of the database or you can choose some of the readymade options but in our case I want readymade options but in our case I want readymade options but in our case I want to run this using docker compose. So to run this using docker compose. So to run this using docker compose. So let's just call this app and it's going let's just call this app and it's going let's just call this app and it's going to assign it an app name of daymark app.

  10. to assign it an app name of daymark app. to assign it an app name of daymark app. And if I go in here, we have an option And if I go in here, we have an option And if I go in here, we have an option to configure how we want to actually to configure how we want to actually to configure how we want to actually deploy this. So right now this is just a deploy this. So right now this is just a deploy this. So right now this is just a placeholder inside of docloy. And for me placeholder inside of docloy. And for me placeholder inside of docloy. And for me personally, I much prefer the compose personally, I much prefer the compose personally, I much prefer the compose approach rather than running all of the approach rather than running all of the approach rather than running all of the services individually as they are much services individually as they are much services individually as they are much easier to manage this way. And the easier to manage this way. And the easier to manage this way. And the easiest way to get this deployed is by easiest way to get this deployed is by easiest way to get this deployed is by connecting it to your GitHub repo. So connecting it to your GitHub repo. So connecting it to your GitHub repo. So I'm going to head over to settings where I'm going to head over to settings where I'm going to head over to settings where I need to configure my GitHub I need to configure my GitHub I need to configure my GitHub connection. So I'll click GitHub and connection. So I'll click GitHub and connection. So I'll click GitHub and this is going to ask me to create a this is going to ask me to create a this is going to ask me to create a GitHub app which is how doclo can GitHub app which is how doclo can GitHub app which is how doclo can connect to my GitHub repo. So let's do connect to my GitHub repo. So let's do connect to my GitHub repo. So let's do that and I'll be prompted to create a that and I'll be prompted to create a that and I'll be prompted to create a GitHub app which I'm going to call GitHub app which I'm going to call GitHub app which I'm going to call docloy dayark app. So let's create it docloy dayark app. So let's create it docloy dayark app. So let's create it and this should redirect us back to our and this should redirect us back to our and this should redirect us back to our docloy UI. Now, there's one small step docloy UI. Now, there's one small step docloy UI. Now, there's one small step that you have to take here, which is to that you have to take here, which is to that you have to take here, which is to actually install the app. So, I'll click actually install the app. So, I'll click actually install the app. So, I'll click that as well. And we're going to be that as well. And we're going to be that as well. And we're going to be prompted to install and authorize this prompted to install and authorize this prompted to install and authorize this application to access our data. Now, application to access our data. Now, application to access our data. Now, this is where I like to restrict it to this is where I like to restrict it to this is where I like to restrict it to only access select repositories. And I'm only access select repositories. And I'm only access select repositories. And I'm only going to allow it access to my only going to allow it access to my only going to allow it access to my Dayark to-do app repo. So, let's go Dayark to-do app repo. So, let's go Dayark to-do app repo. So, let's go ahead and install and authorize access ahead and install and authorize access ahead and install and authorize access for this repo. And now I can go back to for this repo. And now I can go back to for this repo. And now I can go back to my projects access dayark app. And from my projects access dayark app. And from my projects access dayark app. And from here I'm going to select my GitHub app.

  11. here I'm going to select my GitHub app. here I'm going to select my GitHub app. Select the repository that we have Select the repository that we have Select the repository that we have access to. The branch I want to deploy access to. The branch I want to deploy access to. The branch I want to deploy from which is going to be main. And then from which is going to be main. And then from which is going to be main. And then the name of the compose file that we the name of the compose file that we the name of the compose file that we want to use for this deployment. Here want to use for this deployment. Here want to use for this deployment. Here I'm going to use the docker compose I'm going to use the docker compose I'm going to use the docker compose docloy yaml file. And let's hit save docloy yaml file. And let's hit save docloy yaml file. And let's hit save here. Now this only saves our settings. here. Now this only saves our settings. here. Now this only saves our settings. It doesn't actually deploy our It doesn't actually deploy our It doesn't actually deploy our application. We've got a couple of more application. We've got a couple of more application. We've got a couple of more steps before we can get this up and steps before we can get this up and steps before we can get this up and running. Now, I want to first take a running. Now, I want to first take a running. Now, I want to first take a look at this docker compose file. What's look at this docker compose file. What's look at this docker compose file. What's different here is the addition of some different here is the addition of some different here is the addition of some labels and these are specific to the labels and these are specific to the labels and these are specific to the traffic instance that doclo is running traffic instance that doclo is running traffic instance that doclo is running and this just simplifies how we and this just simplifies how we and this just simplifies how we configure the domain for our UI configure the domain for our UI configure the domain for our UI application. So here we are enabling application. So here we are enabling application. So here we are enabling traffic as a proxy. We're telling it to traffic as a proxy. We're telling it to traffic as a proxy. We're telling it to use the docloy network. And then for our use the docloy network. And then for our use the docloy network. And then for our UI application, we are configuring the UI application, we are configuring the UI application, we are configuring the host using an app domain environment host using an app domain environment host using an app domain environment variable. We're telling it to use HTTPS variable. We're telling it to use HTTPS variable. We're telling it to use HTTPS and let's encrypt for the certificate. and let's encrypt for the certificate. and let's encrypt for the certificate. And we're also pointing it to the And we're also pointing it to the And we're also pointing it to the engineext proxy available on port 80. engineext proxy available on port 80. engineext proxy available on port 80. Other than that, the compos file is Other than that, the compos file is Other than that, the compos file is mostly the same. And this is what I will mostly the same. And this is what I will mostly the same. And this is what I will actually be deploying with docloy. Back actually be deploying with docloy. Back actually be deploying with docloy. Back in the doc UI, I also want to set a in the doc UI, I also want to set a in the doc UI, I also want to set a couple of environment variables before couple of environment variables before couple of environment variables before we actually get this deployed. And here we actually get this deployed. And here we actually get this deployed. And here the most important thing is setting up the most important thing is setting up the most important thing is setting up the app domain. Now, you also want to the app domain. Now, you also want to the app domain. Now, you also want to use some strong secrets for the posress use some strong secrets for the posress use some strong secrets for the posress password and the jot secret is used for password and the jot secret is used for password and the jot secret is used for signing the access tokens. I'm just signing the access tokens. I'm just signing the access tokens. I'm just going to leave the placeholders here, going to leave the placeholders here, going to leave the placeholders here, but I trust that you're going to use

  12. but I trust that you're going to use but I trust that you're going to use some strong passwords for this. But I some strong passwords for this. But I some strong passwords for this. But I trust that you're going to use strong trust that you're going to use strong trust that you're going to use strong secrets in production. Finally, let's go secrets in production. Finally, let's go secrets in production. Finally, let's go back to the general tab where we can hit back to the general tab where we can hit back to the general tab where we can hit the deploy button. And this is finally the deploy button. And this is finally the deploy button. And this is finally going to get our application deployed. going to get our application deployed. going to get our application deployed. You can observe the deployment from the You can observe the deployment from the You can observe the deployment from the deployments tab where you're going to deployments tab where you're going to deployments tab where you're going to see a lot of action as our hostinger VPS see a lot of action as our hostinger VPS see a lot of action as our hostinger VPS instance is going to first pull all the instance is going to first pull all the instance is going to first pull all the missing images to our server and then missing images to our server and then missing images to our server and then it's also going to build our docker it's also going to build our docker it's also going to build our docker images to be able to spin them up as images to be able to spin them up as images to be able to spin them up as containers. Now this process may take a containers. Now this process may take a containers. Now this process may take a while so I'm going to speed this up and while so I'm going to speed this up and while so I'm going to speed this up and in the end we should see a success in the end we should see a success in the end we should see a success message show up like this where all of message show up like this where all of message show up like this where all of our container instances are started and our container instances are started and our container instances are started and running. We can also confirm this if we running. We can also confirm this if we running. We can also confirm this if we go to the logs tab and you can see a go to the logs tab and you can see a go to the logs tab and you can see a list of the services that are up in this list of the services that are up in this list of the services that are up in this project where we've got our web UI, our project where we've got our web UI, our project where we've got our web UI, our web API, our observability stack and our web API, our observability stack and our web API, our observability stack and our Postgress instance. And our final test Postgress instance. And our final test Postgress instance. And our final test is going to be trying to access our UI is going to be trying to access our UI is going to be trying to access our UI from the domain that we configured. And from the domain that we configured. And from the domain that we configured. And if I head over to dayark to-doapp.cloud, if I head over to dayark to-doapp.cloud, if I head over to dayark to-doapp.cloud, you can see that our application is you can see that our application is you can see that our application is available. So now I can create an available. So now I can create an available. So now I can create an account. I'll fill in the details, account. I'll fill in the details, account. I'll fill in the details, create my workspace, and we can start create my workspace, and we can start create my workspace, and we can start using it. So, I'm going to create my using it. So, I'm going to create my using it. So, I'm going to create my first task to wrap up this video with a first task to wrap up this video with a first task to wrap up this video with a top priority and a due date. And let's top priority and a due date. And let's top priority and a due date. And let's create this. And you can see that it create this. And you can see that it create this. And you can see that it shows up. Now, if you want to connect to shows up. Now, if you want to connect to shows up. Now, if you want to connect to your other services like your database your other services like your database your other services like your database instance or the observability stack

  13. instance or the observability stack instance or the observability stack where you might be interested in looking where you might be interested in looking where you might be interested in looking at Graphana, you can do so with an SSH at Graphana, you can do so with an SSH at Graphana, you can do so with an SSH tunnel to your VPS instance. This is tunnel to your VPS instance. This is tunnel to your VPS instance. This is also something I'm going to cover in a also something I'm going to cover in a also something I'm going to cover in a future video. And with this, we can wrap future video. And with this, we can wrap future video. And with this, we can wrap it up. We took our Docker Compose file it up. We took our Docker Compose file it up. We took our Docker Compose file and got it deployed on a VPS using and got it deployed on a VPS using and got it deployed on a VPS using Docky. The next step is to automate this Docky. The next step is to automate this Docky. The next step is to automate this and you can do this with a simple web and you can do this with a simple web and you can do this with a simple web hook which Docky supports where you hook which Docky supports where you hook which Docky supports where you create an API key and you can trigger create an API key and you can trigger create an API key and you can trigger this web hook using that API key as this web hook using that API key as this web hook using that API key as authentication from something like authentication from something like authentication from something like GitHub actions. So now you can automate GitHub actions. So now you can automate GitHub actions. So now you can automate your deployment. for example, whenever your deployment. for example, whenever your deployment. for example, whenever you merge a pull request to the main you merge a pull request to the main you merge a pull request to the main branch of your repo. So, I hope you branch of your repo. So, I hope you branch of your repo. So, I hope you enjoyed this video. In the pinned enjoyed this video. In the pinned enjoyed this video. In the pinned comment right below, I'm going to leave comment right below, I'm going to leave comment right below, I'm going to leave a link where you can also get your VPS a link where you can also get your VPS a link where you can also get your VPS instance from Hostinger. And don't instance from Hostinger. And don't instance from Hostinger. And don't forget to use the coupon code Milan to forget to use the coupon code Milan to forget to use the coupon code Milan to get an additional 10% off. Thanks a lot get an additional 10% off. Thanks a lot get an additional 10% off. Thanks a lot for watching and until next time, stay for watching and until next time, stay for watching and until next time, stay awesome.

Summary

This transcript discusses a simpler approach to running applications in the cloud using Docker and a VPS, contrasting it with complex managed services. It highlights Docloy as a platform to deploy and manage applications on owned infrastructure, and mentions Hostinger as a sponsor for VPS hosting. The takeaway is that with fundamental skills and the right tools, self-hosting can be more straightforward and cost-effective.

View original episode ↗