Install Redmine 2.5.x on Ubuntu 14.04 with Apache2, RVM and Passenger

Update 2014-07-14:

Fixed permission to prevent error when installing a plugin. Thanks Rob Sharkey.

If you get permission error when installing a plugin, run:

cd /opt/redmine/current
sudo chmod 0775 log
sudo chmod -R 0665 log/*.log
sudo chown -R www-data:$USER files log tmp public/plugin_assets
sudo chmod -R 0775 files log tmp public/plugin_assets

 Update 2014-07-12:

Added troubleshooting suggestions and warning about multiple services running on the server.

Update 2014-07-10:

Added details about self-signed certificates.

Before starting:

For Debian instructions 

We will prefer to work in the new, clean Virtual Machine. My preference goes to XenServer which can run on top of almost any hardware (Configure backups!).

I recommend you give at least 1GB of RAM to your Redmine box.

This tutorial was written for Redmine 2.5.x but it should be compatible with future versions

I didn’t get GitSmartHTTP to work on Ubuntu 14.04 yet because of several issues. If I have time I will continue to investigate the problems.
See the Redmine Issue. There is also a patch available if you don’t use anonymous access.

Before anything else, we will make sure that the packages are up to date:

sudo apt-get update && sudo apt-get upgrade

Getting Ruby

The compatibility list is available on Redmine’s official website. As time of writing, Ruby 2.1.x is NOT supported.

Install Ruby 2.0.0 with RVM, we use RVM because it allows to easily manage Ruby versions:

sudo apt-get install curl
curl -sSL | bash -s stable --ruby=2.0.0
source /home/$USER/.rvm/scripts/rvm

Note that you can list available rubies with:

 rvm list known

Getting Redmine

We will also want to to use Subversion to checkout Redmine and Git for our SCM

sudo apt-get install git git-core subversion

Redmine dependencies

sudo apt-get install imagemagick libmagickwand-dev

Get Redmine, as time of writing, the newest stable branch is 2.5-stable.

cd /opt/
sudo mkdir redmine
sudo chown $USER:$USER redmine
cd redmine/
svn co current
cd current/

Fix permissions:

mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R www-data:$USER files log tmp public/plugin_assets
sudo chmod -R 775 files log tmp public/plugin_assets

Create repositories root

mkdir -p /opt/redmine/repos/svn /opt/redmine/repos/git
sudo chown -R www-data:www-data /opt/redmine/repos

Create the MySQL database

We will use MySQL, note that the dev library is required to compile the mysql2 gem native extention

Note that ‘my_password’ needs to be replaced by a strong password!
sudo apt-get install mysql-server libmysqlclient-dev

We start the MySQL Console to create the database:

 mysql -uroot -p

Then, in the MySQL console:

CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

Configure Redmine

Time to edit the Redmine configuration:

cp config/configuration.yml.example config/configuration.yml
cp config/database.yml.example config/database.yml
nano config/database.yml

Edit such as:

  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "my_password"
  encoding: utf8

Don’t forget to replace “my_password” by your actual password created earlier.

Preserve the indentation, all lines but the first are indented by 2 spaces.

Let the bundler install the Gem dependencies:

gem install bundler
bundle install --without development test

Ready Redmine’s database:

bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data

Install and configure the web server

We need a bunch of packages

sudo apt-get install apache2 apache2-dev libcurl4-gnutls-dev apache2 libapache2-svn \
libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libauthen-simple-ldap-perl openssl

Time to enable the required modules:

sudo a2enmod ssl perl dav dav_svn dav_fs rewrite

We install Passenger to serve Redmine:

gem install passenger

Follow the instructions at the end of the Passenger installation to create your Passenger Apache configuration. Do NOT copy the example below as it will very probably fail.

Edit the configuration file:

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

It should look like:

# Do NOT copy this configuration file, you need to create your owen with the output of `passenger-install-apache2-module`
LoadModule passenger_module /home/it/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.42/buildout/apache2/
 <IfModule mod_passenger.c>
 PassengerRoot /home/it/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.42
 PassengerDefaultRuby /home/it/.rvm/gems/ruby-2.0.0-p451/wrappers/ruby

Now we have to enable the configuration we just created:

sudo a2enconf passenger

Load the library for Repository authentication

sudo ln -s /opt/redmine/current/extra/svn/ /usr/lib/perl5/Apache/

Create SSL Self-signed certificate

If you are not familiar with self-signed certificates, please read:

SSL provides 2 protections: 1: Encryption (prevents eavesdropping) 2: Authentication of the server (prevents a malicious server to pretend to be your server).

Self-signed certificates only provide encryption. It means that browsers will display a warning telling that  the authenticity of the certificate could not be verified. To prevent that, you can:

  • Remove SSL by having only a VirtualHost on port 80(which is arguably acceptable for an isolated private network)
  • Get a free valid certificate for example from StartSSL
  • Purchase a valid certificate from a vendor of your choice

Gurus out there will know that it is more to it but it is not the topic of this article.

I use self-signed certificates for this article because it is simple, immediate, free and better than nothing.

We create the certificate with OpenSSL. Set the “Common Name” to the DNS name you are using to access the server. For example:

sudo mkdir /etc/apache2/ssl
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout /etc/apache2/ssl/redmine.key -out /etc/apache2/ssl/redmine.crt
sudo chmod -R 740 /etc/apache2/ssl
sudo chown -R www-data:www-data /etc/apache2/ssl

Apache2 configuration

We can now create our Apache2 configuration files:

You also need to replace by your domain name in both files

Files should be placed  in /etc/apache2/sites-available/

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


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

Note that Perfect Forward Secrecy is configured
If your server is NOT hosting any other services or websites, you may disable the default configuration:

sudo a2dissite 000-default

If you were using the default configuration for other services, disabling it would make these services unavailable.

Enable the configuration:

sudo a2ensite redmine redmine-redirect
sudo service apache2 restart

Time to Celebrate!

There you go, your Redmine instance should be up in running!
Test it at (replace with your settings)
Username: admin
Password: admin

If Redmine or another service on the server doesn't show up

What now

You may want to check that your configuration is correct in

You may also want to configure your email server in: /opt/redmine/current/config/configuration.yml


  1. sergio May 20, 2014 5:20 pm  Reply

    Hi! I wonder if your redmine.conf is complete? I can’t find MySQl ‘my_password’ section…

    • Martin DENIZET May 20, 2014 5:26 pm  Reply

      Hi Sergio,
      Good catch! Indeed, the MySQL password doesn’t appear in the Apache configuration file because I was not able to get Git Smart HTTP to work in Ubuntu 14.04.
      So the Apache configuration is actually correct.
      I corrected the article, thanks!

  2. sergio May 20, 2014 5:22 pm  Reply

    What about a Git + Gitolite + Git Hosting integration tutorial?
    I’m no Linux guru and I’ve tried a lot of tutorials but there’s always something going wrong…

    Godd work by the way…

  3. Doni May 21, 2014 3:08 am  Reply

    One of the best tutorials for the redmine installation for Ubuntu.

    Congratulations. Helped us very

  4. Sebastian May 26, 2014 3:37 pm  Reply

    Absolutely awesome. Many Kudos and thanks for the complete description. I went through well. Thank you again. =)

    Best regards,

    • Martin DENIZET May 26, 2014 7:58 pm  Reply

      Great to hear it worked for you!
      Thanks for the feedback.

  5. Kevin May 30, 2014 5:45 am  Reply

    This is the best redmine tutorial I have yet come across. Excellent work! Note that if you restart the system in the middle of the install, you need to re-run:
    ‘source /home/$USER/.rvm/scripts/rvm’

    Otherwise, the system does not see that ruby is installed and gives the following error when trying to gem install
    The program ‘gem’ can be found in the following packages:
    * ruby
    * rubygems

    • Martin DENIZET May 30, 2014 1:05 pm  Reply

      Hi Kevin,
      Good point you make there!
      Note that you can definitively solve this issue with the following command:
      echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
      I will add it to the tutorial as it could be an issue for people updating.
      Thanks for the feedback!

  6. Roman June 3, 2014 3:38 pm  Reply

    Thanks, great job. But i just internal error during loading web-page.
    Adding config.secret_token = “some string” in config/application.rb file, resolved it.

    • Martin DENIZET June 3, 2014 3:54 pm  Reply

      Hi Roman,
      It seems the bundle exec rake generate_secret_token didn’t execute correctly.
      Did you get an error at that step?
      Thanks for the feedback!

  7. rajakvk June 6, 2014 3:58 am  Reply

    Thanks for wonderful guide. After following everything without event, after restarting, im getting following error in the browser

    cannot load such file — bundler/setup (LoadError)
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/lib/phusion_passenger/loader_shared_helpers.rb:248:in `block in run_load_path_setup_code’
    /home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/lib/phusion_passenger/loader_shared_helpers.rb:351:in `running_bundler’
    /home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/lib/phusion_passenger/loader_shared_helpers.rb:246:in `run_load_path_setup_code’
    /home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:100:in `preload_app’
    /home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:158:in `’
    /home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:29:in `’
    /home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:28:in `’

    Thanks for any help.

    • Martin DENIZET June 6, 2014 1:00 pm  Reply

      Hello Rajakvk,

      Thanks for your comment.
      It seems you have 2 rubies installed:
      * 1.9.1 (APT package?)
      * 2.0.0 (RVM)

      Passenger should only by using 2.0.0 so I don’t understand why there is mention of 1.9.1 in the backtrace. Check the Passenger ruby configuration and make sure it calls for ruby 2.0.0 from RVM. the line you should have is:
      PassengerDefaultRuby /home/administrator/.rvm/gems/ruby-2.0.0-p451/wrappers/ruby
      What do you get when you run:
      which ruby
      Also, you could try to run again the bundler installation:
      gem install bundler
      Let me know the result of these commands.

  8. rajakvk June 6, 2014 4:18 pm  Reply

    Thanks for prompt response.

    which ruby

    passenger ruby configuration
    PassengerDefaultRuby /home/administrator/.rvm/gems/ruby-2.0.0-p481/wrappers/ruby

    gem install bundler
    successfully installed bundler-1.6.2
    Parsing documentation for bundler-1.6.2
    1 gem installed

    No luck. Getting same error message.
    Wrote a mail to you with complete error log from (rajakvk at g mail dot com )

  9. rajakvk June 6, 2014 5:28 pm  Reply

    Awesome. As per your advice over email, removed old ruby by executing following command
    sudo apt-get remove ruby

    I can see redmine screen on the browser.

    Thanks a lot.

  10. Robert Wisniewski June 11, 2014 11:29 pm  Reply

    I’m trying to configure redmine on a virtual machine just to test on local host. I can get all the way to the end when I need to reload the apache server the last time. When I do it I get an error:
    * Reloading web server apache2 *
    * The apache2 configtest failed. Not doing anything.
    Output of config test was:
    AH00526: Syntax error on line 13 of /etc/apache2/sites-enabled/redmine.conf:
    SSLCertificateFile: file ‘/etc/apache2/ssl/redmine.crt’ does not exist or is empty
    Action ‘configtest’ failed.
    The Apache error log may have more information.

    I’m pretty new to linux, so whenever I run into an error on guides like this I feel like a fish out of water.

    • Robert Wisniewski June 11, 2014 11:34 pm  Reply

      Nevermind, I was missing the scroll over on
      sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/redmine.key -out /etc/apache2/ssl/redmine.crt

      so I wasn’t getting the -out part.

  11. Divyanshu Das June 16, 2014 8:26 pm  Reply

    Thanks for the great tutorial.
    Worked like charm.

    I have question.
    In the apache conf we are defining :-
    PassengerMinInstances 6

    Is it really necessary to have that many instances ?
    Takes a lot of memory especially for aws micro instace.
    What is the minimum number that we can use ?

  12. Thomas Woo June 17, 2014 4:48 pm  Reply

    Dear, Martin DENIZET

    Very thanks for your reference. Unfortunately my redmine server is not working now.

    My web page just show this message.
    ‘Cannot execute “/home/$USER/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45/buildout/agents/SpawnPreparer”: Permission denied (errno=13)’

    Could you have any idea?

    Thanks for your help.

    – Thomas Woo –

    • Martin DENIZET June 17, 2014 6:07 pm  Reply

      Hi Thomas,
      What do you have in /etc/apache2/conf-available/passenger.conf please?

      • John May 22, 2015 6:42 am  Reply

        I have this exact same problem.

        My /etc/apache2/conf-available/passenger.conf contains

        LoadModule passenger_module /home/athena/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45/buildout/apache2/

        PassengerRoot /home/athena/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45
        PassengerDefaultRuby /home/athena/.rvm/gems/ruby-2.0.0-p481/wrappers/ruby

  13. Thanh LE June 17, 2014 10:00 pm  Reply

    Excellent man! Thank you!

    It works perfectly for me!!!

  14. Nakamura Koji June 17, 2014 11:08 pm  Reply

    thank you thank you thank you!

    and worked with ruby-2.1.2 (current latest)

    on AWS EC2

  15. Shali June 18, 2014 6:58 pm  Reply

    its not working in ubuntu 14.04 server 64 bit.

    i am getting only a directory listing when i try https://localhost


    Index of /
    [ICO] Name Last modified Size Description
    [TXT] 404.html 2014-06-18 11:32 457
    [TXT] 500.html 2014-06-18 11:32 646
    [ ] dispatch.fcgi.example 2014-06-18 11:32 473
    [IMG] favicon.ico 2014-06-18 11:32 7.7K
    [DIR] help/ 2014-06-18 11:32 –
    [ ] htaccess.fcgi.example 2014-06-18 11:32 1.4K
    [DIR] images/ 2014-06-18 11:32 –
    [DIR] javascripts/ 2014-06-18 11:32 –
    [DIR] plugin_assets/ 2014-06-18 11:33 –
    [DIR] stylesheets/ 2014-06-18 11:32 –
    [DIR] themes/ 2014-06-18 11:32

    any idea???

    • Martin DENIZET June 28, 2014 1:52 pm  Reply

      Hi Shali,
      I think you either forgot to configure Passenger or forgot to enable the passenger configuration.
      Check the content of /etc/apache2/conf-available/passenger.conf
      And Check the configuration is enabled: sudo a2enconf passenger
      Then restart Apache: sudo service restart apache2

  16. Shali June 18, 2014 7:20 pm  Reply

    After running a2disconf passenger when am trying https://localhost its showing an error message
    Web application could not be started

    cannot load such file — bundler/setup (LoadError)
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:245:in `block in run_load_path_setup_code’
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler’
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `’

    got any idea?

    • Martin DENIZET June 28, 2014 1:57 pm  Reply

      I think you’re mistaken, it’s sudo a2enconf passenger and not a2disconf passenger.
      Did you have any service previously installed on this server?

  17. Grox June 23, 2014 3:16 am  Reply

    Works like a charm. The best guide I ever saw for redmine.
    You can add advice and “how to” to create new user in the begining, cause it is often that new VPS has only root user.

    • Martin DENIZET June 28, 2014 2:00 pm  Reply

      Great to hear about your success! Good point for the new user, I will add that.

    • Martin DENIZET June 28, 2014 2:16 pm  Reply

      Great! Thank you for you contribution, I’ll write the tutorial for Puma as the web server if I get time.

  18. John June 25, 2014 1:21 am  Reply

    This was an amazing tutorial. I really enjoyed how inclusive you were and how you explained what each step was doing. I do have one question though. This setup is a little different than my previous redmine setups (meaning the default file locations and everything are odd to me). When I go through redmine’s plugin tutorial, this setup seems to be out of sync with what’s happening. Do you have any advice on how to use redmine’s plugin generator. Here is the location of redmine’s tutorial that doesn’t work with this setup.
    Thanks, and I really did enjoy the tutorial.

    • John June 25, 2014 1:26 am  Reply

      ignore this. I had a typo in my command that threw an odd error, and my question isn’t relevant. once again, loved the tutorial 🙂

  19. PaulG June 27, 2014 8:26 pm  Reply

    HI Martin

    I followed this guide and it took a while to get the authenication working. However when I now browse to redmine in Chrome I get a 404 error saying it cannot be found?

    Any idea where I may have done wrong?



    • Martin DENIZET June 28, 2014 2:29 pm  Reply

      Hi Paul,
      By authentication, do you mean Git/SVN authentication or Redmine’s authentication?
      You could have a problem with the hostname like David. The VirtualHost configuration bounds Redmine to an hostname. If you have several VirtualHosts and no DNS records to access them, you could have this problem.
      I’d need to know more:

      • What’s your VirtualHosts? (detail port/ServerName)
      • What URL are you testing?


  20. ronator July 1, 2014 4:17 pm  Reply

    Hey Martin,

    this is clearly one of (if not THE) best and error free tutorial. Thank you for sharing your experience.

      • ronator July 3, 2014 12:23 am  Reply

        This may be interesting for others who want to upgrade redmine on another host:

        All from this tutorial applies but:
        1) You need to copy config/database.yml and configuration.yml and a fresh mysql-dump (only DB redmine) from the old to the new system.

        2) Since new redmine means new ruby you must edit the mysql connector in config/database.yml:
        cahnge the line
        “adapter: mysql”
        “adapter: mysql2”

        3) You do all the steps mentioned above but BEFORE you do
        “gem install bundler”
        just import the old mysql dump into the new (totally empty) redmine database.

        3) You MUST skip:
        “RAILS_ENV=production bundle exec rake redmine:load_default_data”
        Don’t do that if you migrate to a new system. We do not want to load default data!

        4) Follow this great tutorial to the end.
        5) You should have succeeded in mirating your old redmine on a new host with a new redmine version.

        This worked for me on Ubuntu 14.04 LTS.
        Thanks goes to rchady, whom I met in the irc-channel #redmine on freenode and, of course, Martin Denizet.

        Now redmine has become fun to me, again 🙂

  21. Supal Choudhary July 1, 2014 9:29 pm  Reply

    How to fix this error when I am typing http://myip/redmine on web browser it will show the following error.
    Web application could not be started

    cannot load such file — bundler/setup (LoadError)
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:258:in `block in run_load_path_setup_code’
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:361:in `running_bundler’
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:256:in `run_load_path_setup_code’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `’
    /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `’

    • Martin DENIZET July 1, 2014 11:24 pm  Reply

      Hello Supal,
      It seems you installed the Ubuntu ruby package package . You get the error because you are not using the RVM ruby environment that the tutorial helps to setup.
      An easy fix should be for you to remove the ruby package: sudo apt-get remove ruby and then re-install Passenger.

    • Martin DENIZET July 3, 2014 10:07 pm  Reply

      Hi Rajkumar,
      Yes, it should work directly. If you have a problem contact me.

  22. Supal Choudhary July 4, 2014 2:13 pm  Reply

    sudo a2enconf passenger
    ERROR: Conf passenger does not exist!
    How to solve the above issue?

    • Martin DENIZET July 4, 2014 6:10 pm  Reply

      It seems you skipped the step asking to copy the Passenger configuration into /etc/apache2/conf-available/passenger.conf.
      Please, read that section again.

  23. Supal Choudhary July 4, 2014 5:55 pm  Reply

    web browser errors
    Access denied for user ‘redmine’@’localhost’ (using password: NO) (Mysql2::Error)

    and during apache restart errors
    [email protected]:/opt/redmine/current# sudo service apache2 restart
    * Restarting web server apache2 [Fri Jul 04 15:21:21.497604 2014] [so:warn] [pid 11148:tid 139909792921472] AH01574: module passenger_module is already loaded, skipping

    • Martin DENIZET July 4, 2014 6:14 pm  Reply

      For Access denied for user ‘redmine’@’localhost’, it means you misconfigured your database.yml.
      You either:
      * Didn’t input the correct password
      * Didn’t create correctly the MySQL user
      * Didn’t preserve correctly the indentation of the YAML file
      * Are using the wrong Rails environment (for example development instead of production)

    • Martin DENIZET July 4, 2014 6:19 pm  Reply

      module passenger_module is already loaded, skipping. You get this message because you are trying to load twice the Passsenger module.
      It seems your server is a big mess. Maybe you should reinstall from scratch on a fresh OS.

  24. Supal Choudhary July 4, 2014 6:04 pm  Reply

    RSA certificate configured for localhost:443 does NOT include an ID which matches the server name

    how to solve the above error

    • Martin DENIZET July 4, 2014 6:17 pm  Reply

      When you create your SSL certificate (OpenSSL command), you are asked to input the Common Name of the certificate. This common name should match the DNS name that you are using to access the server. Read that section again please.

  25. Perumal July 9, 2014 8:48 pm  Reply

    Very nice document to create Redmine.

  26. Paul Cyrocki July 9, 2014 10:49 pm  Reply

    I have followed your tutorial to a T and have the domain set to mine in both files it says ServerName (as it is a .net). everything is loaded according to Apache and when I go to it says it cannot find the server. I am at a loss I looked through the guide again to make sure I didn’t miss anything and I have not. Maybe you’ll have a better idea. Let me know if i left out any info!

    • Martin DENIZET July 10, 2014 1:16 am  Reply

      Hi Paul,
      I didn’t detail but you should have control the domain you use.
      In your case, you should have control over domain name, by having it registered by a registrar.
      Once you have this (I assume you do), you can create a subdomain in you domain administration interface.
      The said subdomain is a record such as: A where is your server’s public IP.
      In case you don’t have a domain or a public IP, you may create a DNS record in your company router to associate your chosen domain to Redmine’s private IP.
      You should be able to access you Redmine using the server’s IP address if Redmine is the only VirtualHost on the server. Note that you will get a SSL warning when not using the correct DNS name.

      I didn’t want to talk into the details of managing the DNS as it is not the subject of the article and that the configuration required will be almost unique to each company according to their setup.

      Let me know how it goes for you.

      • Paul Cyrocki July 10, 2014 6:18 am  Reply

        I am going to go through the whole setup again, my DNS is setup to point to Now I do host 2 websites on this computer so is that going to break those sites?

        • Martin DENIZET July 10, 2014 2:56 pm  Reply

          Hi Paul, could you add my Skype (martin.denizet) please?
          It will be easier because I’m afraid there is a misunderstanding here.

          • Paul Cyrocki July 11, 2014 1:41 am 

            Sorry, I understand, I guess what I need to do is figure out how to run it as a SubURi because this guide breaks my other site on that network (assuming because of the redirection) Sorry for the confusion. I did not see your message I am EST so we have a bit of a time difference.

          • Martin DENIZET July 11, 2014 1:46 am 

            Actually, if your other site is on port 80, you can remove the redirection: sudo a2dissite redmine-redirect
            Then you can still access Redmine using HTTPS.
            How about that?

  27. John July 10, 2014 1:32 am  Reply

    When I go to, it shows that I have a broken cert. I get my https crossed out, and “The site’s security certificate is not trusted!”. How would I go about fixing this?

    • Martin DENIZET July 10, 2014 2:01 am  Reply

      Hi John,
      I will try to keep the answer short and not too technical.
      HTTPS assumes 2 functions:
      1. Encryption of the traffic. (It’s not possible to read the dialog between the server and the client’s browser)
      2. Authentication of the server (Make sure that we are really talking the server and not a malicious server pretending to be

      In the tutorial, I ask to generate a self-signed SSL certificate because it is immediate, free and better than nothing. With it, the traffic is encrypted but the definition of a self-signed certificate is that there is no third party trusted entity (Certificate Authority) to certify that this certificate is indeed trustworthy (It could be a spoof). That’s the message you get.

      To fix this you have several options, from what I think is the worst, to what could be the best according to your situation:
      1. Get rid of SSL. No more warning but also no more encryption. It’s arguably an option for a local network of trusted computers.
      2. Accept the self signed-certificate. You can install in in your Windows certificate store or in your browser (simple in Firefox). That’s a quick-fix if you are just a couple of users.
      2.bis If you are using Active Directory to manage your computers: Create a new certificate with a signing request and make your Active Directory sign the request. If you computers are domain members, the certificate will appear valid to them, if not, c’est would need to add the AD CA public key to their certificate store. This option can be convenient for a company because it keeps the control of the certificate validation in the AD. If you want to do that ask me, I will write an article about it.
      3. Get a free SSL certificate. Yep, free and valid, with simple validation. You can check StartSSL:
      4. Purchase a certificate with extended validation (EV). It’s a bit over the top. These certificate are mostly for sites like e-commerce with public users needing trust.

      I hope it’s more helpful than confusing!
      Let me know how it goes.

      • John July 22, 2014 11:07 pm  Reply

        Thanks for the help Martin. I actually have Active Directory set up at my location, and they have a .crt and .key file that I can use. I placed that .crt and .key file that they are using on other servers in the /etc/apache2/ssl folder and named them redmine.crt and redmine.key and gave them the same permissions as the instructions above show. It still is showing as an unsafe connection after an apache restart. Thanks again!

        • John July 23, 2014 9:07 pm  Reply

          I found my problem. I was trying the new cert on a test server, and it did not have an url. I didn’t really understand how the certs worked. Thanks for all of your help.

          • Martin DENIZET August 8, 2014 6:29 pm 

            Glad you got it working. Sorry for the late reply, I was on holidays 😉

  28. RShark July 10, 2014 11:51 am  Reply

    Hi Martin,

    long time listener, first time caller…
    (great work on the instructions, good presentation)

    So all was going well until ….
    $sudo a2ensite redmine redmine-redirect
    ERROR: Site redmine does nto exist
    ERROR: Site redmine-redirect does nto exist

    and webpage at https://~IPaddressofhost
    I recieve a SSL recieved a record that exceeded max permissible length
    I did add the ‘-out …. ‘ of the ssl piece after I read the other comments

    Using Xubuntu 14.04 fully updated

    Thanks for your work on this,
    love to roll my/your own instead of Turnkey..

    • Martin DENIZET July 10, 2014 2:54 pm  Reply

      Hi Rob,
      Thank you for your positive feedback!
      Can you please tell me the result of the commands:
      ls -lah /etc/apache2/sites-available
      ls -lah /etc/apache2/sites-enabled

  29. RShark July 11, 2014 8:13 am  Reply

    here are the results from current,
    [email protected]:/opt/redmine/current$ ls -lah /etc/apache2/sites_available
    ls: cannot access /etc/apache2/sites_available: No such file or directory
    [email protected]:/opt/redmine/current$ ls -lah /etc/apache2/sites_enabled
    ls: cannot access /etc/apache2/sites_available: No such file or directory
    but then also
    [email protected]:/etc/apache2/conf-available$ ls -lah
    total 40K
    drwxr-xr-x 2 root root 4.0K Jul 9 21:03 .
    drwxr-xr-x 9 root root 4.0K Jul 9 20:47 ..
    -rw-r–r– 1 root root 315 Jan 3 2014 charset.conf
    -rw-r–r– 1 root root 3.2K Jan 3 2014 localized-error-pages.conf
    -rw-r–r– 1 root root 189 Jan 3 2014 other-vhosts-access-log.conf
    -rw-r–r– 1 root root 313 Jul 9 20:42 passenger.conf
    -rw-r–r– 1 root root 3.6K Jul 9 21:25 redmine.conf
    -rw-r–r– 1 root root 153 Jul 9 21:26 redmine-redirect.conf
    -rw-r–r– 1 root root 2.2K Jan 3 2014 security.conf
    -rw-r–r– 1 root root 455 Jan 7 2014 serve-cgi-bin.conf
    [email protected]:/etc/apache2/conf-available$ ls -lah
    \total 40K
    drwxr-xr-x 2 root root 4.0K Jul 9 21:03 .
    drwxr-xr-x 9 root root 4.0K Jul 9 20:47 ..
    -rw-r–r– 1 root root 315 Jan 3 2014 charset.conf
    -rw-r–r– 1 root root 3.2K Jan 3 2014 localized-error-pages.conf
    -rw-r–r– 1 root root 189 Jan 3 2014 other-vhosts-access-log.conf
    -rw-r–r– 1 root root 313 Jul 9 20:42 passenger.conf
    -rw-r–r– 1 root root 3.6K Jul 9 21:25 redmine.conf
    -rw-r–r– 1 root root 153 Jul 9 21:26 redmine-redirect.conf
    -rw-r–r– 1 root root 2.2K Jan 3 2014 security.conf
    -rw-r–r– 1 root root 455 Jan 7 2014 serve-cgi-bin.conf

    I was wondering if I hosed it at the start, I had opened a second shell as su -i and ran apt-get install curl, I exited out after that and ran sudo each time but several commands never asked for a password even though they were sudo.

    It’s just a virtualbox machine so if I need to try again I saved a snapshot before starting. practice, practice, practice…

    Thanks again.

    • Martin DENIZET July 11, 2014 11:12 am  Reply

      Hi Rob,
      You did put the redmine.conf and redmine-redirect.conf in the /etc/apache2/conf-available directory instead of /etc/apache2/sites-available.
      I don’t know if it’s the source of your problems but it matters because the configuration is loaded before the sites.
      I suggest you to move these 2 files over to /etc/apache2/sites-available and then run:
      sudo a2ensite redmine redmine-redirect
      Be careful, you did a typo copying the commands I asked you. You replaced the dash by a underscore.

      Sudo has a cache. when you enter your password it will remember that you typed a correct password to elevate privileges for 15minutes by default on Ubuntu. See for more details.

      Let me know if it solves your problems.

  30. Brandon July 12, 2014 2:53 am  Reply

    Thanks for the great step-by-step! I implemented it without SSL as it will be in internally accessible site only.

    One question: What modifications would I have to make to my install to have this accessed under a folder instead of on the main page.

    I dont have DNS working properly yet, so I access my webserver by IP address (eg. I would like it to be ( because I would like to install other sites on the same sever.

    Thanks for your help!

      • Jasen Burkett December 31, 2014 4:12 am  Reply

        I followed your write up, and I firstly want to say you deserve a paycheck for this one! It has been the first write on this topic that has had very minimal (easily fixable) issues.

        I am having one slight issue that I hope you can help me fix. When attempting to go to the address ( (site = amazon ec2 instance public address) it did not work, so I did what you said, and still no go. So then I followed your comment above and edited the file, restarted the apache2 server and then attemped to go to site/redmine and that gives me a 404 error.

        What could I be missing.

        Again this is a AWS EC2 Instance running Ubuntu 14 LTS.

        Thank you in advance

        • Martin DENIZET December 31, 2014 6:40 am  Reply

          Hello Jasen,

          Thank you for your comment, it’s always great to get positive feedback!
          Regarding your issue I suggest you to check the following things:

          • ls -la /etc/apache2/sites-enabled, to check the sites enabled in Apache2. It should be redmine-redirect.vhost and redmine.vhost
          • Servers’ firewall, maybe incoming connections on port 443 are not allowed in iptables or they need to be allowed in the EC2 instance manager (I don’t have experience with EC2 so I’m not sure how their system works)

          From you comment, I feel like there could be a misunderstand on the URL to use. The URL you should connect to is https://domain.tld/, there is no /redmine to add.

          Tell me if it helps.


  31. RShark July 13, 2014 7:35 am  Reply

    Hi Martin,

    All is good now, Redmine is up and running with SSL, this time used copy and paste of all commands into a fresh build.

    The fail earlier was caused by trying to re-type in all the commands from your instructions, after a full work day, after a ‘legal’ recreation (Denver). My typos were at a peak…

    Again great work on the instruction, thanks for all..

  32. RShark July 14, 2014 1:49 am  Reply

    Are there any concessions with plugins using this method of deployment? to add CRM light as an example.

  33. RShark July 14, 2014 5:19 am  Reply

    Hi Martin,
    When I try to run the second step of the CRM light plugin install, I’m getting these errors, I did look through the CRM forum but did not see anyone else with these type of errors, hope I’m not bothering you in the wrong place but if you have a preference on how to setup the permissions to fix this, it sure would be appriciated..

    steps from fresh bootup of fresh install;
    copy extracted CRM plugin ‘redmine_contacts’ into /opt/redmine/current/plugins/
    source /home/$USER/.rvm/scripts/rvm
    cd /opt/redmine/current/
    bundle install –without development test
    bundle exec rake redmine:plugins NAME=redmine_contacts RAILS_ENV=production

    Rails Error: Unable to access log file. Please ensure that /opt/redmine/current/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
    rake aborted!

    Could not create directory /opt/redmine/current/public/plugin_assets/redmine_contacts/images: Permission denied – /opt/redmine/current/public/plugin_assets/redmine_contacts

    Again my apologies if this is the wrong place fror this but thought it could be a permissions issue for all plugins
    No typos, just copy and paste this time..

    Thank you..

    • Martin DENIZET July 14, 2014 11:37 am  Reply

      Hi Rob,
      Good catch there, the permissions are not correct in my article to allow installing a plugin that generates log entries or assets. For it to work, you would have to switch as www-data or sudo which is not very practical. Alternatively, you could become member of the www-data group, with few permission tweaks it would work.
      Here is the practical fix:
      cd /opt/redmine/current
      sudo chmod 0775 log
      sudo chmod -R 0665 log/*.log
      sudo chown -R www-data:$USER files log tmp public/plugin_assets
      sudo chmod -R 0775 public/plugin_assets

      I took the info for permissions from, I didn’t see there was a problem because there is no problem when you run the command as root.
      Thanks for the feedback and sorry for the time you spent on this error!
      Let me know if your problem is solved. I update the article immediately.

  34. RShark July 14, 2014 12:48 pm  Reply

    Thanks Martin…
    All is good with the world now
    Several of the plugins are working great and themes too..

    Thanks so very much for the quick responses and excellent work.
    If you’re ever in Denver, let me know, I owe you some refreshments…

  35. Shawn July 15, 2014 11:24 am  Reply

    Hi Martin:
    Sorry to bother, i have met some a problem, the apache2/error.log is

    App 46257 stderr: ActiveRecord::StatementInvalid (Mysql2::Error: Table ‘redm
    ine.settings’ doesn’t exist: SHOW FULL FIELDS FROM `settings`):
    App 46257 stderr: app/models/setting.rb:226:in `check_cache’
    App 46257 stderr: app/controllers/application_controller.rb:98:in `user_se

    Do you any idea?

    • Martin DENIZET July 15, 2014 11:27 am  Reply

      Hi Shawn,
      I looks like your migration didn’t go well. Try to migrate again and look for errors:
      RAILS_ENV=production bundle exec rake db:migrate

  36. Claudiu Cristea July 25, 2014 3:47 am  Reply

    Hi Martin,

    Great writeup. When I preform

    $ RAILS_ENV=production bundle exec rake db:migrate

    I’m getting:

    Could not find command “exec rake”.

    • Martin DENIZET August 8, 2014 6:42 pm  Reply

      Hello Claudiu,
      Sorry for the late reply, I was on holidays.
      As suggested by Alex, you should try:
      bundle exec rake db:migrate RAILS_ENV=production

  37. Murad July 25, 2014 10:57 pm  Reply

    Hi Martin,

    Thanks for a great how-to’w, it’s works like a charm. now I want to add my web project with git authentication with ssh, how I do this??



    • Martin DENIZET August 9, 2014 9:46 am  Reply

      Hi Murad,
      Thanks for the feedback!
      For git with SSH on Redmine, I don’t have much experience as I mostly worked with Git Smart Http.
      However it seems that the popular option is This Gitolite plugin:
      I hope to hear from you if you try it ;).

  38. John August 5, 2014 2:38 am  Reply

    I would be very interested in reading an article on how to integrate redmine and gitlab. I’ve read through a few, but nothing nearly this well thought out and thorough.

  39. Santiago August 26, 2014 11:05 pm  Reply

    Hi Martin,

    just wanna thank you, it was a really straight on installation!.

    I was trying to test redmine locally, and the tutorial was right for me. The only part where I get lost, was on setting my domain (“Common Name” and “Server Name”) because my almost zero experience on this field. Finally setting both to “localhost” made me availabe to access redmine through “https://localhost”.

    Just my two cents, best regards!


    • Martin DENIZET August 27, 2014 10:56 am  Reply

      Hi Santiago,
      Thank you for your feedback! I actually hesitated to include the SSL instructions. After some thinking I decided that I should include them as I’am aiming to describe how to install a production instance.
      Do you have a suggestion to improve that part?

  40. Mehmet Fatih Gultekin August 27, 2014 4:50 pm  Reply

    Thanks for excellent documentation,
    I applied all steps but getting errors. Here is browser output:
    Cannot execute “/home/pserverusr/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.49/buildout/agents/SpawnPreparer”: Permission denied (errno=13)
    Error ID
    Application root
    Ruby interpreter command
    User and groups
    Environment variables

    And my /etc/apache2/conf-available/passenger.conf file :
    LoadModule passenger_module /home/pserverusr/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.49/buildout/apache2/

    PassengerRoot /home/pserverusr/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.49
    PassengerDefaultRuby /home/pserverusr/.rvm/gems/ruby-2.0.0-p481/wrappers/ruby

    How can i fix this error? i searched in internet but couldn’t find anything.

    Thanks for help.

    • Martin DENIZET August 27, 2014 5:14 pm  Reply

      Hello Mehmet,
      I’m a bit swamped at the moment so I suggest you to try this quickfix:
      chown -R $USER:www-data /home/pserverusr/.rvm

  41. Mehmet Fatih Gultekin August 27, 2014 8:36 pm  Reply

    Hi Martin,
    Thanks for your quick feedback.
    I tried ‘chown -R $USER:www-data /home/pserverusr/.rvm’ code but it doesn’t work.

    While i was searching for bugfix, i realized that passenger module didn’t installed properly. I remembered apache module installer recommended to fix ‘home/preserveusr’ path’s permissions but i didn’t fix it.

    Then i revert all the changes, i read your article and applied all steps more carefully. And it works now!

    Thank you very much for this excellent article, and thank you for your help.

  42. RIchard September 1, 2014 5:16 pm  Reply

    To Configure Google apps email: In the end it turned out that you can’t have both tls: true and enable_starttls_auto: true in your settings, so you need to comment tls: true setting and your redmine will be able to send email messages via Google’s SMTP. Hope this will be helpful to someone.

    • Martin DENIZET September 1, 2014 5:53 pm  Reply

      Hi Richard,
      Thank you for the contribution!

  43. Jasmina Dzevlan September 12, 2014 11:31 pm  Reply

    After I finished with Install Ruby 2.0.0 with RVM as you said I started command “rvm list known” and as reply I got rvm: command unknown …. can you help me where might be a problem 😀

    • Jasmina Dzevlan September 13, 2014 5:13 am  Reply

      I have fixed that… now I have a question e mail server for delivery and receiving method I need to use gmail so as redmine.domain server what I need to change ??? 😀 I’m new with this and I have finishing project at school Redmine..please help 😀

      • Martin DENIZET September 13, 2014 2:56 pm  Reply

        Hi, I’ve a test server using Gmail, the config I use is:

        delivery_method: :async_smtp
        enable_starttls_auto: true
        address: ""
        port: 587
        domain: ""
        authentication: :plain
        user_name: "[email protected]"
        password: "password"

        in config/configuration.yml. Be careful, YAML is white-space sensitive.

        More about email configuration in the official documentation:

    • Martin DENIZET September 13, 2014 11:13 am  Reply

      Hello Jasmina,
      For the record, to use RVM you need to run the following command: source /home/$USER/.rvm/scripts/rvm

  44. Jasmina Dzevlan September 13, 2014 4:17 pm  Reply

    after I did everything I couldn’t restart apache i get ”
    apache2: Could not reliably determine the server’s fully qualified domain name, using Set the ‘ServerName’ directive globally to suppress this message”
    can you help me with this … I didi e-mail configuration as you said 😀 but still I don’t know if is it working because as I can see I haven’t cofigurate well apache with redimine

  45. Marty Dickinson October 1, 2014 5:35 am  Reply

    Hi Martin,
    First of all your tutorial is great for starters thanks for sharing that. But my only shows apache default page and I couldn’t change it so if you help me out this I will appreciate it.

    • Martin DENIZET October 1, 2014 12:52 pm  Reply

      Hi Marty,
      You must have Apache’s default configuration enabled. If you don’t need/use it try:
      sudo a2dissite 000-default
      sudo service apache2 restart

      That should do it.

  46. Yogesh October 1, 2014 11:40 pm  Reply

    Hi ,
    First thanks for your tutorial .
    It is working fine on my local server and my local network
    But now I install on AWS server here local ip and static IP are different, like local IP:
    static IP:
    so can you help to define
    /etc/apache2/sites-available/redmine-redirect.conf and
    /etc/apache2/sites-available/redmine.conf files
    paramter like ServerName

    Yogesh S

    • Martin DENIZET October 2, 2014 12:19 am  Reply

      Hi Yogesh,
      Thanks for the feedback.
      You can set your ServerName to your public IP.
      Or better, to you DNS name if you have one.
      Note than you can also use ServerAlias if you have several ways to address your server.
      Make sure you allow through ports 80 and 443.

  47. Zul October 3, 2014 12:35 pm  Reply

    Hello,,,,,, Its great tutorial..
    How can i configure without ssl?

    • Martin DENIZET October 4, 2014 2:40 am  Reply

      Hi Zul,
      Thanks for the feedback.
      To remove HTTPS, disable the HTTPS redirection with: a2dissite redmine-redirect.vhost
      Then edit: /etc/apache2/sites-available/redmine.vhost:
      Remove: NameVirtualHost *:443
      Remove the SSL configuration:
      SSLEngine on
      SSLProtocol +TLSv1.2 +TLSv1.1 +TLSv1
      SSLCompression off
      SSLHonorCipherOrder on
      SSLCertificateFile /etc/apache2/ssl/redmine.crt
      SSLCertificateKeyFile /etc/apache2/ssl/redmine.key

      ## Enable Strict Transport:
      Header add Strict-Transport-Security "max-age=15768000"

      ## SSL Stapling, more at:
      # SSLUseStapling on
      # SSLStaplingResponderTimeout 5
      # SSLStaplingReturnResponderErrors off
      # SSLStaplingCache shmcb:/var/run/ocsp(128000)

      Edit the VirtualHost listening port such as:


  48. Abbas Sheikh October 20, 2014 3:05 am  Reply

    Hello Martin,

    Thanks for this excellent article. I think its the most comprehensive article on redmine installation on internet.

    I have followed your tutorial on Ubuntu 14.04 but I am getting following error
    Could not find rake-10.1.1 in any of the sources (Bundler::GemNotFound)
    /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:92:in `block in materialize’
    /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `map!’
    /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `materialize’
    /usr/lib/ruby/vendor_ruby/bundler/definition.rb:114:in `specs’
    /usr/lib/ruby/vendor_ruby/bundler/definition.rb:159:in `specs_for’
    /usr/lib/ruby/vendor_ruby/bundler/definition.rb:148:in `requested_specs’
    /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs’
    /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup’
    /usr/lib/ruby/vendor_ruby/bundler.rb:120:in `setup’
    /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `’
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    /home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:263:in `block in run_load_path_setup_code’
    /home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:366:in `running_bundler’
    /home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:261:in `run_load_path_setup_code’
    /home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:100:in `preload_app’
    /home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:158:in `’
    /home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:29:in `’
    /home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:28:in `’


  49. svz October 29, 2014 6:09 pm  Reply

    Doesn’t work for me unless I create a symlink
    /var/www/redmine -> /opt/redmine/public
    and set it as document root in redmine site configuration.
    If I don’t do this, apache keeps showing its home page.

    • Martin DENIZET November 5, 2014 11:17 am  Reply

      That should be because you didn’t run sudo a2dissite 000-default and kept the default Apache configuration.

  50. Geoff November 3, 2014 6:52 am  Reply

    You post was excellent. Not sure if you can help I have installed postfix to send email but I get this error:
    An error occurred while sending mail (getaddrinfo: Name or service not known) not sure what the issue is.
    I have checked the config in the configuration.yml file with now luck. Any suggestions would be appreciated.

    • Martin DENIZET November 5, 2014 11:43 am  Reply

      Hi Geoff,
      Seems like a DNS resolution problem. Maybe you kept the sample configuration active?
      What’s the content of your configuration.yml ?

  51. Sergios Charalambous November 21, 2014 1:47 am  Reply

    Worked perfectly!!!! Thank you!

  52. Serg January 7, 2015 12:02 am  Reply

    Thank you for wonderfull article. One is most better material in all internet.
    Good luck!

  53. Al January 23, 2015 3:51 pm  Reply

    Perfect instruction to me. Many Thanks!

  54. ADreNaLiNe-DJ January 28, 2015 6:49 pm  Reply

    Thanks for this article.
    I just tried with the latest 2.6 stable instead of 2.5.
    Everything is working well.
    Thanks again.

  55. Axel January 29, 2015 4:10 am  Reply

    Bonjour Martin,

    thank you for this great looking article.
    I\’m not going to test it now but my first question is, how is the best practice to update all tools above to the last stable version?
    It\’s not about like a standard \”apt-get update && apt-get upgrade\”-procedure 🙂

    Thank you well, axel…

    • Martin DENIZET January 29, 2015 5:45 am  Reply

      Hello Axel,
      Thank you for your comment.
      I want to do an article about this for a while.
      I give you the headlines of how I update an instance installed following my tutorial (note that I’m not using an apt package for either Redmine or Ruby):

      1. Visit to see what is compatible and what’s not
      2. Backup!
      3. cd to redmine’s route and check which branch is used (becaused I install with SVN): svn info
      4. To update in the same branch I would use svn update to switch branch I’d use svn switch URL_OF_NEWEST_STABLE_BRANCH
      5. bundle install && bundle update
      6. RAILS_ENV=production bundle exec rake db:migrate
      7. sudo service apache2 restart

      From memory, that should be it!
      Note that that some plugins you use might become incompatible and it’s a good idea to check for updates.
      Also possible you want to update Ruby to latest compatible but I leave it Google, according to how you installed Ruby it will vary a lot.

      You may also want to check the generic instructions there:


      • Axel January 29, 2015 6:57 pm  Reply

        Thank you well again, Martin.

        To 1: i see, Redmine 2.x doesn’t support Ruby 2.2
        To Ruby: so, i would install it like your charming article!? How is the way to update your way? Roughly so with curl: curl -sSL | bash -s stable –ruby=2.2.0 to cover 2.0.0?


  56. Axel January 29, 2015 8:37 pm  Reply

    Bonjour Martin,

    thank you for this great looking article.
    I’m not going to test it now but my first question is, how is the best practice to update all tools above to the last stable version?
    It’s not about like a standard “apt-get update && apt-get upgrade”-procedure 🙂

    Thank you well, axel…

    • Axel January 29, 2015 11:00 pm  Reply

      Double posting.
      Please delete. My mistake…

  57. Lionel Bourrat January 30, 2015 12:22 am  Reply

    All installation looks working well but i get nothing when i try do display redmine

    I think i got problem with Servername configuration. i Dont have domain name i just want to work on localhost so don\’t know how to configure for it.

    • Martin DENIZET January 30, 2015 3:11 am  Reply

      Hi, for the record, you should have no problem to use it locally using localhost if you disable the Apache default configuration sudo a2dissite 000-default.

  58. Lionel Bourrat January 30, 2015 12:29 am  Reply

    I finally succes to do it with webrick server.

  59. ADreNaLiNe-DJ February 7, 2015 4:49 pm  Reply


    The installation I made with your tutorial works really well.
    But, the thing I need is to have redmine only accessible from a subdirecetory named “redmine”.
    I just need redmine uses “” as base URL for all links and ressources.

    I tried to make a rewriterule in a htaccess but it doesn’t work…

  60. Quentis February 12, 2015 4:32 pm  Reply


    I have some problem with my setup. I get Server not found in the browser. I hace checked redmine.error.log:
    RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) (it is a warn)

    I used the following url where the is registered as dynamic DNS. The shows the default apache page but the one with redmine doesn\’t work unfortunately.

    I am not sure where the problem occured: apache redirection, ssl certificate, redmine & ruby issue etc.

    Could you help me to find out what went wrong?

    Best regards,

    • Martin DENIZET February 28, 2015 4:35 am  Reply

      Hello Quentis,

      I’m pretty sure you get this warning because you use a self-signed certificate.
      You can request a valid one signed by a third-party CA for free from for example.
      Also, if you are in a Active Directory , you can get your certificated signed by AD.


  61. Oxedions February 14, 2015 12:12 am  Reply

    Excellent tuto, testé dans un container docker, fonctionne à merveille. A signaler :

    Avant le
    mysql -uroot -p
    il m\’a fallu démarrer le service
    service mysql start

    Et avant le
    curl -sSL | bash -s stable –ruby=2.0.0
    Il m\’a fallu importer la clé manuellement
    command curl -sSL | gpg –import –

    Un grand merci. Ox.

    • Martin DENIZET February 28, 2015 3:58 am  Reply

      Hello Oxedions,

      Merci du commentaire. Effectivement il y a eu un changement dans l’installation de RVM, je dois mettre à jour mes tutoriaux.


  62. Tim Pepitone February 27, 2015 10:45 pm  Reply

    Excellent write-up.

    After successful install I\’m attempting to add the dmsf plugin but the rake command fails as follows:

    Bundler could not find compatible versions for gem \”activesupport\”:
    In Gemfile:
    simple_enum (>= 0) ruby depends on
    activesupport (>= 4.0.0) ruby

    rails (= 3.2.21) ruby depends on
    activesupport (3.2.21)

    Any ideas?

  63. Mauro February 28, 2015 7:03 pm  Reply

    Many thanks for this well- written tutorial, I have a question, thsough.
    Is git “smart https” access supposed to work in this config?
    I see nothing about it in redmine.conf.
    Should I integrate with Your other walkthrougs?

  64. valery March 9, 2015 6:52 pm  Reply

    Tout d\’abord merci pour ce tuto très utile. Je bute toutefois sur le svn (lié à une 3.0.0 de redmine) qui ne permet pas le logging par pass mysql et refuse l\’accès aux utilisateurs. J\’ai internal error sur http://monip/repositories/numseq/committers

    En revanche, je vois le dépôt sans pouvoir l\’utiliser.

    Auriez-vous une idée ?


  65. Fatih Gultekin March 13, 2015 1:57 am  Reply

    Hi Martin,

    Thanks for tutorial. I have installed Redmine to Hyper-V virtual machine successfully with your tutorial.
    But sometimes, i am getting Internal Server Error. If i restart apache server, redmine is running well again.

    When i look at log files, i saw this error: \”ActionView::Template::Error (cannot load such file — tzinfo/definitions/Europe/Dublin):\”–>timezone part maybe different for other users.

    Here is my log file, you can see detailed error:

    Do you have any idea to fix this issue?

  66. ignacio March 24, 2015 8:19 am  Reply

    Hi, great tutorial. Unfortunately i cant see redmine.
    I believe this is the problem (in redmine.error.log)

    [Mon Mar 23 20:09:45.255513 2015] [core:notice] [pid 24864] AH00094: Command line: \’/usr/sbin/apache2\’
    /home/server/.rvm/gems/ruby-2.2.0/gems/passenger-5.0.4/helper-scripts/prespawn:113:in `initialize\’: Connection refused – connect(2) for \”::1\” port 443 (Errno::ECONNREFUSED)

    Any help or ideas will be greately apreciated.

  67. Gerard April 6, 2015 11:44 pm  Reply

    Having a weird issue with using Redmine in a sub URI. The redmine.conf has the RailsBaseURI /redmine setup and saved. The http://website/redmine works for a couple of days it then makes the http://website/redmine not available and it can only be accessed via http://website. The only way to fix it is to restart Apache2, it then goes back to http://website/redmine. Below is the configuration currently running. Wondering if anyone has encountered a similar problem.

    Redmine 3.0
    Apache 14.04
    Ruby 2.0


    • Gerard April 6, 2015 11:59 pm  Reply

      Below is the contents of the redmine.conf file


      ServerAdmin [email protected]

      DocumentRoot /opt/redmine/current/public/

      ## Passenger Configuration
      ## Details at

      PassengerMinInstances 6
      PassengerMaxPoolSize 20
      RailsBaseURI /redmine
      PassengerAppRoot /opt/redmine/current

      # Speeds up spawn time tremendously — if your app is compatible.
      # RMagick seems to be incompatible with smart spawning
      RailsSpawnMethod smart

      # Keep the application instances alive longer. Default is 300 (seconds)
      PassengerPoolIdleTime 1000

      # Keep the spawners alive, which speeds up spawning a new Application
      # listener after a period of inactivity at the expense of memory.
      RailsAppSpawnerIdleTime 3600

      # Additionally keep a copy of the Rails framework in memory. If you\’re
      # using multiple apps on the same version of Rails, this will speed up
      # the creation of new RailsAppSpawners. This isn\’t necessary if you\’re
      # only running one or 2 applications, or if your applications use
      # different versions of Rails.
      PassengerMaxPreloaderIdleTime 0

      # Just in case you\’re leaking memory, restart a listener
      # after processing 5000 requests
      PassengerMaxRequests 5000

      # only check for restart.txt et al up to once every 5 seconds,
      # instead of once per processed request
      PassengerStatThrottleRate 5

      # If user switching support is enabled, then Phusion Passenger will by default run the web application as the owner if the file config/environment.rb (for Rails apps) or (for Rack apps). This option allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of environment.rb/
      PassengerUser www-data
      PassengerGroup www-data

      # By default, Phusion Passenger does not start any application instances until said web application is first accessed. The result is that the first visitor of said web application might experience a small delay as Phusion Passenger is starting the web application on demand. If that is undesirable, then this directive can be used to pre-started application instances during Apache startup.

      Options +Indexes +FollowSymLinks -MultiViews
      AllowOverride All
      Order allow,deny
      Allow from all

      = 2.3>
      Require all granted

      AddOutputFilter DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4.0[678] no-gzip
      BrowserMatch \\bMSIE !no-gzip !gzip-only-text/html

      ErrorLog ${APACHE_LOG_DIR}/redmine.error.log
      LogLevel warn
      CustomLog ${APACHE_LOG_DIR}/redmine.access.log combined
      ServerSignature Off

  68. Lab April 17, 2015 10:17 pm  Reply

    source /home/$USER/.rvm/scripts/rvm/home/root/.rvm/scripts/rvm: No such file or directoryI can\’t further. Thats what I get over and over and over again.

    • Martin DENIZET October 27, 2015 3:12 am  Reply

      Things changed a bit in RVM since I wrote the article. It needs updating. For the time being, you can trust the instructions RVM gives.

  69. Jake April 29, 2015 4:43 am  Reply

    On the 2nd step I get an error that says it will not download: \”GPG signature verification failed for /home/User/.rvm/achives/blah blah… I used this command to fix it: (gpg –keyserver hkp:// –recv-keys BF04FF17) (no parenthesis) The end of this command may be different for others. It is the characters after RSA key ID.

  70. Jake May 1, 2015 1:48 am  Reply

    I can vouch and say that this tutorial still works just fine. I have a redmine serer up and running 04/30/2015

  71. shaneonabike May 1, 2015 6:46 am  Reply

    Alright so I managed to get everything working thanks to your awesome article and even used the latest Ruby and Redmine.

    But it\’s weird because after I modified the smtp stuff in the configuration file and restarted Apache it no longer worked.

    It\’s now throwing this nasty error indicating it couldn\’t span a process

    Could not spawn process for application /opt/redmine: An error occured while starting up the preloader.
    Error ID: 48dcaf4d

    Have you ever see this before? Is it because I installed this as \”not\” root? For example, does rvm or something else need to be running that I am missing…

    Any help would be awesome!

    • shaneonabike May 1, 2015 6:58 am  Reply

      Okay never mind I tried to comment out all my mail changes and viola it\’s happy camper again… yeesh !

      THANKS FOR an awesome article btw!

  72. dzung July 1, 2015 3:42 pm  Reply

    Thanks a lot for this awesome tutorial, it saved my day.

    Worked fine with redmine 3.1-stable

  73. Elhan October 22, 2015 4:55 am  Reply

    Hi Martin

    Any idea why I get error when running passenger-install-module-apache2-install. It runs up to point where it gives me the passenger config file to use in apache. It complains that there is somethign wrong with configuration. Have checked typos etc and all is correct

    • Martin DENIZET October 27, 2015 2:50 am  Reply

      Hello Elhan,
      It seems it expects you to install the new configuration when it displays it. After that, it checks that you configured Apache correctly. You can ignore the warning and configure Apache after the install script is completed.
      If Redmine starts you did everything correctly!

  74. Stano October 22, 2015 8:57 pm  Reply

    Tx for the best tutorial.
    I have not seen better !!!


  75. Momo March 12, 2016 10:45 am  Reply

    Perfect tutorial brother.
    You should post that to the official redmine website.

  76. prateek January 12, 2017 4:39 pm  Reply

    Can some one tell me how to set up it as centralized host?. Currently i am able to set it up on my local instance. In our organization around 50-60 people needs to use it.
    Any help will be appreciated

  77. Amit September 22, 2017 4:25 pm  Reply

    I wanted to upgrade my redmine version from 3.1.1 to 3.4.2 (2017-07-16).

    can you please help on this.

Leave a Reply