Hetzner: cheap auction servers, and how to find them
Lately, I’ve had to find a hosting server to replace the server we rented for delire.party, our self-hosting collective of friends. Indeed, OVH decided, with no extra explanations, to decomission our Kimsufi server at the end of the year, and to have us pay a few euros more per month until then. This kind of practices irritates me, so I’ve decided to pull out the plug (metaphorically speaking — the OVH server will still be online for the time of the migration) and have our next server live at Hetzner.
Hetzner is a German company, they’ve been relying on renewable energy for a while, and they have this interesting system of server auctions, with prices lowering until a server has been rented out. For a regular human being, that would mean checking the website multiple times a day to find a cheap server with the right specification. I, for one, am a nerd, so I’ve looked for ways to automate this.
There are a few scripts for this on the Internet, but I made a relatively short one that was perfectly suited for my constraints. I wanted to only see servers with a price tag less than 50€ per month, and at least 2TB of NVME storage. I also wanted email notifications, so that I can stay in the comfort of my email client to check out the new deals. The script doesn’t account for deals it’s already seen, but using it for three days (running it once per day) was sufficient to find a satisfying deal, so I didn’t even have to bother implementing that.
The script is written in JavaScript (based on the one I’ve taken inspiration from), and it has two
dependencies: request
to run the HTTP requests, and nodemailer
to send me the email.
;
;
;
if !config.smtp_host
if !config.email_to
;
;
request = ;
dataUrl,;
Hope this may be useful to some of you too!