Hostinger VPS Tutorial 2026: Step-by-Step Guide for Beginners
📺 ดูคลิป · 👁️ 40,799 views · 📅 2025 · ⏱️ 20:27 · 🌐 Websites / WordPress / Hosting / Builders
📌 สรุป
คลิปนี้สอนวิธีตั้งค่า VPS บน Hostinger ตั้งแต่ต้นจนปลาย โดย Caleb จาก Metics Media ครอบคลุมการเลือกแพลน ติดตั้ง Ubuntu, สร้าง user ใหม่ที่ไม่ใช่ root, ตั้ง SSH key สำหรับ login ปลอดภัย, เปิด firewall ด้วย UFW และรู้จัก dashboard ของ Hostinger เหมาะสำหรับมือใหม่ที่ต้องการ host web app หรือ install control panel
🔑 ประเด็น / ขั้นตอนหลัก
- เลือกแพลน VPS — แนะนำ KVM2 (2 vCPU, 8GB RAM, 100GB NVMe, 8TB bandwidth) เลือก 12 หรือ 24 เดือนได้ฟรี domain, ตั้ง server location ตาม latency อัตโนมัติ
- เลือก OS — ติดตั้ง Ubuntu LTS (long-term support) รับ security update หลายปี ไม่ lock-in control panel ใดๆ (ถ้าต้องการ control panel เลือก template ได้เลยตั้งแต่ตอนซื้อ เช่น Dockp หรือ Cloud Panel)
- ตั้ง root password แล้วข้าม malware scanner ทิ้ง เพื่อให้ได้ VPS install ที่สะอาด
- อัปเดตระบบครั้งแรก — รัน
apt update && apt upgrade -yผ่าน browser terminal ของ Hostinger เพื่อให้ได้ patch ล่าสุด
- อัปเดตระบบครั้งแรก — รัน
- สร้าง user ใหม่แทน root — รัน
adduser <username>แล้วเพิ่มเข้า sudo group ด้วยusermod -aG sudo <username>เพื่อลดความเสี่ยงจากการใช้ root ตลอดเวลา
- สร้าง user ใหม่แทน root — รัน
- สร้าง SSH key บนเครื่องตัวเอง — รัน
ssh-keygen -t ed25519 -C "label"แล้ว copy public key (.pub) ไปวางที่~/.ssh/authorized_keysบน VPS
- สร้าง SSH key บนเครื่องตัวเอง — รัน
- ตั้ง permission SSH folder —
chmod 700 ~/.sshและchmod 600 ~/.ssh/authorized_keysเพื่อให้ server ยอมรับ key
- ตั้ง permission SSH folder —
- ทดสอบ SSH connection — รัน
ssh <user>@<VPS-IP>จาก terminal เครื่องตัวเอง แล้ว restart SSH ด้วยsudo systemctl restart sshถ้า connection ถูกตัด
- ทดสอบ SSH connection — รัน
- ตั้ง UFW firewall — allow OpenSSH, port 80/tcp, 443/tcp แล้ว enable firewall เพื่อ block traffic ที่ไม่ได้ระบุทุกอย่าง
- Reboot server และรู้จัก dashboard — ดู CPU/RAM/disk usage, จัดการ snapshot/backup schedule, ใช้ Cody AI assistant ช่วย troubleshoot
🛠️ เครื่องมือ / บริการ / ลิงก์ที่พูดถึง
- Hostinger VPS — hostinger.com (affiliate link ในคำอธิบายวิดีโอ ลด 10% เพิ่ม)
- KVM2 Plan — 2 vCPU, 8GB RAM, 100GB NVMe, 8TB bandwidth
- Ubuntu LTS — free OS, รองรับ security update หลายปี
- UFW (Uncomplicated Firewall) — built-in Linux firewall tool
- Cody AI — AI assistant built-in ใน Hostinger VPS dashboard
- Dockp — control panel สำหรับ Docker container (template พร้อมใน Hostinger)
- Cloud Panel — free control panel สำหรับ host WordPress
- Windows PowerShell / Mac Terminal — สำหรับสร้าง SSH key และ login
- nano — text editor บน Linux สำหรับแก้ไขไฟล์ config
💡 เอาไปใช้ / ข้อสังเกต
- ช่องนี้ใช้ affiliate link Hostinger เป็น monetization หลัก — ทุกวิดีโอ VPS tutorial จะผูกกับ partner link ที่ลด 10% เพิ่ม เป็น conversion hook ชัดเจน
- คลิปนี้ออกแบบมาให้ beginner ทำตามได้ทันที มี document คำสั่งทุกตัวในคำอธิบายวิดีโอ — ช่วยลด friction และเพิ่มโอกาสคนกด affiliate link
- กลยุทธ์ content funnel: คลิปนี้จบด้วยการแนะนำคลิป Docker/web app deployment ต่อ = เพิ่ม watch time และ ecosystem lock-in ให้ channel
- สำหรับผู้การ: VPS Hostinger KVM2 เหมาะทดลอง deploy web app หรือ AI agent เบื้องต้น ราคาประหยัด ตั้งค่าง่าย — ใช้ Ubuntu LTS + UFW + SSH key ตาม tutorial นี้ได้เลย ไม่ต้องพึ่ง root
📄 Transcript เต็ม (English, 3,881 คำ)
Hey, I'm Caleb and today I'll show you step by step how to set up your own VPS using Hostinger. We'll start by choosing a Hostinger VPS plan. Then we'll install the Iuntu operating system and access the server through Hostinger's built-in terminal. After that, I'll walk you through all of the important backend settings so your VPS is secure, configured properly, and ready to start hosting apps or install a control panel. So, what's the first step? First, you'll need to choose a hosting or VPS plan. to get an additional 10% off. Go to the link right here at the bottom of the screen or just scroll down the video description and click on the first link you find there. That's our special hosting or partner link and it'll make sure you're getting the best deal available when you sign up. And once you go to that link, you'll be brought to this page here. I'll start by clicking on claim deal and that's going to scroll us down to the VPS plan options. For this video, I'll be going with the KVM2 plan. That's going to get you two virtual CPU cores, 8 GB of RAM, 100 GB of NVME disc space, and 8 TB of bandwidth. This will be more than enough for deploying web apps and pretty much anything you'd typically run on a VPS. And if you ever need more or less power later, you can always upgrade or downgrade your plan. For now, I'll be going with the KVM2 plan. So here, I'll click on choose plan. And now on this page here, we can start by choosing how long we want our VPS plan to run for. By default, it will be set to 24 months, which will optimize your savings and get you a free domain. But you can also switch this from 24 months to 12 month and 1 month plans as well. At a minimum, I'd recommend going with the 12-month plan. This will still get you plenty of savings and qualify you for the free domain. Scrolling down here, you can choose whether or not you want to turn on daily automatic backups. This is going to back up your VPS data once a day for an additional charge. For this video, I'm just going to leave this turned off. The next thing we'll do is choose our server location. Hostinger will automatically recommend the location with the best latency for you. So, I'm just going to leave this here on the default option. And the last thing we'll do here is choose what we want to actually install onto our VPS. Here you'll see you have three options. You have plain operating systems, operating systems with a control panel, and applications. If you're looking to install a specific software, you'll find it here. And if you want to install an operating system with a control panel on top of it, you can do that here as well using Hostinger's pre-made templates. For example, here, Doc is a great choice if you want a visual dashboard for running Docker containers or deploying web apps. And I actually have a full Dockp VPS tutorial linked in the description if you want to check that out. You can also go with Cloud Panel, which is a solid free option if you mainly want to host WordPress websites or manage your server through a control panel instead of the regular command line. If you already know that you want to start using a control panel right away, these templates are really good shortcuts. But for this video, we're going to be installing a plain operating system. That way, you're not locked into any specific stack. You can decide later on if you want to add a control panel or specific applications on top of your VPS. So, I'm going to go ahead and switch over to Plane OS. And for this video, I'll be going with Ubuntu. Ubuntu is one of the most popular and free server operating systems. So, I'm going to click into it here. I'm going to make sure that I have the LTS version selected here. LTS means long-term support and these versions will get security updates for years, which makes them a very stable choice for your VPS. So, make sure that the latest LTS version is selected here. And with that done, we'll go down and click on confirm. With that selected, I'm going to scroll back up to the top and I'll make sure that the coupon code is applied here. Again, if you use the link in the video description, this should be automatically applied for you here at checkout. With all of that done, now I'm going to go down here and click on continue to move on. Now, on this page here, you'll need to fill out your billing information and your payment information. I'll go ahead and do that real quick, and I'll fast forward to whenever that's complete. I've now filled out both my payment information and my billing information. So, with that done, I'm going to go ahead and click on submit payment to move on. On this page here, just click on get started. And after that, you'll be brought to this page right here. On the right, you'll have the option to create an SSH key, but we'll be doing this a little bit later on the video, so for now, just leave this alone. On the left, you'll have the option to create your root password. This is the password that you'll use to log in to your VPS. So, make sure it's something strong and something that you can remember, and I definitely recommend writing it down. So, here I'll enter my root password. And with that done, I'm going to go down and click on next. Then, here you'll have the option to add in a free malware scanner. Whenever I'm installing a VPS for the first time, even though this option is free and helpful, I like to keep it turned off just to make sure I have a nice clean VPS install. So, with that turned off, I'm going to click on finish setup. And now your VPS is going to be set up for you. This can take a few minutes to complete. So, I'm going to go ahead and fast forward to whenever this is done. And with that done, your VPS is now ready to go. On the right here, you're going to see the SSH access line. And this part right here is your VPS IP address. We're actually going to set up our own connection later with a new user and SSH keys. So, you don't have to worry about this command just yet. And at the bottom here, you'll see your free domain listed. You can claim that now or later on if you want to. For now, I want to go to my VPS dashboard. So, I'll go to the top here and click on manage VPS. And now, here we are in the HostingerVPS dashboard. This is the main hub where you can see your server's details, change your settings, connect domains, and most importantly, it's where you can open up your command terminal to talk directly to your VPS. Now that Ubuntu is installed, the first thing we'll do here is grab our VPS IP address. And you'll see it right here within your dashboard. I'm going to copy this and keep it somewhere safe because we'll use it later when connecting from our own computer. Now, the next thing we'll do is open the built-in browser terminal. So, go to the top right here and click on terminal. Now, after clicking on browser terminal, this will open up a blank command window. If this looks a little intimidating, don't worry. Just follow along and type the commands exactly as you see them. And if you want to, you can check the video description and you'll find a document that has every single command from this video in order so you can just copy and paste the commands in and not even have to worry about typing them out. Now, before we do anything else, we'll start by making sure our server is fully up to date. I'm going to go down here and click in right here. And I'll type this command and press enter or return on the keyboard. I'll type a update. Type two and signs. Then apt upgrade-y then press enter. And this checks for the latest security patches and software updates and installs them automatically. So we're starting from a clean and up-to-date system. You'll see the progress at the bottom. And I'll wait for this to get to 100%. Perfect. Now the updates are done. The next thing we want to take care of is how we're actually logging into our VPS. Right now we're using the root account, which has full unrestricted control over everything on the system. This is powerful, but it's also risky. Even small mistakes can cause problems when you're logged in as root. So to keep things safer and follow best practices, we're going to create a separate user account and use that instead. This will give us a normal day-to-day account while still letting us run admin commands when we need them. So, let's go ahead and get that set up. Now, I'll start by creating a new user. I'm going to call mine username for this tutorial, but you can replace that name with whatever name that you want. So, I'll go down here and I'll type in add user username and press enter on the keyboard. Now, it's going to prompt me to type in a password. Just keep in mind that whenever you type in this password, nothing is going to appear on screen. This is normal. just type it in carefully and press enter and then retype it in whenever it asks. So I'll type in my password here and press enter. Then I'll retype it in again and enter again. After that, you're going to see a few optional fields like entering in your full name. We don't need any of this for our VPS. So I'm just going to press enter throughout all of these to leave them blank. So I'll press enter and enter for the rest of the values here. Here we'll type in Y to confirm that all the information is correct. Then enter again. Now we're going to give this user admin privileges by adding them into the pseudo group. This will let this user run important commands when needed without having to log in as root. To give this new user admin privileges, let's type in user dash A and then a capital G. Then type in pseudo and then username. And again for username at the end. This will be whatever you chose for your username. With that typed in, press enter on the keyboard. Then to make sure everything worked properly, I'm going to type in ID and then username. Press enter. And if everything worked correctly, you should see pseudo appear here. That confirms that everything worked correctly. Now I'm going to switch over to this new account. To do that, I'll type in su dash username. Press enter once again. And now we've switched over to our new account. And from this point on, this will be the main account that we use instead of root. Using a normal user with pseudo access is a much safer way to manage your VPS. You still have full control when you need it, but you're not logged in as the all powerful root user all of the time. Now, with that done, the next step is setting up our SSH keys. Doing this will let you securely log in without typing in your VPS password every single time. And it's much harder for attackers to brute force than a normal password. And we'll actually start this next step on our own computer, not on the VPS browser terminal. Since I'm using a Windows machine, I'll be using Windows PowerShell for this next step. But if you're using a Mac, then you'll simply use the terminal. So since I'm on Windows, I'm going to open up Windows PowerShell. And that's going to look something like this. The first command that I'll enter here will generate a modern SSH key. To do this, type in SSH dash keygen dash T. Then type in ED 2551 9. Then type in dash and a capital C. And this will allow you to add a note so that way you can remember the key later on. So, for example, here I'll type in quote my personal SSH key and then end quote. That way, I'll always be able to tell that this is my personal SSH key that I'm generating for myself. With that done, I'll press enter on my keyboard. Now, here, this is going to show you the file location. I'll leave this as default. I'll do that by just pressing enter on the keyboard again. And here, you can choose if you want to enter a passphrase for your SSH key. Again, I'll just leave this empty and press enter again. Perfect. Now, our SSH key has been generated. You're going to see a bunch of stuff appear here. There's only two things you need to actually focus on, though. The first one is your private key, which is right here. Make sure you never share this with anyone. This is going to stay on your computer only. And the second one that ends inpub, this is your public key. We're going to copy the content within this file here and add it into our VPS. So, next, you'll need to search for this file. You can do that by copying it with Ctrl C. And then I'm going to open up my file explorer. You'll want to click into the top right here and then paste in that public key. Press enter on your keyboard. And that's going to open up the file inside of a text editor. Now, select all of this and we'll copy this once again. And with that done, you can close out of this file. Then I'll close out of my file explorer. And we're also done using Windows PowerShell or the Mac terminal for now. We'll have to come back to it a little bit later. So for now, you can either minimize it or close it out. Now here we're back in our Hostinger VPS browser terminal. Now the first thing we'll want to do here is make sure that we're logged into the new user that we created earlier. To switch over to that user, I'm going to type in su- username. And you'll put whatever username you chose earlier here. Press enter. Then enter your password. And now we're logged into our user account instead of having root access. We're doing this because we want to make sure that we use our user account for SSH login. So that way everything stays nice and secure. Next, we'll need to create a place on the server to store our public key. To do this, I'll type in mkdir-p. You'll then type a tilda and a forward slash period SSH. Press enter. That will make an SSH folder for our user account. Now, inside that folder, we're going to create a file called authorized keys. And then we'll open that in the text editor. To do that, I'll type in nano tilda slash period ssh slauthorized keys. Then press enter again. That's going to open up the nano text editor. And you'll see right now there's nothing actually in here. Here we'll paste in the public key that I copied over from my computer. On my keyboard, I'll press control shiftv. And that's now copied over the public key. Now, this tells the VPS if a connection matches this key to let that computer access the VPS. With the key pasted in, I'm going to save the file by pressing controll and O on my keyboard, pressing enter, then pressing controll and X to close nano. Now, we'll just need to set the correct permissions so the server knows that these files are secure. So, now I'm going to go to the bottom here and type in ch OD 700 tilda slash period ssh. Press enter. Then type in chm o d tildaward slash period ssh slash authorized keys. Press enter on your keyboard again. Now this will lock things down so that way only our user account can access the files. The next thing we'll need to do is test the SSH connection. I'll go ahead and open up Windows PowerShell one more time. And then here I'm going to type in SSH username. Make sure you enter your own custom username here at And then you'll paste in your VPS IP address. You can get this from your hosting or dashboard. Press enter. And then you'll see this message appear here. When you connect to your VPS for the first time, SSH won't recognize the server yet. So you'll see a message here asking if you want to trust this fingerprint. Go ahead and type yes here and then enter. Now, we've added in the fingerprint, but the connection was closed automatically. This means that we'll need to restart SSH back on our browser terminal. So, I'll go ahead and open that up again here. Then, to restart everything here, I'll type in pseudo systemctl restart ssh. Then press enter on your keyboard. It may ask you for your password here. I'll enter my password and enter. Now I'll go back over to Windows PowerShell. And now once again we'll type in SSH username at and then your VPS IP address. Press enter. And now we're successfully logged into our VPS through our local computer. Okay. So now we have everything set up for secure login. We've updated our server, created a new user. It connected our SSH key so we can sign in safely without using passwords. Now the next step is to put a basic firewall in place. This is going to control what traffic is allowed into our VPS and it keeps everything locked down by default. Now let's go ahead and get that set up. I'll start by checking the status of UFW. That stands for uncomplicated firewall. I'll start by typing pseudo UFW status. Then press enter. It may prompt you for your password again. type in mine and press enter. As you can see here, it says status inactive. So that means we need to turn the firewall on. But before we do so, we need to make sure we don't accidentally lock ourselves out. So I'll allow the open SSH rule here, which keeps our SSH access open. So here I'll type in pseudo UFW allow open SSH. Press enter. And the rules for that have been updated here. Next, I'll open ports 80 and 443. These are the standard ports for normal website traffic. They represent HTTP and HTTPS. So later on, if you host a website or install the control panel, everything will work right away without needing to change the firewall again. So I'll type in pseudo UFW allow 80/TCP. Press enter. Then we'll type in pseudo ufw allow443 /tcp. Now we can turn the firewall on. UFW will start enforcing these rules and block everything we haven't explicitly allowed. Let's type in pseudo ufw enable then enter. here. To proceed, you'll type in Y and enter. The firewall is now active and enabled. To check the status of your firewall, you can always just type in pseudo UFW status. Now, we can double check all of the active rules here. As you can see, SSH is allowed, and you'll see ports 80 and 443 allowed as well. With the firewall enabled, only the essential ports are open. SSH for managing the server and HTTP and HTTPS for web traffic. Everything else will stay closed, which gives your VPS a much stronger security baseline. Now, before we move on, I'm going to quickly reboot the server. This just makes sure that all of the updates, settings, and our new firewall rules are fully applied and synced up. To do that, I'll type in pseudo reboot. Once I press enter, the server is going to restart. And once the VPS finishes rebooting, you can log back in the same way we did before using your SSH key. Now with the reboot finished and the server back online, everything we set up so far is now fully applied. At this point, our VPS is secure, stable, and ready to use. So next, let's take a quick look around the HostingerVPS dashboard and go over a few tools that you'll need to know about. The first thing here mainly is the Hostinger VPS dashboard. This is where you can manage everything related to your server. And here you'll notice your system resources usage. You'll see your CPU, your RAM, your disk usage, and then your traffic and bandwidth here as well. If you ever notice your CPU or your RAM staying maxed out over time, that's usually a sign you might need more resources for whatever you're running. Next, on the lefth hand side, let's head over to backups and monitoring. Then click into snapshots and backups. And from here, you can manage your backup schedule. By default, it'll be set to weekly, but again, you can upgrade to daily auto backups if you want to. This will keep all of the information and settings on your VPS secure and backed up consistently. And if you want to create a snapshot, just scroll down and click on create snapshot here. And another helpful tool is Hostinger's Kodi AI assistant. You'll find that in the bottom right. If I click on ask Cody, it's going to open up the AI assistant here. If you ever run into something you're unsure about, like a command, an error message, or a configuration question, you can ask Cody and it will guide you through common VPS tasks and troubleshooting. So, after this video, if you ever run into any issues, this is one of the first places that you should check out. From here, you can also look into installing a control panel for your VPS or installing specific applications like Docker or NAD. And make sure you don't forget to use the first link in the video description to sign up for Hostinger. When you're choosing your VPS plan, using our link will get you an additional 10% off. And if you want to learn how to use Docker and start deploying web apps, make sure you check out the video that's linked on screen right now. It'll guide you through the entire process of deploying a web app step by step. Thank you for watching this video. I really hope it helped you out. And with that said, I'll see you in the next one.