Setting Up a VPS on Ubuntu 22.04: Complete Guide for Beginners
Read - 5 мин.
The article has been read - 488 раз
Updated - 19.08.2025
Published - 19.08.2025

Step-by-step setup of VPS on Ubuntu 22.04 for a website

If you have purchased a VPS - congratulations! Below is an instruction on how to launch a website from scratch on Ubuntu 22.04:

🔧 1. Connect to the server via SSH:

ssh root@your-ip

🔄 2. Update the system:

apt update && apt upgrade -y

📦 3. Install the LAMP stack (Apache, MySQL, PHP):

apt install apache2 mysql-server php libapache2-mod-php -y

🌐 4. Set up the domain:

  • Set up an A-record on your VPS IP
  • Set up a virtual host:

nano /etc/apache2/sites-available/example.uz.conf

🔒 5. Install free SSL:

apt install certbot python3-certbot-apache -y
certbot --apache

✅ Done!

Your site is available via HTTPS and fully functional on your VPS.

Answers to popular questions

How soon can I start using the service?

The user account is opened immediately after the application is submitted.

Immediately after making the payment, you can start using the service immediately.

Author of the article:

user

Editor-in-Chief

Danaev Almaz