Enabling MAAS (deb/2.9/CLI)

Welcome to the installation guide and compact tutorial for MAAS. This pre-flight checklist will help you get MAAS running quickly. Collapsible sections unclutter the page, and detailed doc references help you dig deeper. Quick questions kick off each section, help you skip to your desired topic.

Start with the links above: Choose your preferred install method (snap vs. debian packages), interface (web UI vs. command line interface/CLI), and version (2.7 vs. 2.8) – then select the matching link to instantly customize this material.

Quick questions you may have:

Upgrade an existing MAAS

Installing and configuring MAAS

Installing and configuring the MAAS 2.8 snap is relatively straightforward, but there are choices to make. For example, you’ll want to decide whether to install a test/proof-of-concept configuration, or just go ahead and set up a production configuration. Use this section to help you get MAAS up and running, so that you can start adding and deploying machines.

Quick questions you may have:

Preparing to install MAAS

Preparing for MAAS requires a little up-front work. First, you need to confirm that your intended host meets the hardware requirements for MAAS; then there are a few setup steps you’ll want to complete to prevent delays later on.

Quick questions you might have:

MAAS host requirements

The minimum requirements for your MAAS host(s) vary widely, depending on local implementation and usage. Below, you will find resource estimates based on both the MAAS components and the Ubuntu Server operating system. We consider both a test configuration (for proof of concept) and a production environment.

Requirements for a test environment

Here is a proof-of-concept scenario, with all MAAS components installed on a single host. This scenario assumes two complete sets of images (latest two Ubuntu LTS releases) for a single architecture (amd64).

| | Memory (MB) | CPU (GHz) | Disk (GB) |
| Region controller (minus PostgreSQL) | 512 | 0.5 | 5 |
| PostgreSQL | 512 | 0.5 | 5 |
| Rack controller | 512 | 0.5 | 5 |
| Ubuntu Server (including logs)| 512 | 0.5 | 5 |

Based on this table, the approximate requirements for this scenario are 2 GB memory, 2 GHz CPU, and 20 GB of disk space.

Requirements for a production environment

Here is a production scenario designed to handle a high number of sustained client connections. This scenario implements both high availability (region and rack) and load balancing (region). MAAS reserves extra space for images (database and rack controller), while some images, such as those for Microsoft Windows, may require a lot more – so plan accordingly.

| | Memory (MB) | CPU (GHz) | Disk (GB) |
| Region controller (minus PostgreSQL) | 2048 | 2.0 | 5 |
| PostgreSQL | 2048 | 2.0 | 20 |
| Rack controller | 2048 | 2.0 | 20 |
| Ubuntu Server (including logs)| 512 | 0.5 | 5 |

So, based on the above, the approximate requirements for this scenario are:

  • A region controller (including PostgreSQL) installed on one host, with 4.5 GB memory, 4.5 GHz CPU, and 45 GB of disk space.
  • A duplicate region controller (including PostgreSQL) on a second host, also with 4.5 GB memory, 4.5 GHz CPU, and 45 GB of disk space.
  • A rack controller installed on a third host, with 2.5 GB memory, 2.5 GHz CPU, and 40 GB of disk space.
  • A duplicate rack controller on a fourth host, also with 2.5 GB memory, 2.5 GHz CPU, and 40 GB of disk space.

The tables above refer to MAAS infrastructure only. They do not cover the resources needed by subsequently-added nodes. Note that machines should have IPMI-based BMC controllers for power cycling, see Power management for more details.

Some examples of factors that influence hardware specifications include:

  • the number of connecting clients (client activity)
  • how you decide to distribute services
  • whether or not you use high availability/load balancing.
  • the number of images that you choose to store (disk space affecting PostgreSQL and the rack controller)

Also, this discussion does not take into account a possible local image mirror, which would be a large consumer of disk space.

One rack controller should only service 1000 machines or less, regardless of how you distribute them across subnets. There is no load balancing at the rack level, so you will need additional, independent rack controllers. Each controller must service its own subnet(s).

Setting up for MAAS

There are a few preliminary steps that will smooth out your MAAS usage:

  • Disable bind9 - If bind9 is running on the system where you’re going to host MAAS, you need to disable it. The bind9 daemon interferes with MAAS, producing some unusual and hard-to-debug errors. You can see if it’s running with the command ps aux | grep named.
  • Set your machines to netboot - MAAS uses PXE to remotely boot your machines via their NICs, so you’ll need to have your machines set to netboot, or MAAS can’t access and use them.
  • Turn on machines that should auto-enlist - If you want MAAS to find and enlist your machines automatically, you need to turn them on.
  • OR gather the UUIDs and MAC addresses for your machines - If you’re going to manually enroll machines, you’ll need this information.
  • AND determine the power type - If you’re manually enrolling machines, you’ll also want to be able to tell MAAS how power them up. Follow the link to learn more about power types.

If you have installed bind9 or have it running, you will need to uninstall it before installing MAAS. You can check with ps aux | grep named to see if it’s running. The bind9 daemon interferes with MAAS operation and creates a number of unusual, hard-to-debug errors – but don’t worry, MAAS provides DNS and can work with existing DNS servers.

Installing MAAS

Initialising MAAS

Example of MAAS initialisation

The following demonstrates the region+rack mode, a popular initialisation choice for MAAS:

sudo maas init region+rack

maas will ask for the MAAS URL:

MAAS URL [default=]:

If you also need to create an admin user, you can use:

sudo maas createadmin

which takes you through the following exchange:

Create first admin account:       
Username: admin
Password: ******
Again: ******
Email: admin@example.com
Import SSH keys [] (lp:user-id or gh:user-id): lp:petermatulis

You will use the username and password created above to access the web UI. If you enter a Launchpad or GitHub account name with associated SSH key, MAAS will import them automatically.


All run modes (except none) prompt for a MAAS URL, interpreted differently depending on the mode:

  • region: Used to create a new region controller.
  • rack: Used to locate the region controller.

Shared secret

The ‘rack’ and ‘region+rack’ modes will additionally ask for a shared secret that will allow the new rack controller to register with the region controller.

Reinitialising MAAS

It is also possible to re-initialise MAAS to switch modes. For example, to switch from rack to region:

sudo maas init region

Additional `init` options

The init command can takes optional arguments. To list them, as well as read a brief description of each, you can enter:

sudo maas init --help

snap-ui-2-8 snap-cli-2-8 -->

Logging in to MAAS

MAAS post-install configuration

Downloading OS images for MAAS

Adding admin SSH keys to MAAS

Setting up MAAS networking

Importing SSH keys to machines

Adding physical machines

Adding virtual machines

Commissioning machines

Acquiring machines

Deploying machines

SSH access to deployed machines

Releasing deployed machines

Marking machines as broken

As explained in the Introduction, the installation of MAAS consists of the installation of a rack controller and a region controller which, in turn, provide a multitude of services. Go ahead and install MAAS!

Access the web UI

You will be using the web UI so now is the time to log in and take a look around! Proceed to the web UI now. This will involve the creation of an administrator user. Notice how the web UI (API server) is accessed via port 5240 and not port 80.

Although the web UI may be accessed via port 80, this is not guaranteed to work in future versions of MAAS.

The initial access of the web UI will kick off an optional configuration journey whose purpose is to get the essential aspects of MAAS configured right away.

Completing the journey will remove the need to perform equivalent deeds below so you’ll need to adjust accordingly.


For zones, many people won’t need to change anything as a default zone is provided out of the box. However, they are still worth reading about, especially if the default one does not suffice.


Firstly, in terms of IP addresses, understand what a reserved range is by reading Concepts and terms. Create one (not reserved dynamic range) if you need one.

Secondly, configure a default gateway and a nameserver that your machines will use. See Networking for how to do this.

Import boot images

Read up on images as they’re quite important. Continue reading until you have discovered how to import them. You will see that you have the choice to use the CLI to do this. Either way: achievement unlocked!

The import process can take a while. Consider moving on and coming back. Just ensure that the import has completed prior to adding a machine.

Once installed, by default, MAAS will begin downloading images for the latest Ubuntu LTS.

Access the MAAS CLI

Even if you’ve imported images with the web UI, it would be wise (and cool?) to give the CLI a spin in case you ever need to use it later. Although we strive to make the web UI feature-equivalent to the CLI, some things can still only be done with the CLI.

Enable DHCP

You won’t get far without DHCP since it is required in order to make PXE work, which, in turn, is necessary to introduce your systems to MAAS. But you knew that. Anyway, DHCP is installed - it just needs enabling. Read about DHCP and continue until you have enabled it.

Users and SSH keys

You already have an administrative user but MAAS can also have regular users (who log in to the interface or use the CLI). What users you create depends on how you intend to use MAAS.

Additionally, in order for a user to log into a MAAS-deployed machine that user must have their public SSH key installed on it.

Study User accounts to learn about how to create more users and how to add their public SSH keys to MAAS. Once that’s done, every deployed machine will automatically have that key installed.

Add a machine

It’s time to actually do something! MAAS manages machines, but at this time it doesn’t have any. Go forth and add a machine now. Obviously, you need a spare physical system (but KVM works too). In the web UI, confirm that the import of images has finished!

Go to the ‘Machines’ page in the web UI. A successfully added machine will soon appear there with a status of New. It will also have a funny name. Whatever, you’re still a rock star!

Edit power type

A machine needs to power cycle while being managed by MAAS. The next step is therefore to tell MAAS how to do this. That is, you need to edit the power type of the machine’s BMC.

Commission a machine

Commissioning a machine involves MAAS testing it to ensure that it is able to communicate properly with the region API server. Commission your machine now.

Deploy a machine

Lots of folks would have Juju take over at this point. Juju acts as a sort of command & control centre for adding services/applications on top of MAAS machines (among other “clouds”). If you’re just not there and/or you want to quickly test things out you can use the web UI to deploy a machine directly.

SSH to the machine

If you imported your SSH key then you should now be able to ssh to the deployed machine by connecting to the ‘ubuntu’ account. The machine’s page in the web UI will inform you of its IP address. Mission accomplished!