...

How to deploy bugzilla on ubuntu vpsThis article provides a step-by-step guide detailing how to deploy Bugzilla on Ubuntu VPS.

What is Bugzilla?

Bugzilla is an open-source bug tracking and issue management system developed by Mozilla. It is widely used by software development teams to track bugs, enhancements, and other project issues throughout the development lifecycle.

πŸ” Key Features of Bugzilla:

  • Issue Tracking: Report, assign, prioritize, and resolve bugs or tasks.
  • Advanced Search & Filters: Powerful query builder for custom reports.
  • Email Notifications: Automatic updates when issues change status.
  • Custom Workflows: Tailor issue states and transitions to match your team’s process.
  • Access Control: User roles and permissions for security and organization.
  • Time Tracking: Log and estimate time for issues.
  • Extensibility: Supports plugins, custom fields, and integration with other tools.

βœ… Who Uses Bugzilla?

  • Software Development Teams (for tracking bugs and feature requests)
  • QA Teams (for reporting and verifying fixes)
  • Project Managers (for milestone and progress tracking)

πŸ› οΈ Typical Use Case:

  1. πŸ”ŽA tester finds a bug and reports it in Bugzilla.
  2. πŸ› οΈA developer is assigned the bug and resolves it.
  3. βœ…The fix is tested and the issue is marked as verified/closed.

Bugzilla is highly stable, scalable, and has been used by major organizations like Mozilla, Apache, GNOME, and the Linux kernel community.

Pre-requisites

This guide assumes you are starting with a fresh Ubuntu VPS (preferably Ubuntu 20.04 or Ubuntu 22.04) with root or sudo access.
Launch 100% ssd ubuntu vps from $2. 49/mo!

How to Deploy Bugzilla on Ubuntu VPS

To install Bugzilla on Ubuntu VPS, follow the steps below:

  1. Update System Packages

    Login via SSH as root and run the following commands:

    sudo apt update && sudo apt upgrade -y
    
  2. Install Required Packages

    Bugzilla requires several dependencies including Perl modules, Apache, and MySQL/MariaDB.

    sudo apt install apache2 mariadb-server libapache2-mod-perl2 -y
    
  3. Install Perl and Perl Modules

    Bugzilla uses Perl heavily, so install Perl and all necessary modules.

    sudo apt install perl libdatetime-perl libdbi-perl libdbd-mysql-perl \
    libtemplate-perl libmime-tools-perl libemail-sender-perl \
    libemail-mime-perl liburi-perl liblist-moreutils-perl \
    libgd-perl libchart-perl libxml-parser-perl libsoap-lite-perl \
    libjson-pp-perl libjson-xs-perl libappconfig-perl libencode-detect-perl -y
    
  4. Configure MariaDB for Bugzilla

    1. Secure the database installation:
      sudo mysql_secure_installation
      

      Use strong password and answer prompts accordingly.

    2. Create a Bugzilla database and user:
      sudo mysql -u root -p
      

      Inside MySQL shell:

      CREATE DATABASE bugzilla CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
      CREATE USER 'bugzillauser'@'localhost' IDENTIFIED BY 'strongpassword';
      GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzillauser'@'localhost';
      FLUSH PRIVILEGES;
      EXIT;
      
  5. Download and Install Bugzilla

    cd /var/www/html
    sudo wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla/5.0.6/bugzilla-5.0.6.tar.gz
    sudo tar -xvzf bugzilla-5.0.6.tar.gz
    sudo mv bugzilla-5.0.6 bugzilla
    cd bugzilla
    
  6. Install Bugzilla Perl Dependencies

    Bugzilla comes with a script to check and install all required Perl modules:

    sudo apt install build-essential -y
    sudo perl install-module.pl --all
    

    If any modules are missing or fail to install, use:

    sudo cpan install Module::Name
    
  7. Configure Bugzilla

    Run Bugzilla’s setup check:

    ./checksetup.pl
    

    This will generate localconfig. Open it and configure:

    sudo nano localconfig
    

    Set the following:

    $db_name = 'bugzilla';
    $db_user = 'bugzillauser';
    $db_pass = 'strongpassword';
    

    Then run checksetup.pl again:

    ./checksetup.pl
    

    You’ll be prompted to create an admin account.

  8. Configure Apache for Bugzilla

    Create a new Apache config file:

    sudo nano /etc/apache2/sites-available/bugzilla.conf
    

    Paste the following:

    <VirtualHost *:80>
        ServerAdmin admin@example.com
        DocumentRoot /var/www/html/bugzilla
        ServerName bugzilla.example.com
    
        <Directory /var/www/html/bugzilla>
            AddHandler cgi-script .cgi
            Options +ExecCGI
            DirectoryIndex index.cgi
            AllowOverride All
            Require all granted
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/bugzilla_error.log
        CustomLog ${APACHE_LOG_DIR}/bugzilla_access.log combined
    </VirtualHost>
    
    <VirtualHost *:443>
        ServerAdmin admin@example.com
        DocumentRoot /var/www/html/bugzilla
        ServerName bugzilla.example.com
    
        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/bugzilla.example.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/bugzilla.example.com/privkey.pem
    
        <Directory /var/www/html/bugzilla>
            AddHandler cgi-script .cgi
            Options +ExecCGI
            DirectoryIndex index.cgi
            AllowOverride All
            Require all granted
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/bugzilla_ssl_error.log
        CustomLog ${APACHE_LOG_DIR}/bugzilla_ssl_access.log combined
    </VirtualHost>
    

    Enable the config and necessary modules:

    sudo a2ensite bugzilla.conf
    sudo a2enmod cgi
    sudo systemctl restart apache2
    
  9. Secure With HTTPS (Let’s Encrypt)

    sudo apt install certbot python3-certbot-apache -y
    sudo certbot --apache -d bugzilla.example.com
    

    Your Bugzilla installation is now secured by SSL with automatic renewal!

  10. Access Bugzilla

    Visit http://your-server-ip/bugzilla or your configured domain (e.g., http://bugzilla.example.com).

    Login with the admin credentials you created.

Launch 100% ssd ubuntu vps from $2. 49/mo!

Conclusion

You now know how to deploy Bugzilla on Ubuntu VPS. Better yet, Bugzilla is now installed and running on your Ubuntu VPS!

Next: πŸ› οΈ Comprehensive Bugzilla Administration Guide

Since you are now familiar with how to deploy Bugzilla on Ubuntu VPS, you’ll want to have a look at our Comprehensive Bugzilla Administration Guide. This will give you essential insights for managing your Bugzilla installation efficiently after deployment:

How to Access the Bugzilla Admin Panel

  1. Visit your Bugzilla instance (e.g., http://yourdomain.com/bugzilla)
  2. Log in as the administrator (created during checksetup.pl)
  3. Click β€œAdministration” in the top navigation bar

Bugzilla admin panel

Here’s our comprehensive Bugzilla administration guide:

  1. Managing Users

    1. Add a New User:

      • Go to Administration > Users > Add User
      • Fill in:
      • Email
      • Full Name
      • Password
      • Assign to a group if needed
    2. User Permissions:

      • You can make a user an administrator by enabling the admin group
      • Control module access via group membership
    3. Disable a User:

      • Go to Users > Search
      • Edit the user
      • Uncheck Enabled
  2. Creating and Managing Products

    Products represent a software project or module.

    1. Add a Product:

      • Go to Administration > Products > Add
      • Set:
      • Product name
      • Description
      • Default assignee
      • Classification (optional)
    2. Components:

      • After creating a product, add components (e.g., β€œFrontend”, β€œBackend”)
      • Each component can have a default owner
  3. Custom Fields

    1. Add Custom Fields:

      • Go to Administration > Custom Fields
      • Choose type: text, dropdown, checkbox, etc.
      • Set visibility, required status, and associated products
  4. Managing Workflows

    Bug Status Workflow:

    • Go to Administration > Workflow
    • Customize how bugs move between statuses (e.g., NEW β†’ ASSIGNED β†’ RESOLVED)

    You can:

    • Add/remove transitions
    • Require comments for specific transitions
    • Change which resolutions are available
  5. Parameters (Global Configuration)

    1. Access via:

      Administration > Parameters

      Some critical sections include:

    2. Email Settings

      • Set mail delivery method (sendmail, smtp)
      • Configure bounce prevention and bugmail preferences
    3. Bug Fields

      • Set default statuses, resolutions, priorities, and severities
    4. Authentication

      • Choose between internal DB, LDAP, RADIUS, etc.
    5. Security

      • Enable SSL, token-based protection, password strength enforcement
  6. Extensions

    Bugzilla supports extensions (add-ons):

    Managing Extensions:

    • Place extensions in Bugzilla/extensions/
    • Activate via:
      ./checksetup.pl
      
    • View/manage via Administration > Extensions
      Popular extensions:

      • Graphical bug tracking reports
      • Time tracking improvements
      • REST API enhancements
  7. Reports and Charts

    Available under Reports:

    • Tabular Reports: Count bugs by status/product/etc.
    • Graphical Reports: Bar/pie/line charts
    • Line Graphs: Track bug counts over time

    Admins can restrict or allow access to reporting features.

  8. Backup and Maintenance

    1. Backup the Database:

      mysqldump -u root -p bugzilla > bugzilla_backup.sql
      
    2. Backup Attachments and Code:

      tar -czvf bugzilla_files.tar.gz /var/www/html/bugzilla
      

      Schedule regular backups via cron.

  9. Upgrades

    To upgrade Bugzilla:

    1. Back up files and database.
    2. Download the latest version from https://www.bugzilla.org/download/
    3. Replace source files (excluding your data/, localconfig)
    4. Run:
      ./checksetup.pl
      

      Resolve any module/dependency issues that arise.

  10. Email Notifications

    Ensure the server can send email (via sendmail or SMTP).

    Check test mail functionality:

    ./testserver.pl --mail
    

    Set templates and notification rules under:
    Administration > Email Preferences

Extra-Credit: Configure Bugzilla Issue-Tracker for Self-hosted Gitlab

To configure Bugzilla as the issue tracker for your self-hosted GitLab instance, you need to integrate GitLab’s external issue tracker support with your Bugzilla installation.

GitLab does not offer native two-way Bugzilla integration, but you can configure GitLab to use Bugzilla as an external issue tracker, allowing you to:

  • Reference Bugzilla issues in GitLab commits and merge requests.
  • Automatically link to Bugzilla issues using shorthand like BZ-1234.

βœ… Requirements

  • A self-hosted GitLab instance (CE or EE)
  • A Bugzilla instance (self-hosted)
  • Admin access to both systems
  • Known URL pattern for your Bugzilla issue links (e.g., https://bugzilla.example.com/show_bug.cgi?id=1234)

πŸ› οΈ How to Configure Bugzilla Issue-Tracker for Self-Hosted Gitlab

To configure Bugzilla issue-tracker for self-hosted Gitlab, follow the steps below:

  1. Step 1: Enable External Issue Tracker in GitLab Project

    1. Login to GitLab
    2. Go to your project > Settings > Integrations (or Settings > General > Service Desk depending on GitLab version)
    3. Scroll to β€œIssue tracker” section
    4. Select β€œCustom issue tracker”
  2. Step 2: Configure Bugzilla URL Patterns

    You’ll be asked to fill the following fields:

    Field Value Example
    Title Bugzilla
    Issue URL https://bugzilla.example.com/show_bug.cgi?id=:id
    Project URL https://bugzilla.example.com/
    Issues regex (optional) BZ-(\d+) or Bug\s+#?(\d+) (depends on your preferred reference format)

    :id is a placeholder GitLab replaces with the actual issue number.

  3. Step 3: Save Integration

    Click Save changes at the bottom.

    Now when someone writes BZ-1234 or Bug #1234 in commits, merge requests, or comments, GitLab will automatically create a link to Bugzilla issue 1234.

πŸ” Optional Enhancements

Enable Reference Links in Markdown

In your GitLab project’s markdown or commit messages, referencing BZ-1234 will now hyperlink to the Bugzilla issue.

You can define your own pattern in β€œIssues regex” if you want more flexibility.

Two-Way Integration (Advanced)

If you want two-way integration such as:

  • Closing Bugzilla issues from GitLab MRs
  • Syncing issue status or comments

You will need custom scripts or webhooks, or a bridge tool such as:

  • bugzilla-gitlab-bridge – bridges comments
  • Custom API integrations using Bugzilla’s REST API and GitLab Webhooks

πŸ§ͺ Test the Setup

  1. Commit with message:
   Fixes BZ-4567: Incorrect timeout on user session
  1. Push to GitLab.
  2. Navigate to the commit in GitLab – BZ-4567 should now link to:
   https://bugzilla.example.com/show_bug.cgi?id=4567

πŸ“Œ Tips

  • GitLab doesn’t sync issue state with Bugzilla by default.
  • Webhooks or cron jobs may be used to automate syncing comments or issue closures if needed.
  • Use Bugzilla’s REST API (/rest/bug/) for automation scripts.

Launch 100% ssd ubuntu vps from $2. 49/mo!

Conclusion

By following the guides, you now know how to deploy Bugzilla on Ubuntu VPS and have an in-depth understanding of how to manage a self-hosted Bugzilla installation. You now know how to configure Bugzilla issue-tracker for self-hosted Gitlab.

Avatar of editorial staff

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX.
lg