Lesson transcript
Taught by Milan Jovanović, from Module 0 of Pragmatic Self-Hosting: Foundations. Lightly edited from the captions.
What you should already know
In this lesson, we're going to go over some of the prerequisites that you will need to successfully complete this course. Of course, you can watch the entire thing without practicing at all, and I'm sure it's going to be useful. But I think the best way to take this course is to build alongside me.
So in this lesson, I want to share what is the basic knowledge that you will need to start, what are the local tools that you're going to need, the accounts that you will need to create, and I'm going to share the source code that we're going to use for the application that we want to deploy.
All this course requires is some basic development experience. We're not going to be coding the backend application, although familiarity with .NET and ASP.NET Core is going to be an advantage. If you can run commands in a terminal, type on a keyboard, edit files, and use Git, and you understand how a web application and its database work, you basically have all of the fundamental knowledge that's needed to complete this course.
And in the upcoming modules and lessons, I'm going to teach you everything else that you're going to need. This includes setting up your first virtual private server and the Docker workflow, installing Dokploy and creating a virtual private network over Tailscale, and then how you can deploy your applications, manage automated backups, and operate your virtual private server.
Tools on your workstation
On your workstation, you're going to need a couple of basic things. In this course, I will be using Windows PowerShell and the respective commands in there. I'm also going to leave commands that you can run on Linux and macOS, and you're going to find these in a lesson near the end of this course that contains all of the additional resources.
On your workstation, you're going to need Git, OpenSSH, a browser, and a code editor. I recommend VS Code. Docker would be excellent to have as you'll be able to run the application locally, although it's not required to complete this course. The same goes for .NET and Node.js if you want to be running the API and the client application locally for your own testing.
If you want to test if you already have everything you need, you can go into the terminal, and run this command, which you can also find as a code snippet under this video. And if all of these resolve to an application that you can run on your system, then you have all of the required tools already installed.
Accounts and services you need
You're also going to need a couple of accounts for some external services that we'll be using and a domain that you can use to deploy your production application. I recommend getting a Hetzner account if you want to build exactly the same thing as I'm doing in this course, although any other server provider is going to work just fine.
You're also going to need a Tailscale account for when we set up our virtual private network, a GitHub account to upload your repository source code, to use GitHub Actions and the GitHub Container Registry. You're going to need a domain so that you can expose your application to the public internet. And then you're going to need any S3-compatible storage for offsite backups.
I will be using Cloudflare R2, but AWS S3 or anything else that's S3-compatible works just fine. If you want to set up an external monitoring tool, you can use UptimeRobot and create a free account there.
What you have to pay for
And essentially all of the tools that I mentioned here have a free plan or a generous free tier. And the only things that you will need to pay for are going to be a VPS, and that's usually on a per-hour basis. So your actual cost might only end up being a couple of cents if you spin up your server when you start the course and delete it when you're done with the course.
And you're also going to need a domain, or you can use an existing domain and deploy this application on a subdomain.
Getting the source code ready
You will also find the source code for TaskFlow, our task management application, right under this video as an additional resource. And at this point, I recommend that you download it, you create a repository on GitHub, and you push the source code on GitHub, which is also going to trigger the GitHub Actions workflow.
And that's going to build your first Docker image and upload it to the GitHub Container Registry. This is going to be needed in a future module. So it's best that you finish this now so that everything is ready for when we need to pull this Docker image from the GitHub Container Registry.
Are you ready to start?
If the following 3 points are true, then you are ready for the upcoming hands-on lessons. So your local commands work. This includes Git and OpenSSH. You've downloaded the source code and you've also created the respective GitHub repo and pushed the code there, which is going to trigger your first GitHub Action. And you are aware of the accounts for the external services that we are going to need for the upcoming modules.
Running the app locally
Now I'm going to do a quick preview of running the TaskFlow application locally using Docker. And here's what it looks like in VS Code. We've got our API application built using .NET and our web application built as a React user interface. There is a Docker Compose file that you can use to run the applications locally, and this is going to automatically spin up the .NET application, which also packages up the React UI as well as the database and Redis.
To start the application locally, you will run Docker Compose, point it to the dev Docker Compose file, and then invoke the up command. This is going to create your Docker network, build any images that might be missing, pull any external images that you may not have on your local system, and then start everything up.
If you open up Docker Desktop, you should see the Compose stack called TaskFlow with the 3 containers inside. And if you head over to localhost on port 8080, you'll be able to see the TaskFlow application, register your user account, or sign in with the default admin account. The local-only credentials are shown on screen in the video.
You can sign in and look at what's inside of the application and just give it a try to understand how all of the pieces fit together.
What comes next
And with this, we are going to wrap up this introductory module. You should have everything you need to be able to follow this course to completion. And in the next module, we're going to discuss if self-hosting is the right choice for you. We're going to compare the costs to the managed alternative, and you're going to gain a better understanding of the responsibilities that you will be taking up if you want to go down the self-hosting route, which I highly recommend, as I'm confident that you will find it fun, enjoyable, and most of all, worth your time.