All Products
Search
Document Center

Simple Application Server:Deploy MantisBT

Last Updated:Jun 21, 2026

Bug management is a crucial part of the software development process. Mantis Bug Tracker (MantisBT) is an easy-to-use and robust open source bug tracking system that allows you to track and manage bugs. This topic describes how to deploy MantisBT on a simple application server.

Prerequisites

A simple application server is created based on a LAMP application image, and the password of the preset MySQL database is obtained. For more information, see Build a LAMP development environment.

Step 1: Download MantisBT

  1. Connect to a LAMP simple application server.

    For more information, see Connect to a Linux server.

  2. Run the following command to go to the website root directory:

    cd /<Website root directory>

    The website root directory is different in the LAMP 6.1.0 and LAMP 7.4 application images.

    • For LAMP 6.1.0 application image, the website root directory is /home/www/htdocs.

    • For LAMP 7.4 application image, the website root directory is /data/wwwroot/example.

    In this example, the LAMP 7.4 application image is used. Run the following command:

    cd /data/wwwroot/example
  3. Run the following command to download the MantisBT package:

    sudo wget https://downloads.sourceforge.net/project/mantisbt/mantis-stable/1.3.20/mantisbt-1.3.20.zip --no-check-certificate
  4. Run the following command to decompress the MantisBT package:

    sudo unzip mantisbt-1.3.20.zip
  5. Run the following command to move all extracted MantisBT files to the website root directory:

    sudo mv ./mantisbt-1.3.20/* ./
  6. To ensure system security, we recommend that you create a standard user to run MantisBT.

    In this example, a standard user named www is created.

    sudo useradd www
  7. Run the following command to change the owner of the files in the website root directory:

    sudo chown -R www:www ./*

Step 2: Install and log on to MantisBT

  1. On your computer, use a browser to access http://<Public IP address of the LAMP simple application server>/index.php.

    Note

    Obtain the public IP address of the LAMP simple application server by clicking the card of the server to go to the Overview page.

    1. Use a web browser to access http:///index.php. The page displays the Pre-Installation Check results, which include the PHP version (7.4.21), UTF-8 support, Safe Mode, and a check for residual old configuration files such as config_inc.php and custom_constants_inc.php. The status for all check items is GOOD, indicating that the current environment meets the installation requirements for MantisBT.

  2. In the Installation Options section, enter the database information for the LAMP server.

    Enter the database password in the Password (for Database) field. You can find this password by following the instructions in View application information. Use the following values for the other fields: select MySQL Improved for Type of Database, and enter localhost for Hostname, root for Username, and bugtracker for Database name.

  3. At the bottom of the page, click Install/Upgrade Database.

  4. After the page loads, scroll to the bottom of the Check and Install Database page and click create.

    The Installation Complete page appears, confirming that MantisBT was installed successfully. The page prompts you to log in as an administrator and click the create link to create your first project.

  5. Create a configuration file.

    1. In the Write Configuration File(s) section, copy the configuration code. Because the installer cannot automatically write to the config/config_inc.php file, you must add the generated code to it manually. This code includes settings like $g_hostname, $g_db_type, $g_database_name, $g_username, $g_db_password, $g_default_timezone, and $g_crypto_master_salt. Ensure the values match your environment.

    2. Run the following command to create a configuration file:

      sudo vi /data/wwwroot/example/config/config_inc.php
    3. Press the I key to enter the edit mode.

    4. Paste the configuration information obtained in 5.a into the file.

    5. Press the Esc key, enter :wq, and then press the Enter key to save the file.

  6. Enter http://<Public IP address of the LAMP simple application server>/login_page.php in your local browser. On the logon page of MantisBT, use the default account administrator and default password root to log on to MantisBT.

  7. In the upper-right corner of the page, click My Account to change the password of administrator.

    administrator is the default account. After you log in for the first time, we recommend that you change the password.

  8. Click Update User.

    You are redirected to the My View page on the Mantis Bug Tracker homepage. This confirms that you have successfully logged in as an administrator and can begin using MantisBT.