Introduce and Configure Redmine on Debian 9

Redmine incorporates different venture support, wikis, framework following issues, discussions, schedules, email notices, and considerably more. We'll show you how to install and customize the new version of Redmine on Debian 9 in this tutorial.

Before you start make sure to do this

  • Have a domain name pointing to a public IP on your server. We're going to utilize 
  • Signed in as a sudo-favoured client. 
  • Introduced. Nginx 
  • Have a Domain SSL declaration introduced. 


Make a My SQL database

Redmine underpins MySQL/MariaDB, SQL Server, SQLite 3, Microsoft and PostgreSQL. We will utilize MariaDB as back-end to the database. Check that you have introduced at any rate MySQL 5.7 or MariaDB 10.3 on your PC. 

In the event that your Debian server doesn't have MariaDB or MySQL, you can introduce it utilizing these guidelines. 

Start by signing in by composing in the MySQL support:

$ sudo mysql

To make another database, run the accompanying SQL explanation; 

mysql> CREATE DATABASE redmine CHARACTER SET utf8mb4;

Make another client represent MySQL, and permit access to the database: 

mysql>   GRANT ALL ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'change-with-strong-password';

Remember to change a solid secret key with change-with-solid passwords.

Once done, log out of the console at MariaDB by typing:

mysql> EXIT;


Install Ruby

With apt package manager, the fastest way to install Ruby on Debian is to: 

Ruby update by typing:

$  sudo apt install ruby-full

The version in the Debian repositories at the time of writing is 2.3.3p222 which is enabled by the new Redmine update. 

Visit this instructional exercise in the event that you need to introduce Ruby by means of Rbenv or RVM. 


Introduce Passenger and Nginx #

Passenger is a quick, lightweight Ruby, Node.js, and Python web application server that can be incorporated with Apache and Nginx. Passenger will be introduced as Nginx module. 

Ensure that Nginx is enacted before proceeding with the means underneath.

Installing the packages required to make an https repository:

$    sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common

Import the GPG key repository and allow the Phusionpassenger repository to:

$   sudo apt-key adv --recv-keys --keyserver hkp:// 561F9B9CAC40B2F7

$   sudo add-apt-repository 'deb stretch main'

Update the list of packages and install the Nginx Passenger Modul with:

$   sudo apt update

$   sudo apt install libnginx-mod-http-passenger


Install Redmine on Debian

Start by installing the necessary dependencies to build a Redmine:

$    sudo apt install build-essential libmariadbclient-dev imagemagick libmagickwand-dev curl ruby-dev libxslt-dev libxml2-dev zlib1g-dev

You should check the Redmine download page for a newer version before proceeding with the next step.


Download Redmine

Use the following curl command to download the archive at Redmine:

$     sudo curl -L -o /tmp/redmine.tar.gz

Extract the archive and transfer it to /opt directory once the download is complete:

$  cd /tmp

$  sudo tar zxf /tmp/redmine.tar.gz

$  sudo mv /tmp/redmine-4.0.4 /opt/redmine

Configure Redmine Database:

Copy the configuration file for an example in Redmine:

$     sudo cp /opt/redmine/config/database.yml.example /opt/redmine/config/database.yml

Open your Text editor file:

$    sudo nano /opt/redmine/config/database.yml

Search the production section, and enter the previously created MySQL database and user information:



  adapter: mysql2

  database: redmine

  host: localhost

  username: redmine

  password: "change-with-strong-password"

  encoding: utf8

Save the file until done, and exit the editor.


Install Ruby conditions

Install bundler and other Ruby conditions and explore to the Redmine catalogue: 

$ compact disc/pick/redmine/ 

$ sudo pearl introduce bundler - no-rdoc - no-ri 

$ sudo group introduce - without improvement test postgresql sqlite 

Relocate the database by Generating Keys: 

Run the accompanying key age order, and relocate the database. 

$ compact disc/pick/redmine/ 

$ sudo group executive rake generate_secret_token 

$ sudo RAILS_ENV=production group executive rake db:migrate 


Set the correct approvals

Nginx runs as a client and network of the www-information. Set authorizations accurately by giving the accompanying chown order.

$    sudo chown -R www-data: /opt/redmine/


Setup Nginx

By now, if you don't check the prerequisites for this tutorial you should already have Nginx with SSL certificate installed on your system. 

Open your Text Editor and create the following block file for Nginx server:

$    sudo nano /etc/nginx/sites-available/


# Redirect HTTP -> HTTPS

server {

    listen 80;


    include snippets/letsencrypt.conf;

    return 301$request_uri;


# Redirect WWW -> NON WWW

server {

    listen 443 ssl http2;


    ssl_certificate /etc/letsencrypt/live/;

    ssl_certificate_key /etc/letsencrypt/live/;

    ssl_trusted_certificate /etc/letsencrypt/live/;

    include snippets/ssl.conf;

    return 301$request_uri;


server {

    listen 443 ssl http2;


    root /opt/redmine/public;

    # SSL parameters

    ssl_certificate /etc/letsencrypt/live/;

    ssl_certificate_key /etc/letsencrypt/live/;

    ssl_trusted_certificate /etc/letsencrypt/live/;

    include snippets/ssl.conf;

    include snippets/letsencrypt.conf;

    # log files

    access_log /var/log/nginx/;

    error_log /var/log/nginx/;

    passenger_enabled on;

    passenger_min_instances 1;

    client_max_body_size 10m;


Don't forget to use your Redmine domain to replace and set the correct path to the SSL certificate files. All requests for HTTP will be forwarded to HTTPS. This guide generates the snippets used in this setup.

Enable the block server by creating a symbolic link to the directory-enabled for the sites:

$    sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Make a test before restarting the Nginx service to be sure there are no syntax errors: 

$  sudo nginx -t

If no errors occur then the output should look like this: 

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

Finally, restart the service with Nginx by type in:

$  sudo systemctl restart nginx


Access Redmine

Open your browser, type your domain, and if the installation is successful, a similar screen will appear as follows: 

Redmine 's default login credentials are to: 

User name: admin

Password: admin

When you first sign in, you'll be prompted to change your password as shown below: 

Once the password is changed you will be redirected to the user account page.

You built Redmine on your Debian system with success.


Author: Adnan Gohar, Lukáš Beňa

Additional information
Free Trial

Easy Redmine 10 upgrade
Top plugins & features
New & mobile design
Server upgrades
Global cloud

Start Free Trial

Try Easy Redmine in a 30-day free trial

Full-featured, 30 Days, SSL protected, Daily Backups, In your Geo Location