Categories: TutorialsUbuntu

How to Install MAAS on Ubuntu 20.04

Introduction

MAAS is an acronym for Metal As A Service. It is an open-source tool from Canonical that helps you deploy data centers from raw metal servers.

MAAS is supported on Ubuntu, CentOS, Windows, and RedHat operating systems. This tool is very useful for normal enterprises in managing virtualized infrastructure. This tutorial will guide you on how to install MAAS on Ubuntu 20.04 as you go through below.

Installing MAAS as snap package

Step 1 – Update packages by apt command:

$ sudo apt update

Sponsored

Step 2 – Let’s install MAAS:

$ sudo snap install maas

Output:

Initializing MAAS

For production, we need to Initialize MAAS. Firstly, we must check for updates:

$ sudo apt update -y

Output:

Then we will install PostgreSQL:

$ sudo apt install -y postgresql

Output:

Secondly, we will create a database for MAAS. Here the database is called maas, user named maasuser, the password is maas123:

$ sudo -u postgres psql

create user maasuser with encrypted password ‘maas123’;

create database maas;

grant all privileges on database maas to maasuser;

q

Sponsored

Thirdly, we need to edit the file /etc/postgresql/10/main/pg_hba.conf:

$ sudo nano /etc/postgresql/10/main/pg_hba.conf

Then add the following line:

host maas maaszeljko 0/0 md5

Save it and exit.

Now we will start initializing MAAS:

$ sudo maas init region+rack --database-uri "postgres://maasuser:maas123@localhost/maas"

Replace maasuser with your username just created, maas123 by your password.

To create the admin account for the web interface, run:

$ sudo maas createadmin

To check MAAS service status, run:

$ sudo maas status

Output:

Testing connection

Open your browser and access your MAAS URL

Conclusion

In this article, we guided you on how to install MAAS on Ubuntu 20.04.

Thanks for referring!

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

5 days ago