[MUSIC]
>> Now, let's start the segment about Microsoft Azure,
and we are going to set up our own Minecraft server on the Clouds.
We will use Microsoft Azure for that,
but we need to register an account on Microsoft.
Just to show you the information here,
you can see there is something about Azure for Java documentation.
These are the links that we can look at in the future and then we
have here Java on Azure and we have useful resources,
Azure Toolkit specifically for IntelliJ.
This might be a little bit overwhelming.
Obviously, we don't need to do all of this,
and we are specifically trying to run a Minecraft server on Azure.
For example, in the beginning,
we don't need any of the special apps that Azure provide.
Don't be overwhelmed by this.
Then the important one is,
I guess, Java on Azure.
Here, you can see you can start your free account,
either you sign in with
your given account or you create a new account here.
Welcome to Azure, continue to the portal.
You can see there's a lot of stuff
there unlike Kubernetes Services
and Azure Cosmos DB and all that good stuff.
The goal here is we want
a barebones Linux machine where we can host the Minecraft server,
so we are going to learn about how to log into
that server and how to set up the port forwarding and stuff.
This is the next step that we want to
do and start a virtual machine,
I think, and that we find now the barebones information.
We can use different subscription.
I guess this is a different payment options.
Here we can see we need to give the virtual
machine a name and we can see the free services
here are only for some of them and then we can
select what kind of system we are running on.
Then we can do SSH public key or a password.
Let's go to the next step, disk.
Most likely, we can just take the defaults and
press the "Review and Create"
button here and then we would be fine.
I think we just need to make sure
that we can access the SSH port and then
maybe we need to set up
the Minecraft defaults port that we can access this one.
Next step, networking.
We said we have a Minecraft-vnet.
That's probably just the name of it.
These seem all fine.
This is just the settings we had before.
Then management automatically shut down daily.
That's actually a good idea for a test server here.
We can even define when it should shut down.
This sounds good for me.
Let's do create.
It seems like this isn't our VM that is being created.
We just need to know how to connect to this one.
The deployment name we have here.
Deployment details we can see there and then we want
to mostly just connect to the SSH of that server.
What I need is the IP address to connect to that service
but we want deployment succeeded.
Overview, there is this go to resources.
That's the button you need to click then you get all of
the information about the server.
Now, we should be able to
just connect to that server with that IP address.
Most likely, have some kind of tool that you
can connect to and SSH service, I'm guessing.
I'm going to do that now.
Actually, let's do a new connection so I can show you that.
We need an SSH connection,
so it should look something like this or similar.
All you would need to do now is
provide the IP address in that part,
if you use putty,
you will have the same thing and then you
can specify the username that you created in the beginning.
If we press "Okay",
we should get a window like this,
then I am going to copy my password
from my password manager and now we are connected,
and this is now our connection to the just created server.
We are basically done with the minimal setup.
We have a running Ubuntu server here.
We can, for example, do htop,
and now we could start adding new software.
What I recommend heavily is that you actually open
some program where you can write down whatever you're doing.
You should write down that your IP address here is this one,
your log in name is that one.
Then you want to also write down
whatever customizations you did to the default.
It is very easy to forget things like this or after some time.
Maybe not if you set up your first server,
but as soon as you start working in a company or something,
and then you suddenly need to
have the information of three or four servers,
this is getting quite annoying to remember all of that stuff.
The part that is also very important to write down is especially,
if you install your stuff.
It is super, super helpful to have the commands here.
What we want to do first is we want to first generally
upgrade everything that hasn't been
upgraded since the install of the server.
Updates would be to get the latest sources.
Now it fetches all of the latest things from all over the web.
Now we have the latest packages on our local computer.
We do that so every time we do anything,
we have to look again in the Internet if there's something new.
We can see there is actually
something that has changed since then,
and we can see here there are some packages that needs
updating and we can just accept that,
and then it's going to install it.
For Minecraft, at least we need Java.
This should be done in a second.
We need to install Java from somewhere.
Where do we get that from?
One of the ways, and that's most likely the easiest we can do
is we can just look through this program.
This apt-get that we just used,
apt-cache, for example,
is one and then we can search.
Now we could search for, let's say, just Java.
This is all things that do contain the word, Java, inside.
There's a lot. We might need to be a little bit more specific.
This is already the Oracle OpenJDK version we have here available,
and that is pretty much what we can use now.
We can just install this one.
If you want to use a specific version
for whatever you are hosting,
you could download that specific version and we can see here
there is the normal JDK.
We have the jdk-headless.
We are just going to do apt-get install and then that version.
This needs some other packages, as you can see.
What I'm building here partially actually
use this rendering of images and stuff.
For my case, I don't actually know
if I maybe need features of the other ones.
This x11, for example,
stuff that might be necessary.
Let's write this one down because this is
something that is different now than what you might expect.
If something doesn't work,
we can look through the list of things we've done and see,
oh, that might be the reason why.
Then now it's installing,
and we should be good to go, basically.
We can see that we have OpenJDK installed 17.1.
Try to have the same version
installed on the server that you have on
your local machine because it could cause some strange problems.
Let me quickly see if we can install anything as I can show you.
I guess yeah, nginx would be a good thing.
We would do that with the same thing here.
We would do apt-get nginx install, I guess.
Then this one tells you also,
please install all of these things.
Let's go back here.
Let's create a new folder.
Let's call it Minecraft vanilla or just
vanilla and now we need Minecraft from somewhere.
For that, we just go to Minecraft server jar.
That should be sufficient. Minecraft.net,
downloads. We downloaded that.
We have that now in this folder.
Now we can see it is starting up.
It is now preparing the spawn area here.
This oftentimes starts slow because it needs to
prepare the chunks in the surrounding area.
The area was prepared and we can see it is now done
and in theory now we could connect to the server.
Step number 1 is we need to add this server into Minecraft,
copy the IP address,
go to Minecraft and paste that in here.
Done and we can see, does not work.
We can't connect to the server because
the port is still protected.
Now we need to look up, how do we actually open up
that port and there we can see there are,
that's exactly what we need.
We can see here that we have an SSH port that is open on
22 and this route right there is set up to deny everything else.
If you delete this one,
most likely all of the ports by default can be connected to.
This one is basically the Firewall in front of your server to make
sure even if your system is configured as yeah,
please connect, it still doesn't work and then
source port range is the default of Minecraft.
No, this is source port range,
so the port that somebody is connecting from.
That is any destination is we can leave any for now, I guess.
We are going to use the default priority and so on is fine.
We can name that Minecraft as something that should now,
as soon as the server is booted up,
allow us to connect to that server and mine, hello.
That works. This works, super awesome.
We have now a running Minecraft server that we
can then in the next step use for testing.
That is for this,
for the segment, for the first stream.
I hope you liked it.
[MUSIC]