How to Host Multiple Websites on a VPS

A VPS (Virtual Private Server) gives you full control of your hosting environment, making it possible to run more than one website on the same server. This is a cost-effective and efficient solution for developers, freelancers, and businesses managing multiple projects.

In this tutorial, we’ll walk you through the steps to host multiple websites on a single VPS.


✅ Prerequisites

  • A VPS with root access (you can get one from Hosteons VPS Plans)
  • A domain name for each website you want to host
  • Basic knowledge of Linux commands

🔹 Step 1: Update Your Server

Keep your VPS up to date with the latest security patches.

apt update && apt upgrade -y   # For Ubuntu/Debian  
yum update -y                  # For CentOS/AlmaLinux  

🔹 Step 2: Install a Web Server

Choose between Apache or Nginx.

For Apache:

apt install apache2 -y   # Ubuntu/Debian  
yum install httpd -y     # CentOS/AlmaLinux  

For Nginx:

apt install nginx -y  
yum install nginx -y  

🔹 Step 3: Set Up Directories for Each Website

Create separate folders for your websites. Example:

mkdir -p /var/www/site1.com/public_html  
mkdir -p /var/www/site2.com/public_html  

Assign permissions:

chown -R www-data:www-data /var/www/*  
chmod -R 755 /var/www/*  

🔹 Step 4: Configure Virtual Hosts

For Apache, create a new config file for each domain:

nano /etc/apache2/sites-available/site1.com.conf

Add:

<VirtualHost *:80>
    ServerName site1.com
    DocumentRoot /var/www/site1.com/public_html
</VirtualHost>

Enable the site:

a2ensite site1.com.conf
systemctl reload apache2

For Nginx, edit the server block:

nano /etc/nginx/sites-available/site1.com

Add:

server {
    listen 80;
    server_name site1.com;
    root /var/www/site1.com/public_html;
}

Enable it:

ln -s /etc/nginx/sites-available/site1.com /etc/nginx/sites-enabled/
systemctl reload nginx

Repeat for each domain.


🔹 Step 5: Update DNS Records

Point each domain’s A record to your VPS IP address in your domain registrar’s DNS settings.


🔹 Step 6: Enable SSL with Let’s Encrypt

Install Certbot:

apt install certbot python3-certbot-apache -y   # Apache  
apt install certbot python3-certbot-nginx -y    # Nginx  

Issue an SSL certificate:

certbot --apache -d site1.com -d www.site1.com  
certbot --nginx -d site2.com -d www.site2.com  

🔹 Step 7: Test Your Setup

Visit your domains in a browser to confirm they are loading correctly and secured with HTTPS.


✅ Conclusion

With a VPS from Hosteons, you can host multiple websites easily by setting up virtual hosts or server blocks, configuring DNS, and enabling SSL. This lets you manage multiple projects on a single server while saving costs and maintaining flexibility.

👉 Get started with a VPS today: https://hosteons.com

How to Protect Your VPS from Hackers in 2025

Virtual Private Server (VPS) gives you power, control, and flexibility for hosting your websites, apps, or projects. But with great control comes great responsibility — and in 2025, cyberattacks are more sophisticated than ever. To keep your VPS safe, you need to apply strong security measures right after deployment and maintain them regularly.

At Hosteons, we encourage all VPS users to take security seriously. Here’s how to protect your VPS from hackers in 2025.


🔑 1. Use Strong Authentication

  • Change the default SSH port from 22 to something less predictable.
  • Disable password-based logins and switch to SSH key authentication.
  • Use strong, unique passwords for all accounts if passwords are unavoidable.

🔒 2. Keep Software Updated

Hackers often exploit outdated software. Run regular updates on your VPS:

apt update && apt upgrade -y   # Ubuntu/Debian  
yum update -y                  # CentOS/AlmaLinux  

Enable automatic security updates where possible.


🛡 3. Configure a Firewall

Set up firewalls like UFW (Uncomplicated Firewall) or CSF to allow only necessary traffic and block everything else. Combine it with Fail2Ban to automatically block suspicious IPs.


🚨 4. Monitor and Audit Logs

Use tools like LogwatchGoAccess, or external monitoring systems to watch login attempts, unusual traffic, and system resource spikes. Early detection helps prevent breaches.


👤 5. Limit Root Access

  • Create a separate user with sudo privileges.
  • Disable direct root login via SSH.
  • Use role-based access if multiple people manage the server.

🔐 6. Secure Applications and Databases

  • Keep web apps, CMS platforms (like WordPress), and plugins up to date.
  • Restrict database access to localhost unless remote access is absolutely required.
  • Use strong credentials for MySQL/MariaDB and any control panels.

📦 7. Enable Regular Backups

Even with the best defenses, no system is 100% secure. Automated backups ensure you can recover quickly in case of a hack, data corruption, or accidental deletion.


🌐 8. Consider a WAF or DDoS Protection

Adding a Web Application Firewall (WAF) or enabling DDoS mitigation can stop malicious traffic before it reaches your VPS. Cloudflare and other providers offer affordable protection options.


🚀 Why Choose Hosteons for a Secure VPS?

At Hosteons, we provide VPS hosting with:

  • Full root access so you can configure security your way
  • 10Gbps network ports for reliable performance
  • No-KYC signups for privacy-conscious users
  • Global locations in the US and EU for low-latency access

👉 Explore our VPS & VDS plans here:


✅ Conclusion

Hackers are always looking for new ways to exploit vulnerable servers, but by following these security steps, you can significantly reduce risks. In 2025, protecting your VPS means combining basic hardening techniques, continuous monitoring, and proactive backups.

With the right precautions, your VPS will remain secure, reliable, and hacker-resistant.

How to Set Up a VPN on Your VPS for Private Browsing

In today’s digital age, online privacy is more important than ever. A Virtual Private Network (VPN) is one of the most effective ways to secure your internet traffic and protect your identity. While there are many commercial VPN services available, setting up your own VPN on a VPS (Virtual Private Server) gives you more control, privacy, and flexibility.

At Hosteons, our VPS plans are perfect for hosting your own VPN — whether for personal browsing, securing public Wi-Fi, or bypassing restrictions.


🔑 Why Use a VPS for Your VPN?

  • Full Control: Unlike third-party VPNs, you decide how your server is configured.
  • Privacy: No third-party logs — your data stays yours.
  • Global Access: Host your VPN in a location of your choice for better latency and access.
  • Cost-Effective: A VPS with dedicated resources can double as both a VPN and hosting for other projects.

🛠 How to Set Up a VPN on Your VPS

Here’s a step-by-step guide to setting up a VPN using OpenVPN or WireGuard (two of the most popular VPN protocols).

1. Deploy Your VPS

Choose a VPS plan from Hosteons. Select a location near your users for the best speed.

👉 Plans here:

2. Install Required Packages

For OpenVPN on Ubuntu/Debian:

apt update && apt install openvpn easy-rsa -y

For WireGuard:

apt update && apt install wireguard -y

3. Configure the VPN

  • Generate server and client keys.
  • Set up server configuration files.
  • Add firewall rules to allow VPN traffic.

4. Start the VPN Service

Enable and start the VPN service:

systemctl enable openvpn@server  
systemctl start openvpn@server  

For WireGuard:

systemctl enable wg-quick@wg0  
systemctl start wg-quick@wg0  

5. Connect Your Devices

  • Export client configuration files.
  • Import them into your devices (Windows, macOS, Linux, iOS, Android).
  • Start browsing securely!

📌 Best Practices for VPS VPN Setup

  • Use Strong Encryption: Stick to modern protocols like WireGuard.
  • Keep Software Updated: Regularly update your VPS OS and VPN software.
  • Restrict Access: Limit access to trusted devices only.
  • Monitor Logs: Keep an eye on server logs for unauthorized attempts.

🚀 Why Choose Hosteons VPS for VPN Hosting?

  • Full Root Access for custom VPN setups
  • 10Gbps Ports for fast browsing and streaming
  • Global Locations including the US and Europe
  • No-KYC Signups for privacy-conscious users

✅ Conclusion

Setting up a VPN on your VPS is a powerful way to take control of your online privacy. With Hosteons VPS hosting, you can deploy a secure, fast, and cost-effective VPN server in minutes and browse the internet without limits.

How to Automate Backups for Your VPS Hosting

When running a VPS, one of the most important tasks you can’t afford to ignore is backups. Hardware failures, software errors, or even accidental deletions can happen at any time. Without a reliable backup strategy, you risk losing valuable data and business continuity.

The good news is that you don’t have to manage backups manually. By automating them, you can ensure your VPS data is always safe and recoverable with minimal effort.


🔑 Why Automated Backups Are Essential

  • Peace of Mind – Your files and databases are saved automatically on a regular schedule.
  • Disaster Recovery – Quickly restore your VPS in case of crashes, hacks, or accidental deletions.
  • Save Time & Effort – No need to remember to back up your data manually.
  • Business Continuity – Ensures your website or app keeps running smoothly, even after a mishap.

🛠 Methods to Automate Backups

1. Control Panel Backup Tools

If you’re using a hosting control panel like DirectAdmin or cPanel, you can configure scheduled backups of files, databases, and emails. These can be stored locally or sent to remote storage (FTP, S3, Google Drive, etc.).

2. Built-In Hosting Backup Options

At Hosteons, VPS plans come with the ability to take backups via Virtualizor. You can backups directly from the panel for added safety.

3. Cron Jobs + Rsync

For Linux VPS users, set up a cron job with rsync to copy files to another server or external storage automatically. Example:

0 2 * * * rsync -a /var/www/ user@backupserver:/backups/

This will back up your website every night at 2 AM.

4. Database Backups via Cron

Databases like MySQL/MariaDB can be backed up automatically:

0 3 * * * mysqldump -u root -pYourPassword dbname > /backups/db-$(date +\%F).sql

5. Cloud Storage Integration

Automate backups to cloud services like Amazon S3, Google Cloud Storage, or Dropbox. Tools like rclone make it simple to sync VPS data to the cloud.


📌 Best Practices for VPS Backups

  • Follow the 3-2-1 Rule: Keep 3 copies of your data, on 2 different media, with 1 stored offsite.
  • Encrypt Sensitive Backups: Ensure sensitive files are encrypted before storing them offsite.
  • Test Restores Regularly: A backup is useless if you can’t restore it—test periodically.
  • Rotate Backups: Don’t just keep the latest copy; use rotation strategies (daily, weekly, monthly).

🚀 Automated Backups with Hosteons VPS

Hosteons makes it easy to protect your data:

  • Built-in backup options via Virtualizor control panel
  • Support for external and local backup storage
  • Affordable VPS and VDS hosting with 10Gbps ports and full root access

👉 Check out our hosting plans:


✅ Conclusion

Automating backups for your VPS is one of the smartest investments you can make in your hosting setup. It ensures your data is safe, your business stays online, and your peace of mind remains intact. With Hosteons’ built-in tools and flexible hosting plans, protecting your VPS has never been easier.

How to Achieve Low Latency for Your Website Worldwide

Website speed is no longer a luxury—it’s a necessity. In 2025, users expect web pages to load in under 2 seconds, regardless of where they are in the world. Slow-loading websites lead to poor user experience, higher bounce rates, and lost revenue.

One key factor that impacts speed is latency—the time it takes for data to travel between your server and your visitors. Let’s explore how you can reduce latency and deliver fast websites globally.


✅ What is Latency?

Latency is the delay between a user’s request and the server’s response. High latency means slower page loads, which can frustrate visitors and affect SEO rankings.


✅ Factors Affecting Latency

  • Server Location: The farther your server is from the user, the longer the data travel time.
  • Network Speed: Bandwidth and port speed play a huge role.
  • Routing & Network Hops: Poor peering can cause delays.
  • DNS Resolution: Slow DNS response adds milliseconds to every request.

How to Reduce Latency for Global Users


✅ 1. Choose the Right Hosting Location

If most of your visitors are in Europe, hosting your website in Frankfurt or Paris makes sense. For North America, choose a location like Dallas or Los Angeles.

At Hosteons, we offer multiple global locations:

  • USA: Los Angeles, Dallas, Miami, Portland, New York, Salt Lake City
  • Europe: Frankfurt (Germany), Paris (France)

👉 Explore our plans:


✅ 2. Use a CDN (Content Delivery Network)

CDN caches your content on servers worldwide, reducing latency for visitors by serving them from the nearest edge location. Popular CDN options:

  • Cloudflare (Free & Paid)
  • Fastly
  • Akamai

✅ 3. Optimize DNS Resolution

Use fast DNS providers like:

  • Cloudflare DNS
  • Google Public DNS
  • Quad9

This reduces the initial lookup time for your domain.


✅ 4. Enable HTTP/2 and HTTP/3

These protocols allow faster data transfer with multiplexing and better performance over high-latency connections.

Enable them in your web server (Nginx, Apache) or use a CDN that supports HTTP/3.


✅ 5. Use 10Gbps Network Ports

Network speed plays a big role in reducing latency. All Hosteons VPS plans come with 10Gbps ports, ensuring lightning-fast connectivity.


✅ 6. Optimize Application Performance

  • Enable caching (Varnish, Redis, Memcached)
  • Compress assets with Gzip or Brotli
  • Optimize images and use WebP

✅ 7. Monitor Latency and Performance

Use tools like:

  • GTMetrix
  • Pingdom
  • WebPageTest
  • Cloudflare Analytics

Regular monitoring helps you spot issues early.


Why Choose Hosteons for Low Latency?

  • Multiple global locations
  • 10Gbps network ports
  • KVM virtualization for dedicated resources
  • Affordable VPS plans starting at $2.99/month

👉 Start hosting your website for global speed today:

Order Your VPS


Final Thoughts

Reducing latency is crucial for improving user experience and SEO. By choosing the right hosting location, using a CDN, optimizing DNS, and leveraging high-speed networks, you can ensure your website loads fast worldwide.

How to Protect Your VPS Against Ransomware Attacks

Ransomware attacks have become one of the most dangerous cybersecurity threats in recent years. These attacks encrypt your data and demand a ransom for its release, causing downtime, financial losses, and sometimes permanent data loss.

If you’re running a VPS, you are a target—but with the right security practices, you can significantly reduce the risk. In this guide, we’ll show you how to protect your VPS from ransomware attacks.


✅ 

What is Ransomware and Why Target VPS?

Ransomware is malicious software that encrypts your files or system, rendering them unusable until a ransom is paid. VPS servers are attractive targets because:

  • They often host business-critical applications
  • Many users fail to apply security updates
  • Weak configurations leave them exposed to attacks

Top Ways to Secure Your VPS from Ransomware


✅ 

1. Keep Your System Updated

Unpatched systems are the most common entry point for attackers.

Update your VPS regularly:

sudo apt update && sudo apt upgrade -y   # For Debian/Ubuntu
sudo dnf update -y                      # For CentOS/AlmaLinux

✅ 

2. Use Strong SSH Security

  • Disable root login
  • Use SSH keys instead of passwords
  • Change the default SSH port

Example:

PermitRootLogin no
PasswordAuthentication no
Port 2222

Restart SSH:

systemctl restart ssh

✅ 

3. Enable a Firewall

Limit access to essential ports only.

For Ubuntu/Debian:

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

✅ 

4. Install Fail2Ban

Block brute-force attempts:

sudo apt install fail2ban -y    # Debian/Ubuntu
sudo dnf install fail2ban -y    # CentOS/AlmaLinux

✅ 

5. Use Real-Time Malware Protection

Install tools like ClamAV or Maldet to detect malicious files:

sudo apt install clamav -y

✅ 

6. Secure Web Applications

  • Keep CMS platforms like WordPress up to date
  • Use strong admin passwords
  • Install security plugins and WAF (Web Application Firewall)

✅ 

7. Enable Regular Backups

Backups are your best defense against ransomware. Even if your server is compromised, you can restore your data without paying a ransom.

Options:

  • Use Hosteons’ VPS backup service
  • Use remote backup tools like rclone or rsync

✅ 

8. Implement Principle of Least Privilege

Only give necessary access to users and apps. Avoid running unnecessary services.


✅ 

9. Monitor Your VPS

Set up monitoring tools like:

  • fail2ban logs
  • UFW logs
  • Host-based Intrusion Detection Systems (HIDS) like OSSEC

Hosteons VPS Security Features

All Hosteons VPS plans are built for security and performance:

  • KVM Virtualization for complete isolation
  • 10Gbps Ports for high-speed secure connections
  • Full Root Access to configure your own security stack
  • IPv6 Ready
  • Affordable Plans starting at $2.99/month

👉 Order a VPS today:


Final Thoughts

Ransomware is a growing threat, but with regular updates, strong security practices, and backups, your VPS can stay protected. Don’t wait until it’s too late—secure your VPS now.

How to Host Multiple Websites on a Single VPS

If you manage multiple projects or clients, hosting all your websites on a single VPS can be cost-effective and efficient. With proper configuration, one VPS can run multiple domains, each with its own files, databases, and security settings.

In this guide, we’ll explain how to host multiple websites on one VPS using simple, practical steps.


✅ 

Why Host Multiple Sites on One VPS?

  • Cost Savings: Pay for one VPS instead of multiple hosting plans.
  • Better Resource Control: Allocate CPU, RAM, and storage as needed.
  • Full Customization: Choose your own control panel, stack, and security settings.
  • Scalability: Easily upgrade your VPS resources as traffic grows.

✅ 

Step 1: Choose the Right VPS Plan

Hosting multiple websites requires enough resources to handle combined traffic and workloads. For small to medium sites, start with:

  • 2–4 GB RAM
  • 2+ vCPU cores
  • 40–80 GB SSD/NVMe storage

👉 Explore VPS plans:


✅ 

Step 2: Install a Web Server

You need a web server to host websites. Popular choices include:

  • Apache
  • Nginx
  • LiteSpeed (for higher performance)

Example for Ubuntu:

sudo apt update
sudo apt install apache2 -y

✅ 

Step 3: Configure Virtual Hosts

Create separate virtual host files for each domain.

Example for Apache:

<VirtualHost *:80>
    ServerName example1.com
    DocumentRoot /var/www/example1
</VirtualHost>

<VirtualHost *:80>
    ServerName example2.com
    DocumentRoot /var/www/example2
</VirtualHost>

Enable sites:

sudo a2ensite example1.conf
sudo a2ensite example2.conf
sudo systemctl reload apache2

✅ 

Step 4: Add DNS Records

Point each domain to your VPS IP using A records in your domain registrar’s DNS settings.


✅ 

Step 5: Secure with SSL (HTTPS)

Use Let’s Encrypt for free SSL certificates:

sudo apt install certbot python3-certbot-apache
sudo certbot --apache

✅ 

Step 6: Optimize for Performance

  • Enable caching (Varnish, Redis, or Nginx cache)
  • Use Cloudflare CDN for speed and DDoS protection
  • Monitor resource usage and scale when needed

✅ 

Step 7: Consider a Control Panel

If you’re managing many sites, a control panel like DirectAdminCyberPanel, or ISPConfig makes management easier.


✅ 

Benefits of Using Hosteons VPS for Multiple Websites

  • 10Gbps Network Ports for ultra-fast connections
  • Full Root Access for complete control
  • KVM Virtualization for dedicated resources
  • Affordable Plans starting at $2.99/month
  • IPv6 Ready and Multiple Locations

👉 Start hosting multiple websites today:

Order Your VPS


Final Thoughts

Hosting multiple websites on a single VPS is a smart way to save costs and maintain control. With proper configuration, security, and resource management, your sites can run smoothly from one powerful VPS.

How to Secure a VPS Right After Deployment – Checklist for 2025

Deploying a VPS is the first step to building your online presence, hosting applications, or running business-critical services. But if you don’t secure it immediately after deployment, your server could become an easy target for hackers and automated bots.

Here’s a step-by-step security checklist for 2025 to harden your VPS from the start.


✅ 

1. Update Your System

Outdated packages and kernels are the biggest vulnerabilities.

Run these commands right after login:

sudo apt update && sudo apt upgrade -y   # For Ubuntu/Debian
sudo dnf update -y                      # For CentOS/AlmaLinux

✅ 

2. Create a New User and Disable Root Login

Never use the root account for day-to-day operations.

adduser youruser
usermod -aG sudo youruser

Edit the SSH configuration:

sudo nano /etc/ssh/sshd_config

Change:

PermitRootLogin no

Restart SSH:

systemctl restart ssh

✅ 

3. Set Up SSH Key Authentication

Passwords can be brute-forced. Use SSH keys instead.

Generate keys on your local machine:

ssh-keygen -t rsa -b 4096

Copy your public key to the VPS:

ssh-copy-id youruser@server_ip

Disable password login in /etc/ssh/sshd_config:

PasswordAuthentication no

Restart SSH again.


✅ 

4. Change the Default SSH Port

Bots scan port 22 for vulnerabilities. Change it to a non-standard port (e.g., 2222):

sudo nano /etc/ssh/sshd_config

Set:

Port 2222

Restart SSH:

systemctl restart ssh

✅ 

5. Enable a Firewall

Use UFW for Ubuntu/Debian:

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

For CentOS/AlmaLinux (Firewalld):

sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload

✅ 

6. Install Fail2Ban

Protect against brute-force attacks:

sudo apt install fail2ban -y    # Debian/Ubuntu
sudo dnf install fail2ban -y    # CentOS/AlmaLinux

Enable and start Fail2Ban:

sudo systemctl enable fail2ban
sudo systemctl start fail2ban

✅ 

7. Disable Unnecessary Services

Check running services:

systemctl list-unit-files --type=service --state=enabled

Disable what you don’t need:

sudo systemctl disable service_name

✅ 

8. Enable Automatic Security Updates

On Ubuntu/Debian:

sudo apt install unattended-upgrades -y

On CentOS/AlmaLinux:

sudo dnf install dnf-automatic -y
sudo systemctl enable --now dnf-automatic.timer

✅ 

9. Install a Malware Scanner

Use ClamAV for basic malware scanning:

sudo apt install clamav -y

✅ 

10. Backup Regularly

Security is not complete without backups. Use tools like:

  • rsync
  • rclone
  • Cloud backups from your Hosteons VPS panel

Pro Tip:

Hosteons offers an Initial VPS Setup Script that secures your server instantly with best practices:

👉 GitHub Script

👉 Full Guide


Final Thoughts

Securing your VPS should never be an afterthought. With these 10 steps, you can minimize vulnerabilities and keep your server safe from evolving cyber threats in 2025.

🛡️ Ready to get started?

Order a reliable VPS now: Hosteons VPS Plans

Use Ansible to Manage Multiple VPS Instances Efficiently

Managing several VPS instances manually can be time-consuming and error-prone. With the power of Ansible, system administrators can automate repetitive tasks, deploy configurations, and maintain consistency across all their VPS servers — all from a single control node.

In this guide, we’ll explore how you can use Ansible to efficiently manage your VPS instances hosted with Hosteons.


🚀 What is Ansible?

Ansible is an open-source IT automation tool that allows you to manage systems using simple YAML-based playbooks. It doesn’t require any agent installation and communicates over SSH, making it ideal for managing Linux VPS environments.


✅ Benefits of Using Ansible with Hosteons VPS

  • Agentless: No need to install additional software on your VPS.
  • Scalable: Manage 2 or 200 servers with the same effort.
  • Consistent: Standardized deployments ensure fewer mistakes.
  • Efficient: Automate updates, security patches, and software installs.

🛠️ Prerequisites

To get started with Ansible, you’ll need:

  • A local machine (control node) with Ansible installed (Ubuntu/Mac/Linux).
  • SSH access to your Hosteons VPS instances.
  • All VPS servers should have a common user with SSH key access (preferably with sudo privileges).

🔧 Step-by-Step Setup

1. Install Ansible on Your Local Machine

For Ubuntu/Debian:

sudo apt update
sudo apt install ansible -y

For macOS (using Homebrew):

brew install ansible

2. Create an Inventory File

Ansible uses an inventory file to keep track of the VPS instances you want to manage.

Example: hosts.ini

[webservers]
vps1 ansible_host=192.0.2.1 ansible_user=root
vps2 ansible_host=192.0.2.2 ansible_user=root

Replace 192.0.2.x with the IPs of your VPS servers from Hosteons.


3. Test Connectivity

Use the ping module to verify connection:

ansible -i hosts.ini all -m ping

You should see a “pong” response if the connection is successful.


4. Create and Run a Playbook

Example: Install Apache on all VPS servers

---
- name: Install Apache on VPS
  hosts: webservers
  become: yes
  tasks:
    - name: Update apt packages
      apt:
        update_cache: yes

    - name: Install Apache
      apt:
        name: apache2
        state: present

Save this file as apache.yml, then run it:

ansible-playbook -i hosts.ini apache.yml

🔁 What Can You Automate?

  • Initial server setup
  • Firewall configuration
  • Software installation
  • Security updates
  • Deploying web applications
  • Monitoring tools setup (e.g., Fail2Ban, UFW, Zabbix)

📦 Combine with Hosteons Initial VPS Setup Script

Hosteons also offers an open-source initial VPS setup script on GitHub to secure and configure your new servers. You can run this once and then switch to Ansible for ongoing automation.

GitHub: https://github.com/hosteons/Initial-VPS-Setup-Script-for-Linux

Blog: https://blog.hosteons.com/2025/06/05/instantly-secure-and-set-up-your-vps-with-hosteons-initial-vps-setup-script/


🔒 Pro Tip: Use SSH Key Authentication

To avoid entering passwords for every VPS, use SSH key-based login and disable password authentication for improved security.


🏁 Final Thoughts

Ansible is a powerful way to save time and reduce errors when managing multiple VPS instances. Whether you’re running WordPress sites, managing Docker containers, or deploying custom apps — Ansible and Hosteons VPS make a powerful combination.


🖥️ Ready to scale your server management?

👉 Order a Hosteons VPS and start automating with Ansible today!

How to Install and Configure Nextcloud on a Hosteons VPS

Nextcloud is a powerful open-source self-hosted cloud storage solution that allows you to store, share, and access your files from anywhere — securely and privately. With a VPS from Hosteons, you can deploy your own Nextcloud instance in minutes.


✅ Prerequisites

Before starting, make sure:

  • You have a Hosteons KVM VPS with at least 1 GB RAM (2 GB recommended).
  • You’re using Ubuntu 22.04 (or a similar Linux distro).
  • You have a domain name pointed to your VPS IP (optional but recommended).
  • SSH access to the VPS (as root or sudo user).

🧰 Step 1: Update Your System

sudo apt update && sudo apt upgrade -y

⚙️ Step 2: Install Required Dependencies

sudo apt install apache2 mariadb-server libapache2-mod-php \
php php-gd php-mysql php-curl php-mbstring php-xml php-zip php-bz2 php-intl php-imagick php-gmp php-bcmath unzip wget -y

🗄️ Step 3: Configure MariaDB

sudo mysql_secure_installation

Then log into MariaDB:

sudo mysql -u root -p

Run the following queries to create a database and user:

CREATE DATABASE nextcloud;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

📦 Step 4: Download and Extract Nextcloud

cd /var/www/
sudo wget https://download.nextcloud.com/server/releases/latest.zip
sudo unzip latest.zip
sudo chown -R www-data:www-data nextcloud
sudo chmod -R 755 nextcloud

🌐 Step 5: Configure Apache for Nextcloud

Create a new config file:

sudo nano /etc/apache2/sites-available/nextcloud.conf

Paste this:

<VirtualHost *:80>
    ServerName yourdomain.com

    DocumentRoot /var/www/nextcloud

    <Directory /var/www/nextcloud/>
        Require all granted
        AllowOverride All
        Options FollowSymlinks MultiViews
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/nextcloud_error.log
    CustomLog ${APACHE_LOG_DIR}/nextcloud_access.log combined
</VirtualHost>

Enable the config and necessary modules:

sudo a2ensite nextcloud.conf
sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2

🔐 (Optional) Step 6: Secure with HTTPS using Let’s Encrypt

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

🧪 Step 7: Final Setup via Web UI

Open your browser and go to http://yourdomain.com or http://your_server_ip

You’ll see the Nextcloud installer. Enter:

  • Admin username and password
  • Database name: nextcloud
  • Database user: nextclouduser
  • Password: your DB password
  • DB host: localhost

Click Finish Setup.


🎉 Done!

Nextcloud is now ready on your Hosteons VPS. You can install the mobile or desktop apps and start syncing your files securely.


🚀 Need a VPS?

Hosteons offers powerful, affordable VPS solutions with full root access, 10Gbps ports, and global payment methods including Crypto, Alipay, UPI, and more.

👉 Explore VPS Plans