Hosting VPS and Dedicated Spanish version

Support article

First Steps with Your VPS: Initial Setup

Initial VPS setup guide: SSH access, system updates, basic security, firewall and first domain. To start on the right foot.

Published: 11/07/2026 Updated: 11/07/2026

Introduction

You’ve just hired a VPS and have the access details in your inbox. Now what? The first steps you take with your server are the most important: a well-done initial setup saves you security problems, slowness and headaches later.

In this article you’ll see, in order, everything worth doing right after receiving your VPS. It’s designed for people new to servers, so every step is explained clearly.

At miHosting we offer managed VPS: if you prefer not to worry about technical setup, our technicians handle this entire process for you. If you have a self-managed VPS, this guide is for you.

What you receive when hiring the VPS

When your VPS is provisioned (usually within 5 minutes), you receive the essential details by email:

  • IP address of the server.
  • Root user (the server administrator).
  • Root password.
  • Operating system installed.

[Imagen sugerida: screenshot of the email with the VPS access details]

Keep these details somewhere safe. If you lose access, recovering a self-managed VPS without a recovery console can be complicated.

Step 1: Connect for the first time via SSH

SSH is the method to access your server remotely and securely, as if you had the screen in front of you.

From Windows

Use PowerShell, Command Prompt or a client like PuTTY:

ssh root@your-server-ip

The first time it will ask you to confirm the connection. Type yes and press Enter. Then enter the password.

From Linux or Mac

Open the Terminal and run the same command:

ssh root@your-server-ip

[Imagen sugerida: screenshot of the first SSH connection in the terminal]

The password isn’t shown as you type it. That’s normal on Linux, it doesn’t mean the keyboard isn’t working.

Step 2: Update the operating system

The first thing to do on a new server is update all packages. This way you have the latest security patches.

On Ubuntu or Debian

apt update && apt upgrade -y

On AlmaLinux, Rocky Linux or CentOS

dnf update -y

When finished, reboot the server to apply kernel changes:

reboot

Reconnect via SSH after a minute.

Step 3: Change the root password

Auto-generated passwords can be vulnerable. Change it to a robust one:

passwd

It will ask for the new password twice. Use a long password with uppercase, lowercase, numbers and symbols.

Better yet: use SSH keys instead of a password to connect. It’s much more secure. We’ll cover that later in this guide.

Step 4: Create a user with administrator privileges

Always working as root is dangerous: any mistake can break the server. The recommended approach is to create a normal user with administrator privileges and use root only when necessary.

Create the user

adduser myuser

It will ask for a password and some optional details (you can leave them blank with Enter).

Grant administrator privileges

usermod -aG sudo myuser

Now that user can run administrator commands by putting sudo in front.

Step 5: Protect SSH access

The SSH port (22) is the most attacked on the internet. There are bots trying to guess passwords all day. Let’s add some doors.

Edit the SSH configuration file:

nano /etc/ssh/sshd_config

Find and change these lines:

Port 2222
PermitRootLogin no
PasswordAuthentication no
  • Port: change port 22 to another (for example 2222). This reduces automatic attacks.
  • PermitRootLogin no: prevents logging in directly as root.
  • PasswordAuthentication no: only allows access with an SSH key, not with a password.

⚠️ Before changing PasswordAuthentication to no, make sure you’ve configured your SSH keys. Otherwise you’ll be locked out.

Save (Ctrl+O, Enter) and exit (Ctrl+X). Restart SSH:

systemctl restart ssh

Step 6: Enable the firewall

The firewall controls which connections enter and leave your server. It’s a basic security layer.

On Ubuntu or Debian (ufw)

ufw allow 2222/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

On AlmaLinux or Rocky Linux (firewalld)

firewall-cmd --permanent --add-port=2222/tcp
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

Remember to open the new SSH port (2222 in the example). If not, you’ll be locked out of the server.

Step 7: Configure the time zone

By default, the server may be in UTC time. Change it to your zone so logs make sense:

timedatectl set-timezone Europe/Madrid

For Latin America, for example:

timedatectl set-timezone America/Bogota

Verify with:

timedatectl

Step 8: Install basic tools

Some utilities aren’t installed by default but are very useful:

apt install curl wget git nano htop unzip -y

On AlmaLinux/Rocky:

dnf install curl wget git nano htop unzip -y

Step 9: Add your first domain

For your VPS to serve a website, the most convenient way is to install a control panel or configure a web server (Nginx or Apache). You have two paths:

  • Install a panel like CyberPanel, DirectAdmin or cPanel: gives you a graphical interface to manage domains, email and databases without touching the command line.
  • Configure the web server manually: installing LAMP (Apache + MySQL + PHP) or LEMP (Nginx + MySQL + PHP). It’s more technical but gives you total control.

[Imagen sugerida: diagram of the two options for managing a VPS]

Final checklist

Check these points before considering your VPS ready:

  • Operating system updated.
  • Root password changed.
  • Administrator user created.
  • SSH port changed and root login disabled.
  • SSH keys configured.
  • Firewall enabled.
  • Time zone configured.
  • Basic tools installed.

Useful tips

  • Take a snapshot after the initial setup. This way you have a clean starting point in case something goes wrong.
  • Don’t install everything on day one. Configure the basics and add services as you need them.
  • Write down the new SSH port. If you change it and forget it, you won’t be able to connect.
  • Use SSH keys, not passwords. It’s the most effective security measure.
  • Keep the server updated. Run updates at least once a month.

Common problems

I got locked out of the server after changing the SSH port

You forgot to open the new port in the firewall. If you have a VPS at miHosting, contact support or use the panel’s recovery console to log in and open it.

I can’t connect via SSH

Check that the SSH service is active (systemctl status ssh), that the firewall allows the port, and that the password or key is correct.

The server is slow

Check resource usage with htop. Some service may be consuming CPU or memory. If your VPS falls short, consider upgrading to a higher plan.

I deleted something important

If you have a snapshot, restore from there. If not, contact support to see if a backup is available.

Frequently asked questions

Do I need to know Linux to have a VPS?

If it’s a self-managed VPS, yes, you need basic knowledge. If it’s a managed VPS like miHosting’s, our technicians handle management.

How long does it take for a VPS to be ready?

Usually between 1 and 5 minutes from payment. You’ll receive access details by email.

Can I change the operating system later?

Yes, most providers allow reinstalling the operating system from the panel. At miHosting you can do it or ask support to reinstall it.

Is it mandatory to change the SSH port?

It’s not mandatory, but highly recommended. It drastically reduces automatic attacks.

Do I need a control panel?

It’s not mandatory, but it makes management much easier if you don’t want to use the command line. For a single domain you can manage manually; for several, a panel saves a lot of work.

Your VPS, ready to start

The initial setup of a VPS isn’t complicated if you follow the steps in order: connect via SSH, update the system, create a user, protect access, enable the firewall and adjust the time zone. With this you have a solid and secure foundation.

If you prefer not to handle this technical setup, at miHosting we offer managed VPS where our technicians configure, harden security and maintain your server for you. You can also hire a self-managed VPS if you prefer total control. Open a ticket from your client panel and we’ll advise you on the best option for your project.