byemc.xyz

A Minecraft Server?!?!

Bye

I’ve done a thing.

I finally got an Azure for Students subscription a few days ago, so of course I thought

Hey, let’s run a Minecraft server on this thing.

Yeah… that was a bad idea lol. I’m gonna share the pain of getting that to work today.

Getting the subscription

Back in October, I decided to apply for the GitHub Student Developer Pack. It’s really handy! Free GitHub Pro, a free .me domain for a year, $100 Azure & DigitalOcean credit each… what’s not to like? Well, nothing! Except the pain of getting that $100 credit.

I don’t actually have my own bank card. I have a Revolut card, which is prepaid. To redeem your $100 DigitalOcean credit, you need to link your card, or pay in advance with PayPal. And DigitalOcean doesn’t accept prepaid cards. So my other option is PayPal. I know this works as I’ve bought stuff with this card with PayPal before, but I didn’t really want to pay anything. So let’s forget DigitalOcean for now.

My other choice is Microsoft Azure for Students, which also give you $100 free credit for a year, along with loads of free stuff… and you don’t need a credit card. So, I went to the site, logged in, and… it didn’t work. “Your student status with GitHub couldn’t be verified” says Microsoft. Luckily, that was back in November. I tried my luck again this week, and it worked! Now to do something…

Setting up a virtual machine

My eyes were immediately drawn to the Virtual Machine button, and I clicked it instantly. After selecting Ubuntu 20.04, I was greeted with an amazing set of options.

Of course, it wasn’t that simple. After setting the server’s region to Europe West, Azure oddly wouldn’t let me pick a VM type so I could, y’know, create the thing. So I changed the region to US West… and it still wouldn’t let me pick. After a few tries, I was getting a bit annoyed.

However, I actually figured something out for once. It turns out, that for whatever reason, the Asia and Australia options do work. Thinking I was being funny, I selected the B1 virtual machine (which has 30GB of storage and 1GB of RAM), which costs ~$9 per month, but apparently the Azure for Students plan gives you 750 hours of these for free anyway so it doesn’t chip too much into my $100 allowance.

Text: 12 Months; Azure Virtual Machines - Linux; 750 hours B1s burstable virtual machines.

So, now I had a VM. What next?

Running Minecraft: pain.

Of course, what else could I do than run Minecraft 1.18.2 as a server and make some SMP or something!

But something did stop me in my tracks. The RAM. See, Minecraft allocates itself 2GB of RAM when you run Java Edition as a client. Generally, running a Minecraft server requires a minimum of 1GB of RAM.

Oh, that’s fine then

you might be saying. But having 1GB allocated to a machine does not mean you’ll get the full 1GB. For example, running neofetch on the VM gives me:

Memory: 100MiB / 909MiB

As you can see (or hear), that is not 1GB. Thanks to some advice from members of PolyMars’ Discord server, I decided to run Paper 1.12.2 and left it at that.

IP: mc.byecorps.com ignore this im shutting down the server lol (using it for something else)

API: less pain

I decided after setting up the server, I decided

i want a website.

This complicated things somewhat. But, I’m still working on it. Come back later to learn about how bad of a Python dev I am!

UPDATE 30 March 2022: server is down now, don’t expect to be able to join, and don’t email me about it.