
DigitalOcean to Hostinger VPS Migration: A Zero-Downtime Journey
By Edward Koo
Date Completed: 2 September 2025
Migrating a Virtualmin VPS from DigitalOcean to Hostinger is a manual process that involves backing up your data on the old server and restoring it on the new one. Since both are self-managed VPS providers, there’s no automated migration tool from Hostinger for this specific setup. The key is to leverage Virtualmin’s built-in backup and restore functionality.
Step 1: Prepare Your DigitalOcean VPS for Backup
- Lower DNS TTL: A few days before the migration, log in to your domain registrar’s DNS settings and reduce the TTL (Time-to-Live) for your DNS records (A, MX, etc.) to a low value like 300 seconds (5 minutes). This will ensure faster DNS propagation once you point your domain to the new Hostinger VPS, minimizing downtime.
- Generate Backups: Use the Virtualmin command-line tool to create a full backup of all your virtual servers. This will include all website files, databases, mail, and Virtualmin configurations.
- Log in to your DigitalOcean VPS via SSH.
- Create a dedicated directory for your backups, e.g.,
mkdir /root/backups
. - Run the backup command:
virtualmin backup-domain --dest /root/backups/ --all-domains --all-features --newformat --all-virtualmin
- This command backs up all your domains with all features, including system configurations, and saves them in the specified directory.
Step 2: Set Up Your Hostinger VPS
- Provision the New Server: In your Hostinger hPanel, provision a new VPS. It’s recommended to choose a Linux distribution that is officially supported by Virtualmin, such as AlmaLinux, Rocky Linux, or Ubuntu.
- In my case, I installed Ubuntu 24.04 (LTS) as per-DigitalOcean VPS
- Install Virtualmin: After the OS is installed, access your new Hostinger VPS via SSH and install Virtualmin using the official installation script.
- Transfer Backups: Securely transfer the backup files from your DigitalOcean VPS to your new Hostinger VPS. The easiest method is using
scp
(Secure Copy Protocol).- From your local machine or the Hostinger VPS, run a command like this:
scp -r root@your_digitalocean_ip:/root/backups /root/
- This will copy the entire backups folder from your DigitalOcean server to the root directory of your new Hostinger server.
- From your local machine or the Hostinger VPS, run a command like this:
Step 3: Restore Your Data on the Hostinger VPS
- Restore Virtualmin Configuration: First, restore the Virtualmin configuration file from the backup. This file contains global settings and user details.
- Virtualmin GUI: Backup and Restore.
- Select each backup one at a time e.g.:
restore main parent domain (example.com) then followed by sub-domain / child domain (subfolder.example.com)
- Select all to restore.
- All domains to be restored one by one to avoid error.
- Post-Migration Checks: After the restoration is complete, test your websites and applications. You can do this by editing your local machine’s hosts file to point your domain to the new Hostinger VPS IP address. This lets you check the new site without affecting live traffic.
Virtualmin - System Settings - Re-Check Configuration
. This ensure all configuration is ready for Virtualmin.
Step 4: Setup Hostinger VPS Firewall
- Setup Hostinger VPS firewall according to Virtualmin.
- Ports to be opened in Firewall (Virtualmin, Usermin and Mailbox):
- Essential Ports for Virtualmin & Usermin
- 22/tcp – SSH access (remote server management)
- 80/tcp – HTTP (web traffic)
- 443/tcp – HTTPS (secure web traffic)
- 10000/tcp – Webmin/Virtualmin control panel
- 20000/tcp – Usermin (webmail and user-level tools)
- Optional Ports for Email & DNS Services
- 25/tcp – SMTP (outbound mail)
- 465/tcp – SMTPS (secure SMTP)
- 587/tcp – SMTP submission (recommended for clients)
- 110/tcp – POP3
- 995/tcp – POP3S (secure POP3)
- 143/tcp – IMAP
- 993/tcp – IMAPS (secure IMAP)
- 53/tcp/udp – DNS (for custom nameservers and zone resolution)
- Port 25 is a must for postfix.
Step 5: DNS Cutover
- Updated registrar records to point to new nameservers
- Monitored DNS propagation and TTL expiry
- Verified zone resolution, MX records, and CAA entries
- Ensure all
ns1.example.com
andns2.example.com
is updated in the DNS of each domain. - In Domain provider, create a personal glued nameserver and then link nameserver to the
ns1
andns2
as above. - All domains to add
ns1 and ns2 nameservers, A records and AAAA records
.
Step 6: Post-Migration Validation
- Confirmed web, mail, and database services were operational
- Ran SSL diagnostics and verified certificate chains
- Coordinated client-side testing for domain-specific validation
- Retired DigitalOcean VPS after full service validation