# Installation of OpenProject 4.0 We are still working on the Installation instructions. With the release of OpenProject 4.0 we are striving to ease installation by providing packages for the various distributions. Those are still in the making but you can expect them very soon. We would be happy to hear of any guides you can contribute. ## Manual Installation For now, there is one detailed installation guide for Debian 7 which can be taken as a guideline for other distributions as well: - [Manually on Debian 7.7](https://community.openproject.org/projects/openproject/wiki/OP4_Debian_Stable_with_MySQL_in_production) ## Upgrade From OpenProject 3.0 There is currently one detailed upgrade guide for Debian 7 which can be taken as a guideline for other distributions as well: - [Manual Upgrade on Debian 7.7](https://community.openproject.org/projects/openproject/wiki/OP3_to_OP4_Debian_upgrade) ## Generic Installation Instructions In case none of the above guides fit your system, we have some general installation instructions. They give you an idea on what to do to install OpenProject without providing the platform-dependent details. 1. Consider creating a separate OS-user for OpenProject (so that OpenProject does not run as root/admin) 2. Prepare a database (MySQL or PostgreSQL) including a database-user and access rights to an OpenProject-database 3. Install [Ruby](https://www.ruby-lang.org) (version 2.1.x) (for example with [RVM](https://rvm.io/) or [rbenv](https://github.com/sstephenson/rbenv)) 4. Install the [Bundler gem](http://bundler.io/) 5. Install [Node.js](http://nodejs.org/download/) (for example with [nodeenv](https://pypi.python.org/pypi/nodeenv)) 6. Install [Bower](http://bower.io/) 7. Clone the OpenProject repository from https://github.com/opf/openproject/ 8. Within the OpenProject directory do: 1. `bundle install` 2. `bower install` 9. Configure OpenProject 1. Create the `config/database.yml` file (a template can be found at `config/database.yml.example`) 2. Create the `config/configuration.yml` file (a template can be found at `config/configuration.yml.example`) 3. Validate both files (YAML-files are very sensitive, when it comes to whitespace), for example with: http://www.yamllint.com/ 10. Run the following commands within the OpenProject directory: 1. `bundle exec rake db:create:all` to create the database 2. `bundle exec rake generate_secret_token` to generate the cookie-encryption token 3. `RAILS_ENV="production" bundle exec rake db:migrate` to populate the database with the tables OpenProject needs 4. `RAILS_ENV="production" bundle exec rake db:seed` to generate the default admin-user 5. `RAILS_ENV="production" bundle exec rake assets:precompile` To pack the assets (JavaScript, CSS) so that they can be served in production 11. Serve OpenProject (just like any other Rails application), for example with [Passenger](https://www.phusionpassenger.com/download#open_source) 12. Start the woker-process (which sends OpenProject mails, copies projects, etc.), for example with `RAILS_ENV=production bundle exec script/delayed_job start`