Moving from Digital Ocean to Hetzner in 2025 was easier than I thought.
You can see my previous post in 2022 moving from Hetzner to Digital Ocean and performance problems with Hetzner in the US.
This is my story about moving from a Digital Ocean droplet VPS to a Hetzner Cloud shared VPS.
Cloud Web Hosting
VPS Cloud web server movement using scripts and automation.
Switched from the old VPS to the new one in Cloudflare domain dns settings.
Using ipv4 vs ipv6. On hetzner, you can pay less if using only ipv6 and no ipv4 for the web server.
Using Cloudflare so in theory, IPv6 only could work as the edge only connection to Cloudflare then the user sees the page from the Cloudflare proxy cache via IPV4 but I wasn’t sure I could easily connect to the server with SSH so I’m paying 0.9 EUR extra per month for having IPV4.
Maybe later we could try IPV6 only.
Prices
For the same perceived performance, Digital Ocean is more expensive in 2025 compared to Hetzner.
Since my move before in 2023 to Digital Ocean not much changed other than actively using Couldflare R2 storage for web workloads.
File storage in Cloudflare R2 is really easy and keeping up with the fees can be managed with billing alerts.
In general, I love Cloudflare CDN because it can make a slow website blazingly fast.
This website hopefully was super fast to load thankfully there was a cache Hit and not a cache Miss in your response headers for this page.
Try it yourself FREE Credit
Added referral links to both Hetzner and Digital Ocean where both offer FREE credit. Digital Ocean offers $200 for 60.days and Hetzner offers 20 EUR currently but these might change for better or worse later.
Anyone wanting to try one can try both like this. You get FREE credit with both links:
Price vs Performance Digital Ocean vs Hetzner
Digital Ocean works fine for me so far no complains with the faster storage droplets versions.
Hetzner have really good offers for their data centers in Germany so I had to exercise my web server relocation scripts to be sure I can still move to another server easily.

Web Server VPS Relocation Scripts
During the move I also did an upgrade to PHP 8.4 which didn’t work with all the apps so I had to downgrade from PHP 8.4 to 8.2.
Thankful that went well and the move scripts were updates.
I might share the scripts at some point on github if anyone is interested. Without private info for sure. Still don’t know if that’s a good idea or no.
The Move
When setting up the new server on Hetzner I did the obligatory lock myself out of SSH by changing the wrong settings at the wrong time.
The Hetzner console worked perfectly and I was able to login on the server without having to wipe everything and start over.
Moved the sites and server from Digital Ocean back to Hetzner on 2025-01-12. I like the do these moving server exercises as it’s good to have the while server easy to script and startup quicky.

It’s a better offer from Hetzner now I believe with CX22 with 4GB RAM and 40GB storage.
The speed seems similar to the Digital Ocean 1GB RAM 25GB Storage I had before but it’s been only 1 day. Update it’s been 3 days since and all is going great!
Everything is normal and running.
Our websites are now hosted by Hetzner in Germany Nuremberg and the CDN is as usual CloudFlare.
Hetzner Data Center Site
The choice was on Nuremberg over the other site in Germany or Finland only because I saw someone on Reddit mention that they have better latency from the US to the Nuremberg Hetzner site. Didn’t bother to actually try it but don’t imagine it would be a big difference.
Saw the official Reddit account of Hetzner posted some links to test but I couldn’t open them at the time and didn’t really feel like doing a deep-dive on chosing the VPS site.
I wanted to finish it and not spend days on nothing meaningful to me.
Cheaper in Germany vs US
The Hetzner Cloud shared plans are cheaper for the sites in Germany than the US sites so I went gor the cheap ones of course haha!
The SFTP / SSH backup file transfer speed to the Germany site is much better than what I experienced before in 2023 for Hetzner in US.
Now it saturated my connection in Cyprus when downloading a backup tar.gz archive at 250Mbps!
Hetzner Blocks SMTP Emails
Since The Hetzner blocking mail server ports 25 and the other one which I can’t remember now but all info is on the Hetzner blocking emails post.
Started some time ago with using Cloudflare for email MX server options to receive emails on the domains hosted.
The server can’t send emails and that might still be a problem but many times it was only about non-important stuff like server alerts, critical alerts and readers comments.
I read your comments but much later – not instant and that’s better for me I guess.
Any urgent things, you can ask on the YouTube videos please and hope I can help you in any way.
After some time, you can request access to the email ports and I can do it but at this point I’m leaving it like this.
Conclusions or something like that
When the website is getting good traffic, I will probably move it back to Digital Ocean and setup the whole email section.
Kept the email services part in my scripts with all the DMARC, SPF and OpenDKIM for that.
The thing about running an email server is that it does take resources and there will be a constant noise coming in from people or spammers trying to use your email server as an open relay spam machine.
All good so far.
This is the first post on the new Hetzner server.
Editing this post on WordPress for me is bypassing the Cloudflare proxy and it does seem a little bit slower now on Hetzner than how it was before on Digital Ocean.
it could be just until PHP is getting the OPCache going.
Will update this post if I notice.anything weird.
VPS Linux Distribution
Oh and before I forget, In the past I’ve been using Centos 7 Linux and since Rocky Linux was started, I used Rocky Linux 8 and now at Rocky Linux 9.5 everything runs smoothly so far.
Rocky Linux follows the RHEL release and it’s compatible with Centos,Fedora and Red Hat Enterprise Linux RHEL.
Rocky Linux 9 was one of the pre-defined images when spinning-up a new VPS on Hetzner so I love that they included it there for convenience.
Read more about the Rocky Linux distro.
Preview the New Host Before Switching DNS
DNS is what tells the world where your websites are hosted.
The last step is the DNS change from the old host to the new hosting server.
Use a host entry in the hosts file
To check if the new server is actually working, you can use a host entry added to the hosts file.
I like to have the migration steps automated with a script so it’s easy to move somewhere else.
My own backup and restore scripts.
You use a host entry in your hosts file where you put the new IP and the domains you’re hosting.
Once the host entry is done, your computer will act like you already moved your dns but the rest of the world is still on the old host.
Once you’re ready, switch dns for everyone and disable your host entry.
Shut down the old server to be sure everything runs from the new host.
You can wait a few days before deleting the old server to be sure you don’t need it anymore.
I take a backup from the old server when starting the migration but you can take one last backup of the files important to you, before deleting the old server.
Shutdown vs Delete
With cloud hosting VPS providers, if you shutdown the old server, you are still paying the same as if it’s started. You pay the same because the resources are allocated and only released when you actually delete the instance.
When you know you don’t need the old server and you have a last backup of your files, delete the old server before you forget and realize, you still have to pay for something you didn’t actually use.
Enjoy and keep your web hosting scripts updated to move easier next time.
Leave a Reply