2019-10-31 16:30:01 +01:00
---
sidebar_navigation: false
---
2019-11-14 21:42:55 +00:00
# Manual installation guide
2019-10-21 16:03:35 +02:00
2022-12-07 12:14:21 +01:00
> **IMPORTANT: We strongly recommend to use one of the officially supported [installation methods](../../installation).**
>
2024-01-22 11:37:17 +01:00
> **This guide is simply provided as an OLD and OUTDATED reference, and is NOT up to date with relation to the latest OpenProject releases and will be NOT maintained NOR supported. You are on your own and maybe could ask experienced users in the forum in order to use this guide for any integrations that you would like to solve. We also removed it from the navigation sidebar on the left in order to hide it.**
2019-10-21 12:53:29 +02:00
2019-10-28 10:09:01 +00:00
Please be aware that:
2026-03-31 11:21:01 +02:00
- This guide **requires ** that you have a clean **Ubuntu 18.04 ** **x64 ** installation
with administrative rights (i.e. you must be able to `sudo` ). We have tested
the installation guide on an Ubuntu Server image, but it should work on any
derivative. You may need to alter some of the commands to match your
derivative.
2019-10-28 10:09:01 +00:00
2026-03-31 11:21:01 +02:00
- OpenProject will be installed with a **PostgreSQL ** database.
2019-10-28 10:09:01 +00:00
2026-03-31 11:21:01 +02:00
- OpenProject will be served in a production environment with the **Apache ** server
(this guide should work similarly with other servers, like nginx and others)
2019-10-28 10:09:01 +00:00
2022-12-07 12:14:21 +01:00
> **NOTE:** We have highlighted commands to execute like this
2019-10-28 10:09:01 +00:00
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ user@host] command to execute
```
The `user` is the operating system user the command is executed with.
In our case it will be `root` for most of the time or `openproject` .
If you find any bugs or you have any recommendations for improving this
tutorial, please, feel free to create a pull request against this guide.
## Create a dedicated OpenProject user
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
sudo groupadd openproject
sudo useradd --create-home --gid openproject openproject
sudo passwd openproject #(enter desired password)
```
## Install the required system dependencies
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@host] apt-get update -y
[ root@host] apt-get install -y zlib1g-dev build-essential \
libssl-dev libreadline-dev \
libyaml-dev libgdbm-dev \
libncurses5-dev automake \
libtool bison libffi-dev git curl \
poppler-utils unrtf tesseract-ocr catdoc \
2020-11-24 14:35:40 +01:00
libxml2 libxml2-dev libxslt1-dev # nokogiri \
imagemagick
2019-10-28 10:09:01 +00:00
```
## Install the caching server (memcached)
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@host] apt-get install -y memcached
```
## Install and setup the database server (PostgreSQL)
2026-01-22 09:08:17 +01:00
OpenProject requires PostgreSQL 16 or newer. If you system package is too old, you can check [postgresql.org ](https://www.postgresql.org/download/ ) to get a newer version installed. Please use their installation documentation to install the appropriate version for your system.
2019-10-28 10:09:01 +00:00
Once installed, switch to the PostgreSQL system user.
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@host] su - postgres
```
Then, as the PostgreSQL user, create the database user for OpenProject. This will prompt you for a password. We are going to assume in the following guide that this password is 'openproject'. Of course, please choose a strong password and replace the values in the following guide with it!
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ postgres@host] createuser -W openproject
```
Next, create the database owned by the new user
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ postgres@host] createdb -O openproject openproject
```
Lastly, revert to the previous system user:
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ postgres@host] exit
# You will be root again now.
```
## Installation of Ruby
2025-02-27 17:48:20 +01:00
There are several possibilities to install Ruby on your machine.
2024-11-19 11:37:02 +01:00
We will use [rbenv ](https://github.com/rbenv/rbenv ).
2024-08-26 11:18:21 +02:00
Please be aware that the actual installation of a specific Ruby version takes some time to finish.
2019-10-28 10:09:01 +00:00
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@host] su openproject --login
[ openproject@host] git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
[ openproject@host] echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
[ openproject@host] echo 'eval "$(rbenv init -)"' >> ~/.profile
[ openproject@host] source ~/.profile
[ openproject@host] git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
2024-08-26 11:18:21 +02:00
```
We suggest you install the version we require in [.ruby-version ](https://github.com/opf/openproject/blob/dev/.ruby-version ).
2026-03-31 11:21:01 +02:00
Read the first line e.g. `4.0.2` and install that version.
2019-10-28 10:09:01 +00:00
2024-08-26 11:18:21 +02:00
``` shell
2026-03-31 11:21:01 +02:00
[ openproject@host] rbenv install 4.0.2
2019-10-28 10:09:01 +00:00
[ openproject@host] rbenv rehash
2026-03-31 11:21:01 +02:00
[ openproject@host] rbenv global 4.0.2
2019-10-28 10:09:01 +00:00
```
To check our Ruby installation we run `ruby --version` . It should output
something very similar to:
2024-04-29 13:52:04 +02:00
``` text
2026-03-31 11:21:01 +02:00
ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [arm64-darwin25]
2019-10-28 10:09:01 +00:00
```
## Installation of Node
The are several possibilities to install Node on your machine. We will
use [nodenv ](https://github.com/OiNutter/nodenv#installation ). Please
run `su openproject --login` if you are the `root` user. If you are
already the `openproject` user you can skip this command. Please be
aware that the actual installation of a specific node version takes some
time to finish.
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@host] git clone https://github.com/OiNutter/nodenv.git ~/.nodenv
[ openproject@host] echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.profile
[ openproject@host] echo 'eval "$(nodenv init -)"' >> ~/.profile
[ openproject@host] source ~/.profile
2022-05-05 06:49:48 +00:00
[ openproject@host] git clone https://github.com/OiNutter/node-build.git ~/.nodenv/plugins/node-build
2019-10-28 10:09:01 +00:00
2021-02-25 04:21:03 +09:00
[ openproject@host] nodenv install 14.16.0
2019-10-28 10:09:01 +00:00
[ openproject@host] nodenv rehash
2021-02-25 04:21:03 +09:00
[ openproject@host] nodenv global 14.16.0
2019-10-28 10:09:01 +00:00
```
To check our Node installation we run `node --version` . It should output something very similar to:
2024-04-29 13:52:04 +02:00
``` text
2025-10-27 10:36:46 +01:00
v22.21.0
2019-10-28 10:09:01 +00:00
```
## Installation of OpenProject
2022-12-07 12:14:21 +01:00
We will install the OpenProject Community Edition. It contains the recommended set of plugins for use
2022-03-23 16:36:45 +01:00
with OpenProject. For more information, see [github.com/opf/openproject ](https://github.com/opf/openproject ).
2019-10-28 10:09:01 +00:00
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@host] cd ~
2025-11-27 08:49:45 +01:00
[ openproject@host] git clone https://github.com/opf/openproject.git --branch stable/17 --depth 1
2019-10-28 10:09:01 +00:00
[ openproject@host] cd openproject
# Ensure rubygems is up-to-date for bundler 2
[ openproject@host] gem update --system
[ openproject@host] gem install bundler
# Replace mysql with postgresql if you had to install MySQL
[ openproject@host] bundle install --deployment --without mysql2 sqlite development test therubyracer docker
[ openproject@host] npm install
```
## Configure OpenProject
Create and configure the database configuration file in config/database.yml
(relative to the openproject directory).
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@host] cp config/database.yml.example config/database.yml
```
Now we edit the `config/database.yml` file and insert our database credentials for PostgreSQL.
It should look like this (please keep in mind that you have to use the values
you used above: user, database and password):
``` yaml
production :
adapter : postgresql
encoding : unicode
database : openproject
pool : 5
username : openproject
password : openproject
```
Next we configure email notifications (this example uses a gmail account) by creating the `configuration.yml` in config directory.
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@host] cp config/configuration.yml.example config/configuration.yml
```
Now we edit the `configuration.yml` file to suit our needs.
``` yaml
production : #main level
email_delivery_method : : smtp #settings for the production environment
smtp_address : smtp.gmail.com
smtp_port : 587
smtp_domain : smtp.gmail.com
smtp_user_name : ***@gmail.com
smtp_password : ****
smtp_enable_starttls_auto : true
smtp_authentication : plain
```
Add this line into `configuration.yml` file at the end of the file for
a better performance of OpenProject:
``` yaml
rails_cache_store : : memcache
```
2024-04-29 13:52:04 +02:00
> **NOTE:** You should validate your `yml` files, for example with [yamlchecker.com](https://yamlchecker.com/). Both, the `database.yml` and `configuration.yml` file are sensitive to whitespace. It is pretty easy to write invalid `yml` files without seeing the error. Validating those files prevents you from such errors.
2019-10-28 10:09:01 +00:00
2022-05-03 15:37:25 +02:00
To configure the environment variables such as the number of web server threads `OPENPROJECT_WEB_WORKERS` , copy the `.env.example` to `.env` and add the environment variables you want to configure. The variables will be automatically loaded to the application's environment.
2019-10-28 10:09:01 +00:00
## Finish the installation of OpenProject
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@host] cd ~/openproject
[ openproject@host] RAILS_ENV = "production" ./bin/rake db:create
[ openproject@host] RAILS_ENV = "production" ./bin/rake db:migrate
[ openproject@host] RAILS_ENV = "production" ./bin/rake db:seed
[ openproject@host] RAILS_ENV = "production" ./bin/rake assets:precompile
```
2023-06-02 16:37:34 +02:00
> **NOTE:** When not specified differently, the default data loaded via db:seed will have an English localization. You can choose to seed in a different language by specifying the language with `OPENPROJECT_DEFAULT_LANGUAGE` or `OPENPROJECT_SEED_LOCALE` environment variable on the initial call to `db:seed`. For instance:
2022-12-07 12:14:21 +01:00
2023-08-23 14:53:53 +02:00
``` shell
2023-06-02 16:37:34 +02:00
[ openproject@all] RAILS_ENV = "production" OPENPROJECT_DEFAULT_LANGUAGE = fr ./bin/rake db:seed
2019-10-28 10:09:01 +00:00
```
2024-04-29 13:52:04 +02:00
2023-06-02 16:37:34 +02:00
will seed the database in the French language.
2019-10-28 10:09:01 +00:00
### Secret token
2024-03-14 14:42:11 +01:00
You need to generate a secret key base for the production environment with `./bin/rails secret` and make that available through the environment variable `SECRET_KEY_BASE` .
2019-10-28 10:09:01 +00:00
In this installation guide, we will use the local `.profile` of the OpenProject user. You may alternatively set the environment variable in `/etc/environment` or pass it to the server upon start manually in `/etc/apache2/envvars` .
2023-08-23 14:53:53 +02:00
``` shell
2024-03-14 14:42:11 +01:00
[ openproject@host] echo " export SECRET_KEY_BASE= $( ./bin/rails secret) " >> ~/.profile
2019-10-28 10:09:01 +00:00
[ openproject@host] source ~/.profile
```
## Serve OpenProject with Apache and Passenger
First, we exit the current bash session with the openproject user,
so that we are again in a root shell.
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@ubuntu] exit
```
Then, we prepare apache and passenger:
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@host] apt-get install -y apache2 libcurl4-gnutls-dev \
apache2-dev libapr1-dev \
libaprutil1-dev
[ root@ubuntu] chmod o+x "/home/openproject"
```
Now, the Passenger gem is installed and integrated into apache.
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@ubuntu] su openproject --login
[ openproject@ubuntu] cd ~/openproject
[ openproject@ubuntu] gem install passenger
[ openproject@ubuntu] passenger-install-apache2-module
```
2021-01-22 09:14:21 -05:00
If you are running on a Virtual Private Server, you need to make sure you have at least 1024mb of RAM before running the `passenger-install-apache2-module` .
2019-10-28 10:09:01 +00:00
Follow the instructions passenger provides.
The passenger installer will ask you the question in "Which languages are you
interested in?". We are interested only in ruby.
The passenger installer tells us to edit the apache config files.
To do this, continue as the root user:
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@host] exit
```
As told by the installer, create the file /etc/apache2/mods-available/passenger.load and add the following line.
But before copy&pasting the following lines, check if the content (especially the version numbers!) is the same as the passenger-install-apache2-module installer said. When you're in doubt, do what passenger tells you.
``` apache
LoadModule passenger_module /home/openproject/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/passenger-5.0.14/buildout/apache2/mod_passenger.so
```
Then create the file /etc/apache2/mods-available/passenger.conf with the following contents (again, take care of the version numbers!):
``` apache
2024-04-29 13:52:04 +02:00
<IfModule mod_passenger.c >
PassengerRoot /home/openproject/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/passenger-5.0.14
PassengerDefaultRuby /home/openproject/.rbenv/versions/2.1.6/bin/ruby
</IfModule >
2019-10-28 10:09:01 +00:00
```
Then run:
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@openproject] a2enmod passenger
```
As the root user, create the file /etc/apache2/sites-available/openproject.conf with the following contents:
``` apache
SetEnv EXECJS_RUNTIME Disabled
<VirtualHost *:80 >
ServerName yourdomain.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /home/openproject/openproject/public
<Directory /home/openproject/openproject/public >
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
Require all granted
</Directory >
# Request browser to cache assets
<Location /assets/ >
ExpiresActive On ExpiresDefault "access plus 1 year"
</Location >
</VirtualHost >
```
Let's enable our new openproject site (and disable the default site, if necessary)
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@host] a2dissite 000-default
[ root@host] a2ensite openproject
```
Now, we (re-)start Apache:
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@host] service apache2 restart
```
Your OpenProject installation should be accessible on port 80 (http). A default admin-account is created for you having the following credentials:
Username: `admin`
Password: `admin`
Please, change the password on the first login. Also, we highly recommend to configure the SSL module in Apache for https communication.
## Activate background jobs
OpenProject sends (some) mails asynchronously by using background jobs. All such jobs are collected in a queue, so that a separate process can work on them. This means that we have to start the background worker. To automate this, we put the background worker into a cronjob.
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ root@all] su - openproject -c "bash -l"
[ openproject@all] crontab -e
```
Now, the crontab file opens in the standard editor. Add the following entry to the file:
``` cron
*/1 * * * * cd /home/openproject/openproject; /home/openproject/.rvm/gems/ruby-2.1.5/wrappers/rake jobs:workoff
```
This will start the worker job every minute.
## Follow-Ups
2019-11-28 10:51:50 +01:00
Your OpenProject installation is ready to run. Please refer to the [Operation guides ](../../operation ) or the [Advanced configuration guides ](../../configuration ) for more details on how to operate and configure OpenProject.
2019-10-28 10:09:01 +00:00
## Plug-In installation (Optional)
This step is optional.
OpenProject can be extended by various plug-ins, which extend OpenProject's capabilities.
2022-01-20 13:06:41 +01:00
For general information and a list of all plug-ins known to us, refer to to the [plug-in page ](../../../system-admin-guide/integrations/ ).
2019-10-28 10:09:01 +00:00
OpenProject plug-ins are separated in ruby gems. You can install them by listing them in a file called `Gemfile.plugins` . An example `Gemfile.plugins` file looks like this:
``` ruby
# Required by backlogs
gem " openproject-meeting " , git : " https://github.com/finnlabs/openproject-meeting.git " , :tag = > " v4.2.2 "
```
If you have modified the `Gemfile.plugin` file, always repeat the following steps of the OpenProject installation:
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@all] cd ~/openproject
[ openproject@all] bundle install
[ openproject@all] npm install
[ openproject@all] RAILS_ENV = "production" ./bin/rake db:migrate
[ openproject@all] RAILS_ENV = "production" ./bin/rake db:seed
[ openproject@all] RAILS_ENV = "production" ./bin/rake assets:precompile
```
Restart the OpenProject server afterwards:
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@all] touch ~/openproject/tmp/restart.txt
```
The next web-request to the server will take longer (as the application is restarted). All subsequent request should be as fast as always.
2023-09-26 10:58:40 +02:00
We encourage you to extend OpenProject yourself by writing a plug-in. Please, read the [plugin creation guide ](../../../development/create-openproject-plugin/ ) for more information.
2019-10-28 10:09:01 +00:00
## Troubleshooting
2024-01-22 11:45:16 +01:00
You can find the error logs for apache here: `/var/log/apache2/error.log`
2019-10-28 10:09:01 +00:00
2024-01-22 11:45:16 +01:00
The OpenProject logfile can be found here: `/home/openproject/openproject/log/production.log`
2019-10-28 10:09:01 +00:00
If an error occurs, it should be logged there.
If you need to restart the server (for example after a configuration change), do
2023-08-23 14:53:53 +02:00
``` shell
2019-10-28 10:09:01 +00:00
[ openproject@all] touch ~/openproject/tmp/restart.txt
```
## Frequently asked questions (FAQ)
2026-03-31 11:21:01 +02:00
- **I followed the installation guide faithfully and OpenProject is running. Now, how do I log in?**
2019-10-28 10:09:01 +00:00
The `db:seed` command listed above creates a default admin-user. The username is `admin` and the default password is `admin` . You are forced to change the admin password on the first login.
If you cannot login as the admin user, make sure that you have executed the `db:seed` command.
2023-08-23 14:53:53 +02:00
```shell
2019-10-28 10:09:01 +00:00
[openproject@all] RAILS_ENV="production" ./bin/rake db:seed
` ``
2026-03-31 11:21:01 +02:00
- **When accessing OpenProject, I get an error page. How do I find out what went wrong?**
2019-10-28 10:09:01 +00:00
2024-01-22 11:45:16 +01:00
Things can go wrong on different levels. You can find the apache error logs here: ` /var/log/apache2/error.log`
2024-04-29 15:12:37 +02:00
2024-01-22 11:45:16 +01:00
The OpenProject log can be found here: ` /home/openproject/openproject/log/production.log`
2019-10-28 10:09:01 +00:00
2026-03-31 11:21:01 +02:00
- **I cannot solve an error, not even with the log files. How do I get help?**
2019-10-28 10:09:01 +00:00
You can find help in [the OpenProject forums ](https://community.openproject.org/projects/openproject/boards ). Please tell us, if possible, what you have done (e.g. which guide you have used to install OpenProject), how to reproduce the error, and provide the appropriate error logs.
It often helps to have a look at the already answered questions, or to search the Internet for the error. Most likely someone else has already solved the same problem.
2026-03-31 11:21:01 +02:00
- **I get errors, since I have installed an OpenProject plug-in**
2019-10-28 10:09:01 +00:00
With each new OpenProject core version, the plug-ins might need to be updated. Please make sure that the plug-in versions of all you plug-ins works with the OpenProject version you use.
Many plug-ins follow the OpenProject version with their version number (So, if you have installed OpenProject version 4.1.0, the plug-in should also have the version 4.1.0).