Developer Tools AWS

MantisBT on AWS User Guide

| Product: MantisBT on AWS

Overview

MantisBT (Mantis Bug Tracker) is a long established open source, web based issue and bug tracker used by software teams worldwide. It captures bugs and feature requests, routes them through configurable per project workflows, notifies stakeholders by email, and tracks every issue through to resolution with full history, custom fields, saved filters and a REST plus SOAP API.

This image runs MantisBT behind nginx, with PHP FPM 8.3 (OPcache enabled) and a bundled MariaDB database engine. The install wizard has already been run and removed, and MantisBT's well known default administrator / root login has been rotated away, so you land directly on the sign in page with a hardened application.

MantisBT stores its issues, notes and file attachments in the database. The MariaDB data directory lives on a dedicated, independently resizable EBS data volume mounted at /data (bind mounted onto /var/lib/mysql), kept separate from the operating system disk, so you can grow your tracker store without touching the root volume. MariaDB listens on loopback 127.0.0.1:3306 only and is never exposed to the network.

There is no first run setup wizard to step through. The MantisBT administrator password is generated on the first boot of every deployed instance, so no two instances launched from the same Amazon Machine Image ever share credentials. The initial administrator password is written to /root/mantisbt-credentials.txt with mode 0600 so that only the root user can read it.

MantisBT sign-in

Connecting to your instance

Connect over SSH as the default login user for your operating system variant. MantisBT itself is served on port 80 and you sign in as the administrator user in the browser.

OS variant SSH login user Notes
Ubuntu 24.04 ubuntu nginx + php8.3-fpm + mariadb

Prerequisites

Before you deploy this image you need:

  • An Amazon Web Services account where you can launch EC2 instances
  • IAM permissions to launch instances, create security groups, and subscribe to AWS Marketplace products
  • An EC2 key pair in the target Region for SSH access to the instance
  • A VPC and subnet in the target Region, with a security group allowing inbound port 22 from your management network and inbound ports 80 and 443 from the networks your users will use
  • The AWS CLI (version 2) installed locally if you plan to deploy from the command line

Step 1: Launch the Instance from the AWS Marketplace

  1. Open the product page in AWS Marketplace and choose Continue to Subscribe, then Continue to Configuration.
  2. Select the software version and your Region, then choose Continue to Launch.
  3. Under Choose Action select Launch through EC2.
  4. Pick an instance type. The recommended type is m5.large; t3.medium is sufficient for small teams.
  5. Select your VPC, subnet, and key pair.
  6. Attach a security group that allows inbound TCP 22 from your management network and TCP 80 and 443 from your user networks.
  7. Choose Launch.

Step 2: Launch the Instance from the AWS CLI

You can also launch from the command line. Replace the AMI ID with the one shown on the Marketplace launch page for your Region, and set your key pair, security group and subnet.

aws ec2 run-instances \
  --image-id ami-0123456789abcdef0 \
  --instance-type m5.large \
  --key-name my-keypair \
  --security-group-ids sg-0123456789abcdef0 \
  --subnet-id subnet-0123456789abcdef0 \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=mantisbt}]'

Wait for the instance to reach the running state and pass its status checks, then note its public IP address.

Step 3: Connect and Retrieve the Initial Credentials

SSH to the instance as the login user for your OS variant (for the Ubuntu variant, ubuntu):

ssh -i my-keypair.pem ubuntu@<public-ip>

Retrieve the per instance administrator password that first boot generated:

sudo cat /root/mantisbt-credentials.txt

The file lists the sign in URL, the administrator username, the generated administrator password, and the internal database credentials. These values are unique to this instance.

Step 4: Verify the Service is Running

On the instance, confirm nginx, PHP FPM and MariaDB are active and that MantisBT is serving:

systemctl is-active nginx php8.3-fpm mariadb

Check the unauthenticated health endpoint and the sign in page respond:

curl -s http://127.0.0.1/healthz
curl -s -o /dev/null -w 'login page: HTTP %{http_code}\n' http://127.0.0.1/login_page.php

A 200 from the login page confirms the web stack is serving MantisBT.

Step 5: Confirm the Data Volume

The MariaDB data directory lives on the dedicated EBS data volume mounted at /data and bind mounted onto /var/lib/mysql. Confirm both mounts are present:

mountpoint /data
findmnt /var/lib/mysql
df -h /data

Because the database is on its own volume, you can grow it with a standard EBS volume resize and an ext4 grow, independently of the root disk.

Step 6: First Login

Open http://<public-ip>/ in your browser. Sign in as the administrator user with the password from /root/mantisbt-credentials.txt.

MantisBT sign-in

On first sign in MantisBT prompts you to create a project. Give it a name (for example, Web Platform) and choose Add Project. Once a project exists you can log issues against it.

Step 7: Report and Track Issues

Choose Report Issue from the menu, pick a category, set severity, reproducibility and priority, enter a summary and description, and choose Submit Issue.

MantisBT report issue

The issue is saved and opens in the issue view, where you can add notes, change status through the workflow, assign it to a user, attach files and relate it to other issues.

MantisBT issue details

The View Issues page lists every issue with its severity, status and priority, and supports saved filters, CSV and Excel export, and printable reports.

MantisBT issue list

Step 8: Configure Email Notifications

MantisBT sends notification email inline. Under Manage > Configuration you can set the administrator email and the from address, and choose which events notify which roles. To relay through an external SMTP server, edit /var/www/mantisbt/config/config_inc.php and set the $g_phpMailer_method, $g_smtp_host, $g_smtp_username and $g_smtp_password options, then reload PHP FPM:

sudo systemctl reload php8.3-fpm

Step 9: Enable HTTPS (Recommended)

For production use, put MantisBT behind TLS. Point a DNS record at the instance, then install a certificate with Certbot:

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.com

Certbot obtains and installs the certificate and configures nginx to redirect HTTP to HTTPS. After enabling a domain, set $g_path in config/config_inc.php to your https://your-domain/ URL so MantisBT builds correct absolute links.

Step 10: Backup and Maintenance

Back up the MantisBT database regularly. The bundled MariaDB is reachable on the box over the local socket as root, so no password is needed:

sudo mariadb-dump --single-transaction bugtracker > mantisbt-backup.sql

Store the resulting dump off the instance (for example in Amazon S3). Because the data directory is on a dedicated EBS volume you can also take EBS snapshots for point in time recovery. Keep the operating system patched with regular apt updates during a maintenance window.

Support

cloudimg provides 24/7 technical support for this MantisBT image by email at support@cloudimg.co.uk and by live chat. Our engineers assist with MantisBT deployment and configuration, email notification setup, workflow, project and custom field configuration, user and access level management, version upgrades, performance tuning, MariaDB database administration, and EBS data volume management. Critical issues receive a one hour average response time. For billing or refund requests, contact support@cloudimg.co.uk with your instance ID and AWS account details.