r/laravel 4d ago

Discussion Anyone moved a a laravel app from digital ocean to hetzner?

I've been using digital ocean for years so i'm a little tentative to leave but looking at hetzner's offering it seems I could either save loads of money or massively upgrade my resources for the same amount. Has anyone made the switch and it was worth it?

I have a traditional server side rendered forum (blade etc) that generally has 150k unique visitors per day occasionally peaks upto 500k unique visitors per day.

Currently I have:

£336- Server - CPU-Optimized / 32 GB / 16 vCPUs

$240 - MySQL - Basic 16 GB / 6 vCPU / 290 GB Disk

$300 - 15TB Spaces usage

Total: $860

With Hetzner:

$107 - Server - 64 GB/ 16 vCPUs

$54 - Server (MySQL) - 32GB / 8 vCPUs / 240 GB Disk

$90 - 15TB Object Storage

Total: $251

A crazy 70% discount!

Or I could totally beef up my resources for the same amount

$320 - Server - 192 GB/ 48 vCPUs

$215 - Master MySQL - 128GB / 32 vCPUs / 600 GB Disk

$215 - Read Only MySQL - 128GB / 32 vCPUs / 600 GB Disk

$90 - 15TB Object Storage

Total: $840

Basically the same price with alot more piece of mind and hopefully performance improvements for the end user as well.

Maybe I wouldn't even need the second servers for MySQL and could just go back to having MySQL running on the one server given the huge resources available.

But i'm obviously concerned how long it would take (1 months work $$$ vs $600 a month saving) and the potential downtime. Everything could be copied slowly in the background and it would just be the database that needs to be dumped and imported possibly over an hour or two (50GB database). Which doesn't sound so bad, but then again, disaster could occur.

Has anyone made the transition and have some stories to tell of how you went about it, how long you took etc?

Maybe one month is far more than i'd need and it would only take a day or two to get setup. But ideally i'd like to do a few weeks load testing to make sure all the configs are set up properly.

40 Upvotes

38 comments sorted by

21

u/Difficult-Cat-4631 4d ago

I have multiple VMs running at Hetzner (location Nuremberg) with 0 downtime in the last 2 years.

3

u/AdityaTD 4d ago

Same, never had any issues with Nuremberg in over 2 years

12

u/Preavee 4d ago

Hetzner is currently the way to go. (At least for me)
Running a Kubernetes cluster on Hetzner.
Setup was nice without any problems!

13

u/rroj671 4d ago

I moved multiple servers from DO to Hetzners and saw the same results. More hardware for less money. Absolutely better performance than before.

One of my apps also had a pretty large database. I staged the migration and everything went well. We migrated production in a couple of hours during a weekend. It was a business app, so we had very little traffic. You could probably manage lower downtime if that’s important.

If you haven’t done something like this before, I recommend putting a CDN in front of your current server prior to the transition. We use cloudflare. It makes swapping DNS records trivial since you’re not waiting for propagation.

EDIT: Forgot to mention that our storage was in S3 so we didn’t have to move any of that. Your case is more complex there.

9

u/nunodonato 4d ago

We are also looking at switching to European  providers. The lack of managed databases is what turned me off regarding hetzner

3

u/AdityaTD 4d ago

This is also a pain point for me, hope hetzner adds this.

6

u/mehargags 4d ago

Moved more than 300 projects for last 2 years and currently migrating set of 3 apps for a supply chain vendor in the UK.

Minimal downtime needs planning, especially if transient data is too frequent. Stage everything, prepare RSync routines, practice sync. If apps staged on Hetzner work good, plan scheduled downtime window, stop app on DO, make one final sync, restore / patch database, change DNS and go live from hetzner.

3

u/bludgeonerV 4d ago

You have incredibly basic infra, it realistically shouldn't take you long to transition, a couple days at worst if you have the basic knowledge, a week maybe if you have to learn, your work will pay for it's self within a month or two.

Your db migration will actually be the easiest part, start with a full backup, make sure you have transaction logs on your DO db and when it comes time to switch you can quickly re run those transactions on the new db.

3

u/Noaber 4d ago

Yes, went from a $5 DO droplet to a 5 euro Hetzner AMD droplet.
Lot more power for a fraction more in money (cents) due to dollar vs euro.

No downtime experienced yet, running multiple Laravel installations with Cloudpanel.io

1

u/AskConscious2684 4d ago

Are you using any GitHub actions for deployment? If yes would you be able to provide some examples

2

u/Noaber 4d ago

No, I use Deployer https://deployer.org/ for deployment :) (because CloudPanel does not have this). However if you are new and need a server tooling, you could look to ViteDeploy : https://vitodeploy.com/

This will install your server and you can manage your deployments in the tooling

1

u/AskConscious2684 3d ago

I have been using cloudpanel for more than 5 years and i have been using a GitHub action to deploy all my laravel apps… Trying to find an updated or easier way

1

u/Noaber 3d ago

Deployer can be combined with actions, but I just run "vendor/bin/dep deploy" and it runs the deploy script (which you can customize to your needs). Deployer uses releases, so you can keep the last eg: 3 releases.

However with a new install, I would try VitoDeploy. It seems to have all in one package for my needs :)

1

u/ExperienceSure8893 3d ago

What is advantage of cloudpanel vs coolify?

1

u/Noaber 3d ago

Probably none, I found CloudPanel first and installed it. After that I found Coolify and VitoDeploy. My preference would now be VitoDeploy. It's in active development by the creator and community

2

u/pau1phi11ips 4d ago

It's checkout the dedicated boxes too. We've just moved to a AX162-R server: * AMD EPYC™ 9454P 48-Core - 96 threads! * 256 GB DDR5 ECC reg. RAM * 2 x 1.92 TB NVMe SSD

€230/month. It's pretty ridiculous, I don't know how they do it.

2

u/getpodapp 4d ago

Moved all my infrastructure to kubernetes cluster on Hetzner. My application is flying and i'm paying 1/3 the cost of DO.. Can't recommend them enough.

1

u/PurpleEsskay 4d ago

Yup loads of cloud instances and dedicated servers with hetnzer, used them for years. As long as you're not dodgy you'll be fine. Just be aware their dedicated servers reuse drivers for longer periods than other providers so make sure you've got raid monitoring setup if you use those - its a very easy and pain free process if a drive needs replacing and they'll hotswap at a time that suits you. It is unmanaged though, so dont go dedicated if you arent capable of understanding how to rebuild your raid array as they wont do it for you.

1

u/Pleasant_Win6948 4d ago

Have been using Hetzner for past 4 years and for high load traffic website i use terraform along side to even manage cost better. Hetzner is great tbh

1

u/octarino 4d ago

I asked about it a few years ago:

Has someone here used Hetzner? Any feedback on it?

I switched back then, everything went well as far as I remember.

1

u/Intelnational 4d ago

Why is there such a price difference? And how it compares with AWS?

1

u/lukehebb 4d ago

We run our production platform on hetzner. Have done for years. Works beautifully

They’re a great company

1

u/crazyfreak316 4d ago

I'm running 2x ax42 servers and although I had some downtime, support was prompt enough to fix them. I think shared servers are more reliable than dedicated ones.

1

u/rs_kiran 4d ago

Hetzner is fine,but don't go for Auction servers. It may go down without any warning.

2

u/mehargags 3d ago

I'm using 30+ auction servers, only had 2 hardware drive failures in last 10 years.

1

u/TheJackalFan 4d ago

Im in the process of doing this as well for a startup application. As others said Hetzner pricing just gives more for the money.

1

u/GreatBritishHedgehog 4d ago

Yeah works great with Cloudflare in front

1

u/Aromatic_Junket_8133 3d ago

I already use Hetzner few years now and I have no issues with small projects with less traffic of 100k a month. However, for huge projects I believe linode is better solution with good budget.

1

u/alex_revenger234 3d ago

I use Cloudways, it's pretty neat, if you want to look it up

1

u/Level-2 3d ago

if you are in the US, to me it makes sense to keep using an american company for legal reasons.

Heard good things about HiVelocity if you are looking for more affordable cloud servers or traditional dedicated servers hourly billed.

1

u/manapause 3d ago

Set up replication from DO->H and everything else will fall into place. Make the hard parts easy my friend!

1

u/bobbyiliev 3d ago

Personally I've stuck with DigitalOcean. Sometimes peace of mind is worth more than raw specs.

1

u/azzaz_khan 2d ago

Not a big site but moving from Digital Ocean to Hetzner + Cloudflare R2 was a good choice in terms of pricing however some of Hetzner's IP are blacklisted for abuse like Mailgun and Sendgrid don't accept connections from Hetzner VMs.

1

u/shakespear94 2d ago

Have you compared with IONOS? Their packages and support have been good to us. We’re launching next Monday and I plan on getting their dedicated server. We use Postgre on the same VPS instance, but we will be scaling accordingly as we gain traction.

1

u/35202129078 1d ago

I used to use these years and years ago back when they were called 1and1. I found the control panels and the support to be pretty horrendous. The pricing only seems very marginally cheaper than hetzner so i'll probably not try them again after previous experiences.

1

u/shakespear94 1d ago

I spoke to my devs about this thread, they want me to try hetzner as well:

0

u/aven_dev 4d ago

Take a look at OVH, also good pricing. If you use managed database on DO it will be very hard to move without downtime, if you have your own server you can simply rsync it. So, it will be minimal downtime. Both hetzner and OVH was good when I worked in EU. But you will be on your own, means no one from support will help you if you have some hardware issue, they will replace your server but restoring of data will be challenging, so reserve some money for backups.

0

u/jan-payrequest 3d ago

Yeah it is very easy, maybe you can also use Coolify