UbuntuUbuntu Based

How To Install Redmine on Ubuntu 22.04 LTS

Install Redmine on Ubuntu 22.04

In this tutorial, we will show you how to install Redmine on Ubuntu 22.04 LTS. Are you looking for a project management tool to streamline your team’s tasks and improve communication? Look no further than Redmine! Redmine is a free and open-source project management web application that allows you to track issues, bugs, and tasks, as well as manage your team’s time and resources. With its customizable dashboard and easy-to-use interface, Redmine is the perfect solution for any team looking to optimize its workflow. In this guide, we’ll walk you through the process of installing and configuring Redmine on Ubuntu 22.04 LTS. We’ll cover everything from installing the necessary packages to setting up a database, and finally configuring Redmine to meet your team’s specific needs. So sit back, relax, and let’s get started with Redmine!

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Redmine open-source web-based project management on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.


  • A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for MySQL, Ruby, and Rails, Redmine.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Redmine on Ubuntu 22.04 LTS Jammy Jellyfish

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade
sudo apt install libxml2-dev libxslt1-dev zlib1g-dev imagemagick libmagickwand-dev libmysqlclient-dev apache2-dev build-essential libcurl4-openssl-dev

Step 2. Installing Apache HTTP Server.

By default, Apache is available on Ubuntu 22.04 base repository. Now run the following command below to install the latest version of Apache to your Ubuntu system:

sudo apt install apache2

After successful installation, enable Apache (to start automatically upon system boot), start, and verify the status using the commands below:

sudo systemctl enable apache2
sudo systemctl start apache2
sudo systemctl status apache2

You can confirm the Apache2 version with the below command:

apache2 -v

Now we set up an Uncomplicated Firewall (UFW) with Apache to allow public access on default web ports for HTTP and HTTPS:

sudo ufw allow 'Apache Full'
sudo ufw allow 3000
sudo ufw enable

For additional resources on installing Apache, read the post below:

Step 3. Installing MySQL Database.

By default, MySQL is available on Ubuntu 22.04 base repository. Now run the following command below to install the latest version of MySQL 8 to your Ubuntu system:

sudo apt install mysql-server

After successful installation, enable MySQL (to start automatically upon system boot), start, and verify the status using the commands below:

sudo systemctl enable mysql
sudo systemctl start mysql
sudo systemctl status mysql

You can verify the version of MySQL installed by executing:

mysql -V

By default, MySQL is not hardened. You can secure MySQL using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL:


Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Login to the MySQL database server with the MySQL root user and the password you set during installation:

mysql -u root -p

Once you are logged in, now create a database for Redmine installation:

mysql> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'Your-Strong-Passwd';
mysql> CREATE DATABASE redmine CHARACTER SET utf8mb4;
mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
mysql> exit

For additional resources on installing MySQL, read the post below:

Step 4. Installing Ruby.

Redmine is written in Ruby on Rails, so we need to install Ruby on our system. First, we install RVM’s GPG key using the following command:

gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

Next, install RVM using the following command below:

curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm

Finally, install Ruby using the following command:

rvm install ruby-3.1.3

Step 5. Installing Redmine on Ubuntu 22.04.

Now that you have installed the required dependencies and Ruby on Rails, you can proceed to install Redmine. First, download the latest version of Redmine from the official website:

wget https://www.redmine.org/releases/redmine-5.0.5.tar.gz --no-check-certificate

Next, extract and move the files to the /var/www/redmine directory:

tar xfz redmine-5.0.5.tar.gz
mv redmine-5.0.5 /var/www/redmine
cd /var/www/redmine

After that, create Redmine configuration files by using the supplied example files:

cp config/configuration.yml.example config/configuration.yml
cp config/database.yml.example config/database.yml
cp public/dispatch.fcgi.example public/dispatch.fcgi

Then, open the database.yml file for editing:

nano config/database.yml

Find and configure your database settings under the following section:

  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "Your-Strong-Passwd"
  # Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
  encoding: utf8mb4

Save and close the file, then install bundler for managing ruby gem dependencies:

gem install bundler
bundle config set --local without 'development test'
bundle install
gem pristine --all
bundle add webrick

Generate a random secret key to prevent tampering with the cookies for storing session data:

bundle exec rake generate_secret_token

Next, create the database structure:

RAILS_ENV=production bundle exec rake db:migrate

Insert the data into the MySQL database:

RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data

Create necessary directories and set file permissions:

mkdir -p tmp/pdf
mkdir -p public/plugin_assets
chown -R $USER:$USER files log tmp public/plugin_assets
chmod -R 755 /var/www/redmine/

Finally, run the following command to start a Rails server instance:

bundle exec rails server -u webrick -e production

Step 8. Accessing Redmine Web Interface.

Once successfully installed, now open your web browser and access the Redmine Web UI using the URL https://your-IP-address:3000. You will be redirected to the following page:

Install Redmine on Ubuntu 22.04 LTS Jammy Jellyfish

Congratulations! You have successfully installed Redmine. Thanks for using this tutorial for installing the Redmine project management web application on Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the official Redmine website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button