Get Started with Microsoft Azure today by following this simple tutorial

Azfar Bakht
7 min readMay 8, 2021

By the end of this tutorial, you will have learned How to get a free Azure account, create your first Virtual Machine, Allow internet access to that machine and deploy your very own Next Cloud solution on it which will enable you to store data, set up emails and calendars, chat with users you allow and much more while maintaining total control over your data! If you know the basics, feel free to skip ahead.

With the rapid increase in cloud technologies and wide acceptance of Cloud Services around the globe, it has become more important than ever to learn about them. For a beginner, however it can get quite overwhelming. Which cloud service provider to choose from, where to start and what to learn. Well the secret to becoming a good cloud practitioner is by… wait for it… practice!

Getting Started With Microsoft Azure

Microsoft Azure is one of the world’s leading cloud service providers with data-centers around the world. They offer multiple cloud solutions including but not limited to storage, compute power, database management systems, app hosting, AI, ML and much more.

The primary benefit of using a cloud service provider is the “Pay-as-you-go” model which allows businesses to save money by paying only for the resources that they use. This also means, starting a new business has become a whole lot easier. Instead of CapEX or Capital Expenditure where business owners had to invest hefty sums in setting up the technological infrastructure, they can move to Operational Expenditure where they can let the CSP worry about setting things up and handling the networking and security.

Get your Free Azure Account

Microsoft Azure gives users a free account which includes $100 in credits along with 12 Months of free resources. Details of these resources can be found at their website. In order to create your free account, head on over to this link and click on “Try Azure for Free”

The sign up process is fairly simple if you already have a Microsoft Account. Students can sign-up using their University MS Office Accounts to avail Microsoft’s student offer whereas other users can enter their personal account. Please note that non-student users may have to enter their credit card details in order to avail the free Azure subscription.

Creating a Virtual Machine

The first step in this process is going to be the creation of a Virtual Machine. According to Microsoft

A virtual machine, commonly shortened to just VM, is no different than any other physical computer like a laptop, smart phone, or server. It has a CPU, memory, disks to store your files, and can connect to the internet if needed. While the parts that make up your computer (called hardware) are physical and tangible, VMs are often thought of as virtual computers or software-defined computers within physical servers, existing only as code.

But how do we create one? Simple. In your Microsoft Azure Portal, head on over to Home > Virtual Machines and click on Add then click on Virtual Machine

The subscription is an important part of using Cloud Services. A Subscription can contain various resource groups and each resource group will in-turn contain all your resources such as VM’s, Databases and so on. You can find out more from the Microsoft Azure Documentation

source : Microsoft Documentation

Once you click on add, you’ll get a screen looking something like this. I have already filled out the values but you don’t have to copy them. You can name your Resource group and VM anything you like but it’s preferable to keep the name relevant to your organization.

Although SSH public key is the recommended Authentication type, we’ll be moving forward with the Password option for this demo. Enter your Username and Password and write it down with you because you’ll be needing it to access your VM later-on.

In the Public inbound Ports option, we have enabled HTTP and HTTPS, that is Ports 80 and 443 respectively. This will allow you to access your Next Cloud Solution from anywhere on the globe through an internet connection! Once you’re ready, click on Review + create.

This next step might take a little while but once it’s done, you’ll see a screen resembling this. You can click on create and wait while Azure tells you that your Deployment has been successful

Setting up the Serial Console

Once your deployment is complete, you can click on “Go to Resources” to get started. What this means is that your virtual machine has successfully been created and you can start working on it using the Serial Console. You can access the serial console by scrolling through the side menu on your left, all the way down to “Support + troubleshooting”. But before we get started with that, we’ll need to make some arrangements for Serial Console to work. So head on over to Boot Diagnostics in the same section and click on settings.

Home > CreateVM > YourVMname > Boot diagnostics

The option selected by default is the “Enable with Managed Storage account” however this option does not support serial console yet so we will shift to “Enable with custom storage account.” If you don’t have a custom storage account, you can create a new one by clicking on Create new. Click save and go back to your VM by clicking its name on the top. Now scroll down to the serial console and click on it.

Image of Virtual Machine’s Serial Console

Installing Nextcloud

Once the serial console is ready, click anywhere inside it and press enter. You will now have to login to your VM using the Username and Password that you provided earlier.

Now enter she following commands

sudo apt-get update

followed by

sudo apt-get install snap

Snap is a package manager for linux which will allow us to install nextcloud on our virtual machine.

sudo snap install nextcloud

Configuring DNS

Our virtual Machine has successfully been locked and loaded with all the tools it’ll need to deploy our solution. The next step is to configure our DNS and create a link through which, our deployed solution may be accessed.

Head on over to your Virtual Machine’s overview page and click on DNS name

Your DNS name can be anything you want. But it needs to be unique to the network. So let’s try something and see how it pans out.

We need to set our DNS assignment to Static, and then decide a name for our DNS label. The name “azfarbakht.eastus.cloudapp.azure.com” seems to be unique, so we can take it forward. You can now navigate to your Virtual Machine and then to your Serial Console

Setting up Next Cloud

Setting up your Next Cloud solution requires two simple steps. One from the console and the other from your browser. I will now show you both of them in succession.

In your Serial Console, enter the following command

sudo nextcloud.enable-https lets-encrypt

Once you enter the command, it will ask for your confirmation, you can enter y to confirm. Then you can enter a recovery email. Now enter the DNS name that you configured earlier. In my case, it will be azfarbakht.eastus.cloudapp.azure.com. If you have your own domain name, you can enter it here as well. Be sure to separate all domain names with spaces. Press Enter.

Now open your browser and go to the domain or DNS link that you entered earlier. You will see a setup page just like the one below.

Enter your desired username and password and click Finish setup to complete the setup of your nextcloud solution. This is what your very own Next Cloud solution looks like.

Congratulations on completing your tutorial. If you want to learn more about Microsoft Azure, then I recommend heading over to the Microsoft Learn website and starting the Azure Fundamentals learning path. If you have any questions regarding this tutorial, feel free to drop a comment below.

--

--

Azfar Bakht

Hi there! I'm a final year CS student with a keen interest in The Cloud. I also have a profound love for cats and all other fluffy furrballs!