Install Mezzanine CMS on Ubuntu 18.04 or 20.04

Updated on November 22, 2021
Install Mezzanine CMS on Ubuntu 18.04 or 20.04 header image


Mezzanine CMS is an open-source CMS (Content Management System) primarily used for developing modern websites, and it is based on the Django framework. It is powerful, with an intuitive interface for managing a variety of content types. Some popular features are:

  • WYSIWYG editing capabilities.
  • Drag-and-drop HTML5 form builder and page ordering.
  • In-line page editing.
  • Blogging engine.
  • Scheduled publishing.
  • CSV data export.
  • E-commerce/Shopping cart module.
  • One-step migration from other blogging engines.
  • Over 35 languages
  • Multi-lingual sites

All the listed functionalities are available by default, and you don't need any additional modules or add-ons to use them. In this article, you will learn how to install Mezzanine CMS on Ubuntu 20.04 server.


1. Install Python

Update your server packages.

$ sudo apt update

Install Python 3 and pip3.

$ sudo apt install python3 python3-pip python3-dev -y

Verify the Python installation.

$ python3 -V

Verify pip3 installation.

$ pip3 -V

2. Install and Configure MySQL Database

Install the MySQL database server.

$ sudo apt install mysql-server -y

Check the status of MySQL service.

$ sudo systemctl status mysql

Enable automatic running of MySQL service upon system reboot.

$ sudo systemctl enable mysql

Log in to MySQL shell. At the password prompt, just press Enter to continue.

$ sudo mysql -u root -p

Create a MySQL database named mezzanine.


Create a database user named mezzanine with a password. Change StrongPassword to a strong password.

CREATE USER mezzanine@localhost IDENTIFIED BY 'StrongPassword';

Grant the user full access to the database.

GRANT ALL ON mezzanine.* TO 'mezzanine'@'localhost' WITH GRANT OPTION;

Flush the database privileges to save the changes.


Exit MySQL shell.


3. Set up Python Virtual Environment

Install the Python Virtual Environment.

$ sudo pip3 install virtualenv

Create a Mezzanine user.

$ sudo adduser mezzanine

Add the user to the sudo group.

$ sudo usermod -aG sudo mezzanine

Log in as the mezzanine user.

$ su - mezzanine

Create a new Virtual Environment.

$ virtualenv mezzanine

Activate the virtual environment.

$ source mezzanine/bin/activate

4. Install and Configure Mezzanine CMS

Install the Mezzanine CMS in the new virtual environment.

$ pip install mezzanine

Create a new Mezzanine App/Project.

$ mezzanine-project my_project

Navigate to the project directory.

$ cd my_project

Edit the settings file to define the database server for the application.

$ sudo nano my_project/

Modify the following code in the Databases section and ensure you modify StrongPassword with your password, then save and close the file:

    "default": {
        "ENGINE": "django.db.backends.mysql",
        "NAME": "mezzanine",
        "USER": "mezzanine",
        "PASSWORD": "StrongPassword",
        "HOST": "localhost",
        "PORT": "3306",

Migrate the database schema.

$ python makemigrations

$ python migrate

Create a system administrator.

$ python createsuperuser

Edit and modify hosts.

$ sudo nano my_project/

The following line should look as shown, add your server IP address to the array, for example, Then, save and close the file:

ALLOWED_HOSTS = ["localhost", "", "::1", ""]

Run the Mezzanine server.

$ python runserver

5. Access Mezzanine CMS Web Interface

To access the Mezzanine CMS Web Interface, go to your browser and visit http://Server_IP:8000. For example:


You have successfully installed Mezzanine CMS on your server and can access the main Dashboard. You can now log in and begin developing your websites.

More Information

To learn more about using Mezzanine CMS, go to the official documentation page.