You can put a website online on an Ubuntu Linux VPS on your own, even without being a sysadmin. You need the server IP, the access password and a domain. Following the right order (update, secure, install, publish and enable HTTPS), the process usually takes a few hours, much of it spent waiting for DNS propagation.
If you have already ordered the server and found yourself staring at a black screen wondering "now what?", this guide is for you. We will go from the first login to the final checklist.
Ubuntu Linux VPS: what you need before you start
Before opening the terminal, gather these items:
- Server IP and root user password, sent after you sign up.
- A registered domain, with access to its DNS panel.
- An SSH client: the terminal on Linux and macOS, PowerShell on Windows, or programs like PuTTY.
- Your website files, or the plan to install WordPress or another system.
If you are still getting familiar with the concept, read what a VPS is and how it works first. A VPS is a virtual machine that is yours alone, with root access. That gives you freedom, but also responsibility: security and updates become your job.
The plan for what we will do on a Linux VPS is simple: keep the system updated, close the ports that do not need to be open, install the web stack and publish.
Choose the Ubuntu version and plan
Prefer an Ubuntu LTS (long-term support) release. It usually receives security fixes for a long period and is one of the most documented, which helps a lot when you need to search for an error.
For a simple website or blog, an entry-level plan is usually enough to start. Stores, multiple sites or larger databases need more memory and CPU. If you choose wrong, it is not the end of the world: you can reinstall and switch the system version at no cost. Explore the Ubuntu VPS options and see what fits your project.
Step 1: Log in to the server and update the system
In the terminal, connect via SSH using the server IP:
ssh root@SEU_IP
On the first connection, the system asks whether you trust the host. Type yes and enter the password. Once inside, update everything:
apt update && apt upgrade -y
apt update refreshes the package list and apt upgrade installs the new versions. If a reboot notice appears, run reboot and reconnect after a minute. This is the first habit of anyone who takes good care of a server: never install anything on an outdated system.
Step 2: Create a user and secure access
Working as root all the time is risky: one wrong command and the damage is total. Create a regular user with administrator permission:
adduser meuusuario
usermod -aG sudo meuusuario
Use SSH keys
On your computer, generate a key pair with ssh-keygen and send the public key to the server:
ssh-copy-id meuusuario@SEU_IP
Test the login with the new user before closing the current session. Once it works, edit /etc/ssh/sshd_config and set:
PermitRootLogin noPasswordAuthentication no(only after confirming the key works)
Restart the service with sudo systemctl restart ssh.
Enable the UFW firewall
Allow only what is necessary, then turn on the firewall:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
Allow SSH before running enable, otherwise you will lock yourself out of the server. If that happens, our support team can help, but it is a scare that is easy to avoid.
Step 3: Install the web server and PHP
Now the stack that serves the site. You can choose between Nginx and Apache; both work well. In this example, we use Nginx:
sudo apt install nginx -y
sudo apt install php-fpm php-mysql mariadb-server -y
This line installs PHP, the database connector and MariaDB. Then run sudo mysql_secure_installation to set a strong password and remove insecure sample settings.
To test, open SEU_IP in your browser. The Nginx welcome page shows that the web server is responding. If it does not open, check that ports 80 and 443 are allowed in UFW.
Control panel or manual installation: which path to take?
The manual installation we are doing is lightweight and teaches how everything works. A control panel, on the other hand, makes it easier to create several sites, email accounts and databases with a few clicks. See the comparison:
| Criterion | Manual installation | Control panel |
|---|---|---|
| Resource usage | Lower | Higher |
| Learning curve | Requires terminal | Visual interface |
| Multiple sites | Time-consuming | Practical |
| Technical learning | High | Lower |
For one or two sites and for learning, manual installation is great. To host many clients, the panel saves time. And if you just want your website online without managing a server, website hosting with cPanel is an alternative: the environment comes ready and system maintenance is not your responsibility.
Step 4: Publish the site and point your domain
Create the site folder and set the correct permissions:
sudo mkdir -p /var/www/meusite.com.br
sudo chown -R $USER:www-data /var/www/meusite.com.br
Then create the file /etc/nginx/sites-available/meusite.com.br with the virtual host, specifying the domain, the root folder and PHP-FPM. Enable it with a link in sites-enabled, test with sudo nginx -t and reload with sudo systemctl reload nginx.
Point your DNS
In your domain panel, create an A record pointing to the VPS IP (and another one for www). Propagation can take from a few minutes to a few hours. In the meantime, upload the files via SFTP or install your system in the folder you created.
Step 5: Enable HTTPS with SSL
Without HTTPS, the browser may show a "not secure" warning. Certbot issues free certificates from Let's Encrypt:
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d meusite.com.br -d meusite.com.br
DNS must already point to the server, otherwise validation will fail. Choose the option to redirect HTTP to HTTPS. To check automatic renewal, run:
sudo certbot renew --dry-run
If the test passes without errors, the certificate will renew on its own.
Best practices after going live
A published site does not mean the work is finished. Set up this routine:
- Updates: run
apt update && apt upgraderegularly and consider automatic security updates. - Backups: copy files and the database off the server and test restoring them for real.
- Monitoring: track CPU, memory and disk with
htopanddf -h. A server that runs out of disk space or memory takes the site down. - Access: review users and keys from time to time.
And when you get stuck, do not struggle alone: our 24/7 support team, available in English and Portuguese, is there for this. Describe what you did and the error message, and the reply usually comes faster.
Final checklist: is your Ubuntu VPS ready?
Before you consider the server finished, check:
| Item | How to verify | Done? |
|---|---|---|
| System updated | apt list --upgradable shows no pending updates |
☐ |
| User with sudo | Login and sudo working |
☐ |
| Root login disabled | Attempt to ssh root@IP is refused |
☐ |
| Firewall active | sudo ufw status shows only essential ports, such as 22, 80 and 443 |
☐ |
| Site responding | Domain opens in the browser | ☐ |
| HTTPS active | Padlock and redirect working | ☐ |
| SSL renewal | certbot renew --dry-run runs without errors |
☐ |
| Backup tested | Restore completed at least once | ☐ |
With everything checked off, your first step is done and the server is ready to grow. If your audience is in Brazil, consider VPS Brasil, with a datacenter in the country and low ping. Explore the VPS options on the HostMF website and get your project online. 🚀