How to Set Up a Hostinger VPS for Maximum Performance Guide
By Afonso Macosso · August 17, 2026
Table of contents
- 1. Choose The Right VPS Foundation
- 2. Connect Through Secure SSH
- 3. Update Ubuntu Before Installing Software
- 4. Configure SSH Before Exposing Services
- 5. Open Only The Ports You Need
- 6. Configure Memory And Swap
- 7. Install A Lean Web Stack
- 8. Add Caching At The Right Layer
- 9. Tune PHP And Database Resources
- 10. Configure Storage For Real Workloads
- 11. Put A CDN In Front
- 12. Enable HTTPS And Compression
- 13. Monitor Before You Tune Further
- Frequently Asked Questions
How to Set Up a Hostinger VPS for Maximum Performance starts with choosing a sensible operating system and then configuring the server in the right order.
A VPS gives you considerably more control than shared hosting, but that control also means you are responsible for the server environment, security, updates, services and resource usage.
Hostinger currently offers several Linux distributions and application templates, including Ubuntu 24.04 with options such as Docker, CloudPanel, WordPress and Node.js. (hostinger.com) This guide uses Ubuntu as the practical foundation and focuses on a clean setup, SSH access, firewall rules, memory management, web server configuration, caching, storage, monitoring and backups.
1. Choose The Right VPS Foundation
Performance begins before you connect to the server.
When creating a Hostinger VPS, you first need to decide what operating system and deployment model make sense for the application.
For a general purpose Linux server, Ubuntu is a sensible starting point because it has broad software support, extensive documentation and a large community.
Hostinger currently offers Ubuntu 22.04, Ubuntu 24.04 and Ubuntu 26.04 among its available plain operating system templates.
It also provides application and control panel templates based on Ubuntu 24.04. (hostinger.com)
For a new general purpose VPS, Ubuntu 24.04 is a practical choice when you want a mature environment without immediately moving to the newest available release.
The more important decision is whether you need a plain operating system or a preconfigured application environment.
A plain Ubuntu installation gives you maximum control.
You can install Nginx, Apache, Docker, PHP, Node.js, PostgreSQL, MySQL, Redis and other services yourself.
That is ideal when you are comfortable with Linux administration.
A control panel such as CloudPanel can be more convenient if the server will host several websites and you prefer a graphical interface for domains, SSL certificates, databases and applications.
Hostinger currently offers CloudPanel as an Ubuntu 24.04 VPS template. (hostinger.com)
The important rule is to avoid installing things simply because they are available.
Every additional service consumes memory, creates another configuration layer and increases the number of things that need maintenance.
A clean VPS is usually easier to optimize.
Before ordering or configuring the server, estimate what it will run.
A VPS hosting one small website has very different requirements from a server running WordPress, PostgreSQL, Redis, Docker containers, a Node.js application and background workers at the same time.
Think about:
- Number of websites or applications.
- Expected traffic.
- Database size.
- Memory requirements.
- CPU intensive processes.
- Storage requirements.
- Backup requirements.
- Expected growth.
- Whether containers will be used.
- Whether a control panel is necessary.
Do not buy the largest VPS simply because it has more resources.
Start with a sensible configuration and monitor it.
Hostinger provides VPS resource monitoring through hPanel, including CPU usage and other server metrics. (hostinger.com)
That data should guide your next upgrade.
2. Connect Through Secure SSH
Once the VPS is running, establish administrative access.
Hostinger provides SSH access through both a browser based terminal and traditional SSH clients.
The VPS dashboard displays the server IP and SSH information, and Hostinger's current documentation identifies root as the default SSH user for its VPS setup. (hostinger.com)
From a Linux, macOS or Windows terminal, the connection generally looks like this:
ssh root@YOUR_SERVER_IPReplace the placeholder with the actual IPv4 address of your VPS.
If this is the first connection, SSH may ask you to confirm the server fingerprint.
Review it and confirm when appropriate.
After authentication, you are inside the server.
This is the point where many new VPS owners immediately begin installing applications.
Resist that temptation.
First establish a clean administrative baseline.
Check the operating system:
cat /etc/os-releaseCheck the kernel:
uname -rCheck CPU information:
nprocCheck memory:
free -hCheck storage:
df -hThese commands give you a quick picture of the environment.
You should also confirm the server hostname.
Hostinger provides hostname management through the VPS dashboard, so you can set a meaningful hostname rather than leaving an ambiguous default. (hostinger.com)
For example, a server might use a hostname such as:
web01.example.comA clear naming scheme becomes useful when you operate several servers.
The hostname is not a performance setting.
It is an administration detail.
Good administration matters because performance work becomes increasingly difficult when you cannot easily identify what each machine does.
3. Update Ubuntu Before Installing Software
Do not start installing production software on an outdated operating system.
Update the package information first:
apt updateThen upgrade installed packages:
apt upgrade -yYou can also perform a broader upgrade when appropriate:
apt full-upgrade -yAfter major system updates, check whether a reboot is required.
You can use:
rebootReconnect after the server becomes available.
Keeping the operating system updated helps with security, compatibility and bug fixes.
It can also prevent a situation where you install an application against an old package version and then encounter compatibility problems later.
Do not blindly run every command you find online.
A production VPS should have a reason for each configuration change.
That principle is particularly important when copying commands from tutorials.
Linux commands can be powerful.
A single incorrect command can delete files, modify permissions or stop a service.
Before applying a command, understand what it changes.
It is also useful to keep a record of significant changes.
A simple administrative document can contain:
- Server IP.
- Hostname.
- Operating system.
- Installed applications.
- Open ports.
- Domain names.
- Database services.
- Backup configuration.
- Firewall configuration.
- Important administrative credentials and recovery procedures.
Never store passwords in plain text inside a publicly accessible file.
For SSH access, prefer keys over passwords once the server is ready for key based authentication.
Hostinger's VPS dashboard allows SSH key management directly through hPanel. (hostinger.com)
That provides a cleaner foundation for long term administration.
4. Configure SSH Before Exposing Services
SSH is one of the most important services on a VPS.
It is also one of the first services that should receive attention.
The default SSH port is 22.
Changing the port can reduce automated scanning noise, but it is not a substitute for authentication security.
The stronger improvement is key based authentication.
Generate an SSH key on your local computer if you do not already have one.
For modern systems, an Ed25519 key is a sensible choice:
ssh-keygen -t ed25519Then copy the public key to the server.
The exact process depends on your operating system and SSH setup.
Once key authentication works, test it in a second terminal before disabling password authentication.
That second terminal is important.
Do not disable password login while your only administrative session is open.
If you make a mistake, you can lock yourself out.
Hostinger provides SSH reset functionality in the VPS dashboard, which can help recover access if configuration problems occur. (hostinger.com)
You should also avoid leaving unnecessary SSH access exposed.
If you know that administrative access will come only from specific networks, restricting access through firewall rules can further reduce exposure.
For users with changing home or mobile IP addresses, this may be inconvenient.
A sensible compromise is strong SSH keys, a firewall, current software and careful account management.
Hostinger's managed firewall operates before incoming traffic reaches the VPS and can reduce unnecessary traffic reaching the server itself. (hostinger.com)
Security and performance overlap here.
A server receiving large amounts of unwanted traffic has to process that traffic.
Filtering unnecessary connections before they reach application services is useful.
5. Open Only The Ports You Need
A VPS should not expose every service to the internet.
A typical web server may need:
2280443Port 22 is SSH.
Port 80 is HTTP.
Port 443 is HTTPS.
Your exact configuration may differ.
If you run a database that should be accessible only by applications on the same server, there is usually no reason to expose its database port publicly.
For example, MySQL or PostgreSQL should normally remain accessible only through the local server or a controlled private network unless there is a specific requirement for remote connections.
Hostinger provides a managed VPS firewall through hPanel.
It allows you to create firewall groups and define accepted, rejected or dropped traffic by protocol, port and source. (hostinger.com)
This is useful because filtering can occur before traffic reaches the VPS.
You can also use an operating system firewall such as UFW on Ubuntu.
For a basic web server:
apt install ufw -yAllow SSH:
ufw allow 22/tcpAllow HTTP:ufw allow 80/tcpAllow HTTPS:ufw allow 443/tcpThen enable it:ufw enable
Check the configuration:
ufw statusBe extremely careful here.
If you enable the firewall before allowing SSH, you can lock yourself out.
Hostinger's firewall documentation also explains that the managed firewall and the operating system firewall can work together. (hostinger.com)
There is no need to create complicated firewall rules simply because the server is powerful.
A small rule set that exposes only required services is usually easier to understand and maintain.
6. Configure Memory And Swap
Memory management becomes important when a VPS runs applications that occasionally require more RAM than expected.
Linux can use swap space as a slower extension of memory.
Swap is not a replacement for physical RAM.
It uses storage, so it is significantly slower than actual memory.
Still, having a sensible swap configuration can help prevent certain memory exhaustion situations.
Check whether swap already exists:
swapon --showIf nothing appears, check:
free -hFor a small server, you may choose to create a swap file.
For example:
fallocate -l 2G /swapfileSecure the file:
chmod 600 /swapfileFormat it:
mkswap /swapfileEnable it:
swapon /swapfileThen confirm:
swapon --showTo make the configuration persistent after reboot, add the appropriate entry to /etc/fstab.
Do not assume that more swap equals more performance.
If a server is constantly using swap, the real problem is usually insufficient memory or an application consuming too much memory.
Check memory usage:
free -hThen identify processes:
topOr, if installed:
htopHostinger's VPS resource monitoring tools can also show memory and CPU patterns over time, which is more useful than looking at a single moment. (hostinger.com)
Swap should be treated as protection against occasional memory pressure.
It should not become a permanent substitute for choosing a VPS with enough RAM.
7. Install A Lean Web Stack
A high performance VPS does not need dozens of services.
For a typical PHP website, a lean stack might include Nginx, PHP and a database.
For WordPress, you could use Nginx, PHP FPM and MariaDB or MySQL.
For a Node.js application, you may use Nginx as a reverse proxy in front of the Node process.
For containerized applications, Docker can manage the application services while Nginx or another reverse proxy handles incoming traffic.
Hostinger currently provides Ubuntu 24.04 application templates for Docker, Node.js, WordPress and several deployment tools. (hostinger.com)
The choice should follow the application.
Do not install Apache, Nginx and several control panels simply because you might need them later.
Every active service consumes resources.
Every service also creates another configuration surface.
For a basic Nginx installation:
apt install nginx -yCheck its status:
systemctl status nginxEnable it at startup:
systemctl enable nginxIf you are running PHP:
apt install php-fpm php-mysql -yThe exact PHP package version depends on the Ubuntu release and repositories available on your server.
Check the installed version:
php -vFor a database:apt install mariadb-server -y
Again, install only what your application actually requires.
The leaner the server, the easier it is to understand where CPU, memory and disk activity are coming from.
8. Add Caching At The Right Layer
Caching is one of the most effective performance techniques, but it must be applied intelligently.
There are several types of caching.
Browser caching stores resources on the visitor's device.
CDN caching stores content closer to visitors.
Page caching stores generated pages.
Object caching stores frequently requested application data.
Opcode caching keeps compiled PHP code available in memory.
These layers solve different problems.
For PHP applications, OPcache is particularly useful.
Check whether it is enabled:
php -m | grep OPcacheIf you are running WordPress, application level caching can make an enormous difference.
A page that takes significant CPU and database work to generate does not need to be generated from scratch for every anonymous visitor if its content can safely be cached.
The caching strategy should depend on the application.
A news website may cache pages for a short period.
A documentation site can often cache pages for longer.
An ecommerce checkout should not be treated like a static blog article.
The same applies to authenticated dashboards.
Do not cache personalized content as if it were public content.
For WordPress, a VPS also gives you the ability to choose a stack suited to the CMS rather than relying entirely on generic shared hosting configuration.
Hostinger provides WordPress templates and other application templates that can reduce the amount of manual setup required. (hostinger.com)
The goal is not to add every caching technology available.
The goal is to prevent unnecessary work.
9. Tune PHP And Database Resources
Once the basic stack is working, inspect the application layer.
For PHP applications, PHP FPM controls how PHP worker processes handle requests.
Too few workers can create a queue when traffic increases.
Too many workers can consume excessive memory.
There is no universal number that works for every VPS.
The correct configuration depends on available RAM, average PHP process memory usage and traffic.
If a server has limited memory, setting an extremely high number of PHP workers can make performance worse.
The same principle applies to databases.
A database server needs enough memory for useful caching, but it should not consume practically all available RAM while leaving nothing for the web server and application.
Monitor before tuning.
Use:
free -hThen inspect active processes:
topFor database activity, use the database's own process and status tools.
The important thing is to identify the bottleneck.
If CPU usage is low and memory is comfortable but database queries are slow, adding more PHP workers will not solve the problem.
If CPU usage is constantly high because of PHP processing, database changes may have little effect.
Performance optimization works best when every change addresses a measured limitation.
This is where VPS hosting differs from basic shared hosting.
You have greater control.
That also means you need to use that control responsibly.
10. Configure Storage For Real Workloads
Disk performance matters more than many people expect.
WordPress databases, application logs, Docker layers, package installations and temporary files all generate storage activity.
Hostinger's current VPS offerings use modern storage infrastructure, but application behavior still determines how much storage work your server performs.
Start by checking disk usage:
df -hThen inspect large directories when necessary:
du -sh /var/* 2>/dev/nullLogs deserve attention.
A server that runs for months can accumulate large log files if rotation is not configured properly.
Linux systems commonly use log rotation tools to prevent logs from growing indefinitely.
Check:
systemctl status logrotateDo not simply delete logs because they are large.
Logs are useful when troubleshooting.
Configure appropriate retention instead.
Disk space also affects application behavior.
A database that cannot write because the disk is full can cause much more serious problems than a slow website.
Set a habit of checking disk usage regularly.
Hostinger's VPS monitoring dashboard provides disk usage and other resource information through hPanel. (hostinger.com)
A good performance configuration is one that remains healthy after months of operation.
11. Put A CDN In Front
A CDN can reduce the distance between your users and static content.
This is especially useful when your VPS serves visitors across different countries.
If your main audience is in the United States but the VPS is located in another region, a CDN can help distribute cached assets closer to visitors.
Images, CSS, JavaScript and other static resources are good candidates.
Dynamic requests are different.
A CDN cannot magically make a slow database query fast.
It can reduce the number of requests that reach your VPS, but the origin server still needs to process requests that cannot be cached.
This distinction matters.
If the homepage is cached at the CDN, thousands of visitors may not need to reach the VPS for the same static response.
That reduces origin load.
If every request is personalized, the CDN has fewer opportunities to help.
Hostinger provides CDN functionality for eligible hosting products, while VPS users can also use third party CDN services when appropriate.
The correct setup depends on your application and DNS architecture.
When using a CDN, verify:
- DNS configuration.
- SSL mode.
- Cache rules.
- Origin address.
- HTTP and HTTPS behavior.
- Static asset delivery.
- Cache invalidation.
- Administrative exclusions.
Do not put an administrator dashboard behind an aggressive cache rule.
Do not cache login pages as public content.
Test after activation.
A CDN that is configured incorrectly can cause more problems than it solves.
12. Enable HTTPS And Compression
HTTPS should be standard for public websites.
Hostinger's VPS documentation provides several ways to install SSL certificates, including Let's Encrypt and other certificate configurations. (hostinger.com)
If you use Nginx, Certbot is a common approach for obtaining and renewing Let's Encrypt certificates.
The exact installation depends on the Ubuntu release and Nginx configuration.
After HTTPS is working, verify that HTTP requests redirect correctly to HTTPS.
Then consider response compression.
Modern web servers can compress text based assets such as HTML, CSS, JavaScript and JSON before sending them to the browser.
This reduces the amount of data transferred.
Brotli can be particularly effective for supported clients, while Gzip remains widely supported.
Do not compress files that are already compressed, such as JPEG images or many archive formats.
Compression should target content where it actually reduces transfer size.
Also optimize the files themselves.
A large JavaScript bundle remains large even if compressed.
The best performance usually combines:
- Efficient application code.
- Minimized assets.
- Compression.
- Browser caching.
- CDN delivery.
- Server caching.
No single switch produces maximum performance.
The stack has to work together.
13. Monitor Before You Tune Further
Performance optimization should become a monitoring exercise rather than a collection of one time tweaks.
Hostinger's current VPS monitoring tools provide server usage information through hPanel, including CPU, RAM, disk and other resource metrics.
Hostinger also recommends monitoring CPU usage, RAM consumption, disk space, network traffic, running processes and uptime when assessing VPS performance. (hostinger.com)
Start by establishing normal behavior.
For example, a website might normally use little CPU but experience short spikes during scheduled backups.
That is different from a server that stays near maximum CPU utilization for hours.
Hostinger notes that occasional high CPU usage is normal, while sustained high usage can require investigation. (hostinger.com)
Look for patterns.
If memory steadily increases, investigate a possible memory leak.
If CPU spikes at the same time every night, check scheduled jobs.
If disk usage grows every day, inspect logs and application data.
If network traffic suddenly increases, identify the process or service responsible.
Useful Linux commands include:
uptimefree -hdf -htopss -tulpn
The last command helps identify listening services and ports.
That is useful for both performance and security.
You should know what is listening on your server.
Do not install a monitoring agent simply because an article recommends one.
Hostinger's built in monitoring may be enough for many small VPS deployments.
Add more advanced monitoring when the application becomes important enough to justify it.
Frequently Asked Questions
What is the best operating system for a Hostinger VPS?
Ubuntu is a practical choice for many general purpose VPS deployments because it has broad software support and extensive documentation.
Hostinger currently offers several Ubuntu releases, including Ubuntu 24.04, as well as many other Linux distributions and application templates. (hostinger.com)
For a new general purpose server, Ubuntu 24.04 is a sensible starting point unless your application requires another distribution.
How do I connect to my Hostinger VPS?
You can connect through Hostinger's browser terminal or use an SSH client.
The VPS dashboard provides the server IP and SSH information.
Hostinger also provides a root access command that can be copied from the VPS interface. (hostinger.com)
A typical SSH command is:
ssh root@YOUR_SERVER_IPShould I use root for daily VPS administration?
Root is useful for initial configuration, but long term administration is generally safer with a separate administrative user and controlled privilege escalation.
The important part is to avoid giving every application unnecessary administrative privileges.
If you create a non root administrator, test that account thoroughly before changing your SSH configuration.
Does Hostinger VPS need a firewall?
Yes.
A VPS exposed directly to the internet should have a firewall strategy.
Hostinger provides a managed VPS firewall through hPanel, and Ubuntu also supports local firewall tools such as UFW.
Hostinger explains that its managed firewall filters traffic before it reaches the server. (hostinger.com)
Only expose ports that your applications actually require.
Which ports should I open on a web server?
A basic public web server commonly needs SSH, HTTP and HTTPS.
That generally means ports 22, 80 and 443.
Your application may require additional ports, but those should be opened only when necessary.
Database ports should normally remain private unless remote access is specifically required.
Does adding swap make a VPS faster?
No.
Swap uses storage as a slower memory resource.
It can help prevent certain memory exhaustion situations, but heavy swap usage usually indicates that the VPS needs more RAM or that an application is consuming excessive memory.
Use swap as a safety mechanism rather than a performance replacement for RAM.
How much RAM does a Hostinger VPS need?
There is no universal amount.
A simple website may require relatively little memory, while WordPress with several plugins, databases, caching and background tasks needs more.
Monitor actual usage through hPanel and Linux tools before deciding whether to upgrade.
Is Nginx faster than Apache?
Neither is automatically faster for every application.
Nginx is very efficient at serving static content and acting as a reverse proxy, while Apache offers a mature ecosystem and flexible configuration.
For a new VPS, choose the web server that fits your application and administration skills.
A properly configured server matters more than choosing a web server based on a generic speed claim.
Should I use Docker on a Hostinger VPS?
Docker is useful when you want isolated application environments and reproducible deployments.
Hostinger currently offers a Docker application template for VPS deployments. (hostinger.com)
For a simple website, Docker may introduce unnecessary complexity.
For applications with several services, it can make deployment and maintenance much easier.
Does a CDN make a VPS faster?
A CDN can reduce the amount of traffic reaching the VPS and deliver cached content closer to visitors.
It does not directly make the VPS CPU or database faster.
The greatest benefit usually comes from static resources and cacheable pages.
Should I install a control panel?
Use a control panel when its convenience justifies its resource consumption and additional configuration.
CloudPanel, for example, can simplify management of websites and applications.
Hostinger provides a CloudPanel template based on Ubuntu 24.04. (hostinger.com)
If you are comfortable managing Linux from the terminal, a plain operating system can provide a cleaner environment.
How do I monitor my Hostinger VPS?
Use the Server Usage section in hPanel to review resource usage over different periods.
Hostinger currently provides graphs for VPS resource consumption and recommends monitoring CPU, memory, storage and other indicators. (hostinger.com)
Linux commands such as top, free, df and ss can provide additional detail.
How often should I back up a Hostinger VPS?
That depends on how quickly your data changes and how expensive downtime would be.
Hostinger provides automated backups and manual snapshots for VPS.
Its current documentation says weekly backups are provided by default, with daily backups available depending on the configuration, while snapshots provide temporary point in time captures. (hostinger.com)
For an important production application, maintain a separate backup strategy as well.
What is the difference between a VPS snapshot and a backup?
A snapshot is a point in time capture that is useful before making significant changes.
A backup is intended for ongoing data protection and recovery.
Hostinger currently states that VPS backups can be automated while snapshots are manually created and have different retention behavior. (hostinger.com)
Use both when the application is important enough to justify the additional protection.
Can too many services make a VPS slow?
Yes.
Every running service consumes some combination of CPU, memory, storage or network resources.
A server running unnecessary control panels, databases, monitoring agents and application services can waste resources and make troubleshooting harder.
Install what you need and remove what you do not.
Why is my VPS slow even though CPU usage is low?
Low CPU usage does not mean the server has no bottleneck.
The problem could be memory pressure, slow database queries, disk activity, network latency, application code, external APIs or insufficient PHP workers.
Performance troubleshooting should examine several resources rather than focusing only on CPU.
What is the most important VPS optimization?
There is no single setting that guarantees maximum performance.
The strongest foundation is a properly sized VPS, current software, a lean application stack, effective caching, sensible database configuration, appropriate CDN use and continuous monitoring.
Measure the bottleneck first.
Then change the component responsible for it.
Should I upgrade my Hostinger VPS when traffic increases?
Upgrade when monitoring shows that the current resources are consistently insufficient.
Hostinger provides VPS resource graphs through hPanel, which can help identify sustained CPU, memory or storage pressure. (hostinger.com)
Do not upgrade simply because traffic increased if the existing server still has comfortable resources.
Caching and application optimization may solve the problem without increasing the VPS size.