Skip to main content

Install OpenProject on Debian 12, with NGINX

OpenProject's official documentation provides many ways you can use to install OpenProject. You can choose to install via a package manager on bare metal or virtual machine, install via docker, or install with Kubernetes.

https://www.openproject.org/download-and-installation/ 

Screenshot 2023-10-13 190224.pngIn this guide, I will go over installing OpenProject on a Debian 12 system. 

https://www.openproject.org/docs/installation-and-operations/installation/packaged/ 

The official documentation has the installation steps for Debian 12 using the root user. 

Screenshot 2023-10-13 190245.png

However, as I prefer to run commands with a sudo user instead on a Debian system, I took a look at the Ubuntu installation steps, and used those commands instead, with modifying the package source to be the Debian one. 

Screenshot 2023-10-13 190354.png

Prerequisites for Debian 12 Minimal Installations

On a fresh, new Debian 12 Minimal Installations, you will need to install the following prerequisites packages before you can successfully install OpenProject.

sudo apt install apt-transport-https ca-certificates wget 

Screenshot 2023-10-13 190849.png

Installation

Import the OpenProject PGP key that is used to sign the OpenProject packages:

wget -qO- https://dl.packager.io/srv/opf/openproject/key | sudo apt-key add -

Screenshot 2023-10-13 191004.png

Add the OpenProject package source:

sudo wget -O /etc/apt/sources.list.d/openproject.list \
  https://dl.packager.io/srv/opf/openproject/stable/13/installer/debian/12.repo

Screenshot 2023-10-13 191110.png

Update the package repo, and install OpenProject

sudo apt update -y
sudo apt install openproject

Screenshot 2023-10-13 192817.png

After a while, OpenProject will be installed.

Screenshot 2023-10-13 192919.png

At this point, OpenProject is not yet ready to be used. You will need to perform some initial configurations first. 

Initial Configurations

To start configuring OpenProject, run the following:

sudo openproject reconfigure

You will be greeted with the GUI for the OpenProject initial configuration.

Select default unless you know you need the BIM version of OpenProject.

Screenshot_2023-10-16_000746.png

Choose Install PostgreSQL server and database locally for a simple setup.

Screenshot_2023-10-16_000806.png

As I prefer to use NGINX as my web server, I choose to skip the web server install step. I will cover setting up the NGINX config later on. 

You can choose to let the GUI configuration setup apache2 for you. 

Screenshot_2023-10-16_000828.png

Choose Install new memcached server

Screenshot_2023-10-16_001012.png

Give your server a FQDN.

Screenshot_2023-10-16_001056.png

Enable SSL. 

Screenshot_2023-10-16_001117.png

Set the login email address for your initial admin account.

Screenshot_2023-10-16_001149.png

Choose your language.

Screenshot_2023-10-16_001227.png

OpenProject will now go through all the configuration processes. 

Screenshot_2023-10-16_001253.png

After a while, OpenProject will finish configuring itself. If you have choose the apache2 setup in the GUI step, you can head over to https://your-openproject-server-FQDN and explore the web interfaces.

Otherwise, continue on to install the NGINX components.

Install and Configure NGINX

Install NGINX from the package repository.

sudo apt install nginx -y

Screenshot_2023-10-16_001907.png

NGINX Configs

Create a new NGINX config file at /etc/nginx/sites-available, using your preferred text editor such as nano.

I named my config file openproject to keep it simple. Modify and paste the following into the new file, and save. 

server {
    server_tokens off;
    listen 443 ssl http2;

    root /opt/openproject/public; #Your OpenProject Location. By default, OpenProject is install in /opt/openproject/public
    index index.html index.htm index.php;

    access_log /var/log/nginx/projects.example.com.log;
    error_log  /var/log/nginx/projects.example.com-error.log error;

    server_name openproject.example.com; #Change this to your OpenProject Server FQDN

    charset utf-8;

    add_header Referrer-Policy "no-referrer-when-downgrade" always;
    add_header X-Content-Type-Options nosniff always;
    add_header X-Frame-Options DENY always;
    add_header X-XSS-Protection "1; mode=block" always;
    add_header Cache-Control "no-transform";

    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 24h;
    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1.3;
    ssl_ciphers EECDH+CHACHA20:EECDH+AES;
    ssl_ecdh_curve X25519:prime256v1:secp521r1:secp384r1;

    ssl_certificate /etc/letsencrypt/live/projects.example.com/fullchain.pem; #Replace this with your SSL Certs
    ssl_certificate_key /etc/letsencrypt/live/projects.example.com/privkey.pem; #Replace this with your SSL Key

    location / {
        proxy_pass         http://127.0.0.1:6000;
        proxy_set_header   Host $host;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host $server_name;
        proxy_set_header   X-Forwarded-Proto $scheme;
        proxy_read_timeout  1200s;

        client_max_body_size 0;
    }

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt  { log_not_found off; access_log off; }

    # block access to all hidden files except .well-known
    location ~* /\.(?!well-known\/) {
        deny all;
    }
}

Screenshot_2023-10-16_002607.png

Screenshot_2023-10-16_002902.png

Test your NGINX config file

sudo nginx -t

Screenshot_2023-10-17_010730.png

If NGINX config test is successful, enable NGINX to auto-start on boot.

sudo systemctl enable nginx

Screenshot_2023-10-17_010825.png

If you have UFW enabled on your system, make sure you allow HTTPS on the UFW

sudo ufw status verbose
sudo ufw allow https

Screenshot_2023-10-17_010851.png

That's it! You should now be able to reach your OpenProject server at https://your-openproject-server-FQDN

Screenshot_2023-10-17_011445.png

Initial Sign In

The default credential for OpenProject Admin account is admin:admin. Change this upon first login!

Screenshot_2023-10-17_211913.png

Screenshot_2023-10-17_211957.png

Use a strong passphrase! 

Screenshot_2023-10-17_212146.png

Screenshot_2023-10-17_212157.png

Choose your preferred language.

Screenshot_2023-10-17_212213.png

You can now start looking around and explore OpenProject.

Screenshot_2023-10-17_212226.png