How to Install Ubuntu Server 22.04 [Step by Step]

ubuntu splash image

In this beginner friendly tutorial you will learn how to install Ubuntu Server 22.04 LTS. Ubuntu Server is currently one of the most popular Linux based server operating system. One of the biggest advantages to using Ubuntu Server is the stability that it brings. As an LTS release it will provide you five years of security updates and support by default. This will ensure your server is always secure and has the latest software. To start this tutorial make sure you have a virtual machine, an unused hard drive, or a empty partition to be able to install the operating system. If you want to learn how how to make a bootable installation flash drive click here. You will also have to download the Ubuntu Server ISO file. You can do that by clicking this link. Download Ubuntu Server 22.04 LTS

Language selection

ubuntu install window

The first step after booting into your Ubuntu Server or ISO is to select the language. Choose your language and then press “Enter”.

Update the installer

ubuntu install window

Next the installer will ask you if you want to update. I recommend updating to the latest installer. Select “Update to the new installer” then press “Enter”.

Keyboard configuration

ubuntu install window

After that you will be brought to the keyboard configuration page. If you are okay with the default (automatic) keyboard layout, select “Done” and press “Enter” to continue.

Installation type

ubuntu install window

This page will ask you if you want to do the default Ubuntu Server installation or the minimal version. I recommend the first option. Select your choice then select “Done” and press “Enter”.

Network configuration

ubuntu install window

Next we have the network configuration page. By default the installer will automatically detect your IP address settings. If you want to change it select the network adapter “ens18” and press “Enter”. I recommend just keeping it at its default settings. Select “Done” and press “Enter”.

Configure network proxy

ubuntu install window

Afterward you will be brought to the proxy configuration page. If you have a proxy you would like to use enter its information. Else just select “Done” and press “Enter”.

Guided storage configuration

ubuntu install window

Now we will need to setup the storage configuration. Luckily the installer does the hard part for us. If you are using a full physical or virtual disk, select “Use an entire disk” and press “Space” to mark it. Afterwards select “Done” and press “Enter” to proceed.

Review storage configuration

install ubuntu 22.024

This next page will show you a review of the storage configuration changes that will take place. Review the disk and partition names, and if everything looks correct proceed to the next step.

Confirm storage configuration

install ubuntu 22.024

Now you will be asked to confirm the storage configuration options. Select “Continue” and press “Enter” to proceed to the next step.

Setup Ubuntu user account

install ubuntu 22.024

Afterwards you will need to setup your user account. Enter a name, server name, username, and password. Then click on “Done” and press “Enter”.

Install SSH

install ubuntu 22.024

This step is optional. If you would like to enable the SSH server select “Install OpenSSH server” then press “Space” to mark it. Afterwards press “Done.” and press “Enter”.

Wait for system to be installed

install ubuntu 22.024

Now the system will begin installing. This can take anywhere from 20-30 mins to fully install Ubuntu Server. Wait for it to complete.

Installation complete

install ubuntu 22.024

Once the installation is complete you will see this screen. Select “Reboot Now” and press “Enter” to reboot the system and continue.

Unmount USB drive or ISO file

install ubuntu 22.024

After the system reboots you will get a message telling you to “Please remove the installation medium, than press Enter”. Remove your USB drive or ISO file if you are using a virtual machine. Once you have completed this step press “Enter” one final time to reboot.

Login to Ubuntu Server 22.04

install ubuntu 22.024

You will be brought to the Ubuntu Server login screen. Type in the credentials you created for your account. You will then be logged into the system. You have now successfully installed Ubuntu Server 22.04. If you are looking for other Linux tutorials check out our articles below.

Related Resources

View our list of The Top 5 Programming Languages to Learn in 2022.

Check our our The Best Mechanical Gaming Keyboards to Purchase in 2023 article.

How to Install VeraCrypt and Encrypt a Flash Drive on Ubuntu 22.04.

Click here to learn How to Install MySQL on Ubuntu Server 22.04 LTS.

View our Programming Articles and Tutorials.

Learn more cool things in Linux with our Linux Tutorials.

View all of our available online tools and converters at Formatswap.com.

How to install and configure Nginx – Ubuntu 20.04

splash image install nginx

What is Nginx? Nginx is a opensource web server designed with developers in mind. It was created by Igor Sysoev in 2004. It supports reverse proxying, caching, load balancing, RTMP media streaming, and many more advanced features. In this tutorial you will learn how to install and set up Nginx on Ubuntu 20.04.

Getting Started

Open your terminal prompt of choice.

Update your packages repository and packages.

sudo apt update && sudo apt upgrade -y

Then, install Nginx:

sudo apt install nginx

Setting up UFW Firewall (Optional – Highly Recommended)

If UFW is not enabled or configured, you will first need to enable it. You can check the status of the firewall using this command:

sudo ufw status

Then enable it with this command:

sudo ufw enable

If you are connected to your machine via SSH, make sure it is allowed through the firewall before disconnecting.

sudo ufw allow ssh

Next, we will be allowing Nginx through the firewall – there are 3 settings to be aware of when allowing the web server through. ‘Nginx Full’, ‘Nginx HTTP’, and ‘Nginx HTTPS’. ‘Nginx Full’ allows traffic through both HTTP (port 80) and HTTPS (port 443), whereas HTTP and HTTPS open only their respective ports. It is highly recommended that you only open port 80 to your local network or for non-secure pages (Does NOT process sensitive data!). You will only be able to use HTTPS if you have an SSL certificate – otherwise, your browser or any visitor to your site will get a ‘Site Not Secure’ warning. We will be using ‘Nginx HTTP’ for the purposes of the tutorial, but you may replace the text in the command with the other parameters for your respective use case.

sudo ufw allow 'Nginx HTTP'

If you have any other services running on the machine that you need external clients to have access to, such as port 8080 for a testing server, you may open them with the following command:

sudo ufw allow <port>/<method>
Example: sudo ufw allow 8080/tcp
Example: sudo ufw allow 8000/udp

Configuring Nginx

Finally, it’s time to set up your web server! We will be accessing the root directory for the site, where you will access and store your files. We will also be setting up the configuration for the enabled sites so you can access your site from the web. You should be able to see the default site when going to the URL/IP address of the server.

You can view the IP address of your server by typing the command:

ip a s

Your IP will be the address that is not the loopback address (127.0.0.1) and is usually the second “inet” address depending on your server’s configuration.

welcome to nginx splash screen

If everything is set up correctly, the above image should be the contents of the page.

Next, you will navigate to your site’s configuration to organize things properly and keep your install clean. First, you will disable your site’s default configuration. You can do this by typing the following command:

 sudo unlink /etc/nginx/sites-enabled/default

Then, add a new configuration file for your site. We will be using nano for this example.

sudo nano /etc/nginx/sites-available/<site-name>

And add the following text to the file.

server {
    listen 80;
    listen [::]:80;
    root /var/www/<site-name>;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
}

If you are also using SSL, you must insert the following below the first server block:

server {
    listen 443 ssl;
    root /var/www/<site-name>;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
}

Press CTRL+X and then press Y to save the file.

The server is almost set! You will need to enable the site to make it accessible. You can do this by typing the command:

sudo ln -s /etc/nginx/sites-available/<site-name> /etc/nginx/sites-enabled/

Then test your configuration using the command:

sudo nginx -t

If everything checks out, you can restart your Nginx process.

sudo systemctl restart nginx

Final Steps

You must add the directory to your server before you are able to store your files and make them available.

sudo mkdir /var/www/<site-name>

Lastly, create a an index page for your server and you are all set!

sudo nano /var/www/<site-name>/index.html

Here is some example code that you can use for testing to make sure everything is working:

<html>
<body>
    <h1>Hello, Nginx!</h1>
    <p>This is a test page for Nginx.</p>
</body>
</html>
test page for nginx

If you see this message, you have successfully set up your very own Nginx server on Ubuntu 20.04!

Related Resources

View our list of The Top 5 Programming Languages to Learn in 2022.

You may also like The 5 Best Linux Distributions to Install in 2022.

Setting up MySQL on Ubuntu 22.04

View our Programming Articles and Tutorials.

Learn more cool things in Linux with our Linux Tutorials.

View all of our available online tools and converters at Formatswap.com.