How to Install and Configure Redmine on Ubuntu 24.04
Step-by-step guide on how to install and configure Redmine on Ubuntu 24.04 LTS with Ruby, MariaDB database, Apache Passenger or Puma, and Let's Encrypt.

6 min read
Step-by-step guide on how to install and configure Redmine on Ubuntu 24.04 LTS with Ruby, MariaDB database, Apache Passenger or Puma, and Let's Encrypt.
- Prerequisites and Supported Releases
- Step 1: Updating System and Installing MariaDB Database
- Step 2: Creating Dedicated Database and User for Redmine
Redmine is a flexible, open-source project management and issue tracking web application engineered on the Ruby on Rails framework. Widely trusted by development agencies, software engineering teams, and enterprise IT departments, Redmine features comprehensive multi-project support, role-based access control, integrated issue tracking, Gantt charts, project calendars, documentation wikis, message boards, and tight integration with Git and Subversion repositories.
Unlike expensive SaaS project management tools that lock team data into proprietary ecosystems with escalating per-user pricing, hosting Redmine on your own Ubuntu infrastructure gives you full data sovereignty and infinite extensibility through an active plugin ecosystem. Learning how to install and configure redmine on ubuntu 24.04 empowers engineering teams to host a private, customizable project workspace featuring Gantt charts, role-based access control, and issue tracking.
In this step-by-step tutorial, we demonstrate how to install and configure Redmine on Ubuntu 24.04 LTS (Noble Numbat). We cover installing and securing MariaDB, setting up Ruby and essential development headers, downloading Redmine source code into /opt/redmine, configuring database credentials and secret tokens, compiling bundle dependencies, and serving the application via Apache and Phusion Passenger with Let's Encrypt SSL.
Install and configure the Redmine project management and issue tracking web application on Ubuntu 24.04 LTS with MariaDB, Ruby on Rails, Apache with Phusion Passenger, and SSL.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat). The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A cloud server or VPS running
Ubuntu 24.04 LTS. - A non-root user with administrative
sudoprivileges. - A registered domain name (e.g.,
redmine.example.com) pointed to your server IP address. - At least
2 GB of RAM(4 GB recommended for busy engineering teams and multiple projects).
Step 1: Updating System and Installing MariaDB Database
Redmine stores all project definitions, user accounts, issue tickets, time logs, and wiki revisions in a relational database. MariaDB is the recommended database engine for production Redmine deployments on Ubuntu.
First, update your local APT repository index and install the MariaDB server and client packages.
Enable and start the MariaDB database daemon.
Secure the MariaDB installation by executing the mariadb-secure-installation script to set root password policies and remove test databases.
# Refresh package lists and upgrade system packages
sudo apt update && sudo apt upgrade -y
# Install MariaDB database server
sudo apt install -y mariadb-server mariadb-client
# Enable and start MariaDB service
sudo systemctl enable --now mariadb
# Verify database daemon status
sudo systemctl status mariadb --no-pager
Step 2: Creating Dedicated Database and User for Redmine
Create a dedicated, isolated database and user account for Redmine with utf8mb4 character encoding to support all international languages and emoji characters in ticket discussions.
Log into the MariaDB command shell as the root user.
Create the database named redmine, create the dedicated user redmine, and grant full privileges on the database.
Replace StrongRedminePass123! with a strong, randomized password.
-- Access MariaDB root shell
sudo mariadb
-- Create Redmine database with utf8mb4 encoding
CREATE DATABASE redmine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- Create dedicated user account
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'StrongRedminePass123!';
-- Grant privileges on the Redmine database
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
-- Flush privilege tables and exit
FLUSH PRIVILEGES;
EXIT;
Step 3: Installing Ruby, Bundler, and Core Build Dependencies
Redmine is written in Ruby on Rails. Ubuntu 24.04 provides Ruby 3.2 in its main repository, which is fully compatible with modern Redmine 5.x releases.
Install Ruby, the Ruby development headers, the bundler package manager, and C/C++ compiler tools necessary for compiling native gem extensions (such as the MySQL/MariaDB database adapter and Nokogiri XML parser).
Verify the installed Ruby and Bundler versions.
# Install Ruby, build tools, and database client headers
sudo apt install -y ruby ruby-dev bundler build-essential libmariadb-dev-compat libmariadb-dev libxml2-dev libxslt1-dev zlib1g-dev imagemagick libmagickwand-dev
# Verify Ruby and Bundler versions
ruby -v
bundler -v
Step 4: Downloading and Extracting Redmine Source Code
Download the latest stable release archive of Redmine from the official Redmine distribution server.
Create the installation directory at /opt/redmine and extract the downloaded tarball into it.
Create an unprivileged system user and group named redmine to execute the application with minimal privileges.
Assign ownership of the Redmine directory tree to the redmine user.
# Create dedicated system user
sudo adduser --system --group --no-create-home redmine
# Download latest stable Redmine release
cd /tmp
wget https://www.redmine.org/releases/redmine-5.1.3.tar.gz
# Extract archive into /opt/redmine
sudo mkdir -p /opt/redmine
sudo tar -xzf redmine-5.1.3.tar.gz -C /opt/redmine --strip-components=1
# Set directory ownership
sudo chown -R redmine:redmine /opt/redmine
Step 5: Configuring Database Connection and Installing Ruby Gems
Configure Redmine's database parameters so the application can communicate with MariaDB.
Copy the template database configuration file config/database.yml.example to config/database.yml in /opt/redmine.
Edit config/database.yml under the production section with your database name, username, and password.
Execute bundle install to download and compile all required Ruby gems for production, omitting development and test dependencies.
# Copy example database configuration
cd /opt/redmine
sudo cp config/database.yml.example config/database.yml
# Configure production database block
sudo bash -c 'cat <<EOF > /opt/redmine/config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "StrongRedminePass123!"
encoding: utf8mb4
EOF'
# Install Ruby gem dependencies for production
sudo -u redmine bundle config set --local without 'development test'
sudo -u redmine bundle install
Step 6: Generating Secret Token and Executing Database Migrations
Generate a secret token for Rails session encryption to protect against session tampering.
Next, execute the database migrations using Rake to create all database tables, foreign keys, and indexes.
Load Redmine's default configuration data (issue statuses, roles, and trackers) by setting RAILS_ENV=production.
When prompted for the default language, type en (or your preferred language code).
# Generate secret session token
cd /opt/redmine
sudo -u redmine bundle exec rake generate_secret_token
# Run database schema migrations
sudo -u redmine RAILS_ENV=production bundle exec rake db:migrate
# Load default configuration data
sudo -u redmine RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data
# Create required upload and plugin asset directories with correct permissions
sudo mkdir -p tmp tmp/pdf public/plugin_assets files
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
Step 7: Configuring Apache Web Server with Phusion Passenger
The recommended production web server stack for Redmine is Apache combined with the Phusion Passenger application server module.
Install the Apache HTTP web server and the libapache2-mod-passenger package from Ubuntu repositories.
Create a new Apache Virtual Host configuration file at /etc/apache2/sites-available/redmine.conf.
Point the DocumentRoot to /opt/redmine/public, configure Passenger parameters, enable the virtual host, and restart Apache.
# Install Apache and Passenger module
sudo apt install -y apache2 libapache2-mod-passenger
# Create Apache Virtual Host configuration
sudo bash -c 'cat <<EOF > /etc/apache2/sites-available/redmine.conf
<VirtualHost *:80>
ServerName redmine.example.com
DocumentRoot /opt/redmine/public
PassengerUser redmine
PassengerGroup redmine
PassengerRuby /usr/bin/ruby
<Directory /opt/redmine/public>
AllowOverride All
Require all granted
Options -MultiViews
</Directory>
ErrorLog \${APACHE_LOG_DIR}/redmine_error.log
CustomLog \${APACHE_LOG_DIR}/redmine_access.log combined
</VirtualHost>
EOF'
# Enable rewrite module, activate site, and restart Apache
sudo a2enmod rewrite
sudo a2ensite redmine.conf
sudo a2dissite 000-default.conf
sudo systemctl restart apache2
Step 8: Securing Redmine with Let's Encrypt SSL and Initial Login
Protect project credentials, uploaded source code attachments, and API keys by provisioning a free TLS/SSL certificate with Certbot.
Run Certbot with the --apache plugin to automatically obtain certificates and enforce HTTPS redirection.
Open your web browser and navigate to https://redmine.example.com.
Click Sign in in the top right corner. Log in with the default administrative credentials: username admin and password admin.
Redmine will immediately prompt you to change your administrative password to a strong, permanent secret.
# Install Certbot and Apache plugin
sudo apt install -y certbot python3-certbot-apache
# Obtain and configure SSL certificate
sudo certbot --apache -d redmine.example.com --non-interactive --agree-tos -m [email protected] --redirect
# Default initial credentials:
# URL: https://redmine.example.com
# Username: admin
# Password: admin
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
Apache returns '500 Internal Server Error' or Passenger spawn error
Resolution: Check the Apache error log at /var/log/apache2/redmine_error.log. Verify that directory permissions in /opt/redmine/tmp and /opt/redmine/log allow the redmine user to write files: sudo chown -R redmine:redmine /opt/redmine.
Database connection failed: Access denied for user 'redmine'@'localhost'
Resolution: Verify the database password specified in /opt/redmine/config/database.yml matches the credentials granted in MariaDB. Test connectivity manually: mariadb -u redmine -p redmine.
Bundle install fails compiling 'mysql2' native extension
Resolution: Ensure MariaDB development client headers are installed: sudo apt install -y libmariadb-dev-compat libmariadb-dev build-essential, then retry running bundle install.
Security Best Practices and Hardening
Change the default 'admin' password immediately upon initial login, and create personal named accounts for all project managers and developers.
Always set the Apache DocumentRoot strictly to /opt/redmine/public; never point DocumentRoot to the root /opt/redmine directory.
Regularly backup the MariaDB redmine database using mysqldump and backup uploaded attachments in /opt/redmine/files.
Keep Ruby gems updated by running 'bundle update' to apply security fixes for Rails and web framework libraries.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
/opt/redmine/plugins/ and themes into /opt/redmine/public/themes/. Run bundle exec rake redmine:plugins:migrate RAILS_ENV=production to apply database migrations, and restart Apache.files/ directory. Extract the new Redmine version, copy your config/database.yml and config/configuration.yml into it, run bundle install and rake db:migrate RAILS_ENV=production, and point Apache to the new installation.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides


Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!