In this tutorial, we will show you how to install MAAS on Ubuntu 20.04 LTS. For those of you who didn’t know, MAAS (Metal as a Service) offers cloud style provisioning for physical servers. It is open source and free to use, with commercial support available from Canonical. This tool is very useful for normal enterprises in managing virtualized infrastructure. MAAS is supported on Ubuntu, CentOS, Windows, and RedHat operating systems.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of MAAS on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
Install MAAS on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following
apt commands in the terminal.
sudo apt update sudo apt upgrade
Step 2. Installing MAAS on Ubuntu 20.04.
By default, MAAS not available on Ubuntu base repository. Now run the following command below to install MAAS using Snap Store:
sudo snap install maas
Step 3. Installing PostgreSQL.
By default, PostgreSQL is not available to install directly from the Debian 11 base repository. Now we add the official PostgreSQL repository to your system:
echo "deb [signed-by=/usr/share/keyrings/postgresql-keyring.gpg] http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql.list
Next, import the PostgreSQL signing key:
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /usr/share/keyrings/postgresql-keyring.gpg
Finally, run the following command below install PostgreSQL:
sudo apt update sudo apt install postgresql-13
After installing PostgreSQL, start the PostgreSQL service and enable it to start at system reboot:
sudo systemctl start postgresql sudo systemctl enable postgresql sudo systemctl status postgresql
After that, we will create a database for MAAS. Here the database is called
maas_db, user named
maasuser, the password is
sudo -u postgres psql create database maas_db; \q
Next, edit the file
sudo nano /etc/postgresql/10/main/pg_hba.conf
Add the following line:
host maas maaszeljko 0/0 md5
Save and close then, start initializing MAAS:
sudo maas init region+rack --database-uri "postgres://maasuser:[email protected]/maas_db"
Next, create the admin account for the web interface, run:
sudo maas createadmin
Step 4. Accessing MAAS Web Interface.
Once successfully installed, open your web browser and type the URL
https://your-ip-addrees. You should see the MAAS interface screen:
Congratulations! You have successfully installed MAAS. Thanks for using this tutorial for installing MAAS on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official MAAS website.