Atlantic.Net Blog

How to Install Redmine 4.2 on Debian 10

Redmine is an open-source and cross-platform project management system. It is written in Ruby on Rails. Redmine allows you to manage multiple projects and sub-projects. It offers a web-based interface and other useful features including support for multiple languages, time tracking, role-based access control, and more. It supports various SCM integration including, SVN, CVS, Git, Mercurial, and more.

In this tutorial, we will show you how to install Redmine 4.2 on a Debian 10 server.


  • A fresh Debian 10 server on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Debian 10 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Debian 10 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install Apache and Other Packages

First, you will need to install some required dependencies on your server. You can install all of them with the following command:

apt-get install apt-transport-https ca-certificates dirmngr gnupg2 -y

Next, install Apache, MariaDB, Passenger, and other packages with the following command:

apt-get install apache2 apache2-dev libapache2-mod-passenger mariadb-server mariadb-client build-essential ruby-dev libxslt1-dev libmariadb-dev libxml2-dev zlib1g-dev imagemagick libmagickwand-dev curl -y

After installing all the packages, you can proceed to create a database for Redmine.

Step 3 – Create a Database for Redmine

Next, you will need to create a database and user for Redmine.

First, connect to the MariaDB with the following command:


Once you are connected, create a database and user with the following command:

GRANT ALL PRIVILEGES ON redminedb.* TO 'redmineuser'@'localhost' IDENTIFIED BY 'password';

Next, flush the privileges and exit from the MariaDB with the following command:


Step 4 – Download and Configure Redmine

First, you will need to create a separate user for Redmine.

You can create it with the following command:

useradd -r -m -d /opt/redmine -s /usr/bin/bash redmine

Next, add the Redmine user to the www-data group with the following command:

usermod -aG www-data redmine

Next, log in to the Redmine user and download the latest version of Redmine with the following command:

su - redmine

Once the Redmine is downloaded, extract the downloaded file with the following command:

tar -xvzf redmine-4.2.1.tar.gz -C /opt/redmine/ --strip-components=1

Next, copy some sample configuration files with the following command:

cp /opt/redmine/config/configuration.yml{.example,}
cp /opt/redmine/public/dispatch.fcgi{.example,}
cp /opt/redmine/config/database.yml{.example,}

Next, edit the database.yml file and define your database settings:

nano /opt/redmine/config/database.yml

Change the following lines:

  adapter: mysql2
  database: redminedb
  host: localhost
  username: redmineuser
  password: "password"

Save and close the file, then exit from the Redmine user with the following command:


Next, change the directory to /opt/redmine and install Bundler with the following command:

cd /opt/redmine
gem install bundler

Next, log in to Redmine user and install the gems dependencies:

su - redmine
bundle install --without development test --path vendor/bundle

Next, generate a secret token with the following command:

bundle exec rake generate_secret_token

Next, create a Rails database structure and insert default configuration data into the database with the following command:

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

Next, create some required files and directory with the following command:

for i in tmp tmp/pdf public/plugin_assets; do [ -d $i ] || mkdir -p $i; done

Next, set proper permission and ownership to /opt/redmine directory:

chown -R redmine:redmine files log tmp public/plugin_assets
chmod -R 755 /opt/redmine

Next, exit from the Redmine user with the following command:


Step 5 – Configure Apache for Redmine

Next, you will need to create an Apache virtual configuration file for Redmine. You can create it with the following command:

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

Add the following lines:

<VirtualHost *:80>
	RailsEnv production
	DocumentRoot /opt/redmine/public

	<Directory "/opt/redmine/public">
	        Allow from all
	        Require all granted

	ErrorLog ${APACHE_LOG_DIR}/redmine_error.log
        CustomLog ${APACHE_LOG_DIR}/redmine_access.log combined

Save and close the file, then enable the Redmine virtual host file and restart the Apache service with the following command:

a2ensite redmine
systemctl reload apache2

Step 6 – Access Redmine

Now, open your web browser and access the Redmine web interface using the URL You should see the following screen:
Redmine page
Click on the Sign In button. You should see the Redmine login screen:
Redmine login page
Provide the default admin username and password as admin/admin and click on the Sign in button. You will be asked to set the new password:
Redmine password reset page
Provide your current password and new password, then click on the Apply button to apply the changes.
Redmine dashboard page


In this guide, you learned how to install Redmine 4.2 with Apache on Debian 10. You can now integrate Redmine with SCM tools and start managing your project. Try it out on your dedicated server hosting account from Atlantic.Net.

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year