How to Install Redmine with Apache on Ubuntu Linux

macbook 562499 640
macbook 562499 640

Redmine is a flexible enterprise project management web platform written in the Ruby on Rails framework. and is great for projects and time tracking, wiki, document management, and more… It also integrates with popular open-source plugins to make managing your projects easy.

If you want a project management platform with enterprise-class features, scalable, and performance at a high level, then Redmine is an excellent place to start.

Redmine is built on an open-source core with support for open standards, which might be very useful in helping you run your projects.

The Redmine platform is designed for ease of use to allow enterprises and business owners to collaborate and automate engaging experiences with users across multiple devices, including mobile.

For more about Redmine, please check their Homepage

To get started with installing Redmine, follow the steps below:

Install Apache2 HTTP Server

Redmine requires a web server, and the Apache2 HTTP server is the most popular open-source web server available today. To install the Apache2 server, run the commands below:

sudo apt update
sudo apt install apache2 libapache2-mod-passenger

After installing Apache2, the commands below can be used to stop, start and enable the Apache2 service to always start up with the server boots.

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

Now that Apache2 is installed browse your browser to the URL below to test whether the web server works.

Apache2 Test Page

If you see the page above, then Apache2 is successfully installed.

Install MariaDB Database Server

Redmine also requires a database server to store its content. MariaDB is a great place to start if you want a genuinely open-source database server. To install MariaDB run the commands below:

sudo apt-get install mariadb-server mariadb-client

After installing MariaDB, the commands below can stop, start and enable the MariaDB service to start up when the server boots.

Run these on Ubuntu 16.04 LTS

sudo systemctl stop mysql.service
sudo systemctl start mysql.service
sudo systemctl enable mysql.service

Run these on Ubuntu 18.10 and 18.04 LTS

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Next, run the commands below to secure the database server with a root password if you were not prompted to do so during the installation.

sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

  • Enter current password for root (enter for none): Just press the Enter
  • Set root password? [Y/n]: Y
  • New password: Enter password
  • Re-enter new password: Repeat password
  • 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

Once MariaDB is installed, run the commands below to test whether the database server was installed.

sudo mysql -u root -p

Type the root password when prompted.

mariadb welcome

The server was successfully installed if you see a similar screen.

Create Redmine Database

Once you’ve installed all the packages required for Redmine to function, continue below to start configuring the servers. First, run the commands below to create a blank Redmine database.

To log on to the MariaDB database server, run the commands below.

sudo mysql -u root -p

Then create a database called redmine


Create a database user called redmineuser with a new password

CREATE USER 'redmineuser'@'localhost' IDENTIFIED BY 'new_password_here';

Then grant the user full access to the database.

GRANT ALL ON redmine.* TO 'redmineuser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;

Finally, save your changes and exit.


Install Redmine

Now that you have installed Apache2 and MariaDB, run the commands below to install Redmine packages.

sudo apt-get install redmine redmine-mysql

During the installation, you will be asked to configure Redmine. Choose Yes and continue.

 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐
 │                                                                           │ 
 │ The redmine/instances/default package must have a database installed and  │ 
 │ configured before it can be used. This can be optionally handled with     │ 
 │ dbconfig-common.                                                          │ 
 │                                                                           │ 
 │ If you are an advanced database administrator and know that you want to   │ 
 │ perform this configuration manually, or if your database has already      │ 
 │ been installed and configured, you should refuse this option. Details on  │ 
 │ what needs to be done should most likely be provided in                   │ 
 │ /usr/share/doc/redmine/instances/default.                                 │ 
 │                                                                           │ 
 │ Otherwise, you should probably choose this option.                        │ 
 │                                                                           │ 
 │ Configure database for redmine/instances/default with dbconfig-common?    │ 
 │                                                                           │ 
 │               <Yes>                            <No>                       |
 │                                                                           │ 

Then choose mysql ad the database type you want to use.

          ┌─────────────────┤ Configuring redmine ├─────────────────┐
          │ Database type to be used by redmine/instances/default:  │ 
          │                                                         │ 
          │                        sqlite3                          │ 
          │                        mysql                            │ 
          │                                                         │ 
          │                                                         │ 
          |             <Ok>                <Cancel>
          │                                                         │ 

Next, create a password for Remind instance to register with the database.

 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐
 │ Please provide a password for redmine/instances/default to register with  │ 
 │ the database server. If left blank, a random password will be generated.  │ 
 │                                                                           │ 
 │ MySQL application password for redmine/instances/default:                 │ 
 │                                                                           │ 
 │ ********_________________________________________________________________ │ 
 │                                                                           │ 
 │                 <Ok>                   <Cancel>                           |
 │                                                                           │ 

Next, install gem bundler packages.

sudo gem update
sudo gem install bundler

After that, continue below to set up the Apache2 site for Redmine. First, run the commands below to create a symbolic link to the Redmine document root.

sudo ln -s /usr/share/redmine/public /var/www/html/redmine

Next, adjust these directories to Apache2 users.

sudo touch /usr/share/redmine/Gemfile.lock
sudo chown www-data:www-data /usr/share/redmine/Gemfile.lock

Configure Apache2

Next, run the commands below to open the passenger.conf file.

sudo nano /etc/apache2/mods-available/passenger.conf

Then add the highlighted line to the file and save.

<IfModule mod_passenger.c>
  PassengerDefaultUser www-data
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby

Finally, configure the Apahce2 site configuration file for Redmine. This file will control how users access Redmine content. Run the commands below to create a new configuration file called Redmine. conf

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

Then copy and paste the content below into the file and save it. Replace the highlighted line with your domain name and directory root location.

<VirtualHost *:80>
     DocumentRoot /var/www/html/redmine

     <Directory /var/www/html/redmine>
         RailsBaseURI /redmine
         PassengerResolveSymlinksInDocumentRoot on

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined


Save the file and exit.

Enable the Redmine Site

After configuring the VirtualHost above, please enable it by running the commands below.

sudo a2ensite redmine.conf
sudo systemctl restart apache2.service

Then open your browser and browse to the server domain name, and you should see the Redmine home page.
Ubuntu install redmine

Log in with the username and password below:

Username: admin
Password: admin

Redmine ubuntu install

That’s it!

Congratulation! You have successfully installed Redmine on Ubuntu 16.04 | 18.04 and 18.10.

You may also like the post below:

Posted by

I love computers; maybe way too much. What I learned I try to share at

1 Comment

  1. Not receiving the email notification, Getting error ” Email delivery is not configured, and notifications are disabled.
    Configure you’re SMTP server in /etc/redmine//configuration.yml and restart the application to enable them. “

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: