deploy openproject database postgresql

Jump toUpdate content

Deploying OpenProject with a Managed Database for PostgreSQL

Reviewed on 03 March 2022 • Published on 23 July 2020
  • OpenProject
  • management
  • panel
  • database
  • PostgreSQL

OpenProject - Overview

OpenProject is open source project management software. Available in more than 30 languages, it provides tools and features to assist teams with communication, collaboration and navigating the lifecycle of a project.

The software helps users to organize projects from their initial stages of conception, initiation, definition and planning, to their launch or execution and provides tools for project performance, control and closure.

In this tutorial you will learn how to install and configure OpenProject on an Instance running Ubuntu Focal Fossa 20.04 while integrating a PostgreSQL Managed Database into your stack.


Installing OpenProject

  1. Connect to your Instance via SSH

  2. Update and upgrade the system. Then, install the apt-transport-https package, which allows the use of repositories accessed via the HTTP Secure protocol (HTTPS).

    apt update && apt -y upgrade
    apt -y install apt-transport-https
  3. Use the following command to import the PGP key used to sign Open Project packages:

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

    If you are using sudo to launch commands with administrator permissions, your password will be requested.

  4. Add the OpenProject repository:

    wget -O /etc/apt/sources.list.d/openproject.list \
  5. Update the apt package list and install the OpenProject Community Edition

    apt-get update
    apt-get -y install openproject

Creating a Managed Database for PostGreSQL

Since OpenProject requires a PostGreSQL database to run, we will be creating a managed database for PostgreSQL instance directly in the Scaleway console.

Follow the instructions to [create a Database Instance]/en/docs/storage/database/how-to/create-a-database/). Ensure that you select PostgreSQL as the database engine.

Configuring the stack

You can easily configure your stack and dependencies with OpenProject’s installer. Carry out the following commands from your Instance.

  1. Run the following command to open the installer:

    openproject configure
  2. Select the Use an existing PostrgreSQL database option to use your managed database for PostgreSQL.

  3. Insert the database IP. This is found in your Database Instance’s Overview tab, under Endpoint, and is the sequence of numbers before the :.

  4. Enter the PostGreSQL port. This is found in your Database Instance’s Overview tab, under Endpoint, and is the sequence of numbers before the :.

  5. Insert the username created for your Managed Database.

    And the corresponding password:

  6. Enter the name of your Database Instance (displayed at the top of its *Overview** page, or in the list of your Managed Databases:

    The installer offers the option of installing and configuring a web server using Apache.

  7. Select Install apache2 server and press enter.

  8. Insert the domain name pointed toward your Instance.

  9. Set a path prefix. If you leave the field empty, the installation will be performed on the root of your domain.

    The wizard will then ask if you wish to enable SSL/TLS.
  10. Proceed by selecting No and pressing enter.


    We will enable TLS to secure and encrypt connections between your users and the instance in a later step.

  11. Choose between configuring Apache to automatically create and host SVN or Git repositories. If you wish to use SVN, select Install Subversion repository support. If you wish to use Git, select Skip and then Install Git repository support.

    In this tutorial we will install Git.

  12. Enter the path to the directory that hosts the Git repositories and then the path to the git http backend CGI directory.

  13. Select an e-mail application you wish to use to send e-mails from OpenProject and fill in the requested information or Skip.

  14. Finally, install the Memcache server.

    The installation completes. You can access your OpenProject interface through the address http://<yourdomain.name>/<yourpathprefix> on the web browser.

Installing a SSL/TLS certificate

In order to protect user’s credentials and other confidential information that will be stored in OpenProject, you can generate an SSL certificate issued by Let’s Encrypt for free.

For this purpose we will be using a certbot.

  1. Make sure the universe repository is enabled in Ubuntu.

    apt-get update
    apt-get install software-properties-common
    add-apt-repository universe
    apt-get update
  2. Install certbot by running the command:

    apt-get install certbot
  3. Run certbot while specifying the webroot path as such:

    certbot certonly --webroot --webroot-path /opt/openproject/public -d domain.name

    Replace domain.name by your domain name.

  4. Answer the questions when prompted by the certbot Wizard.

    Enter email address (used for urgent renewal and security notices) (Enter 'c' to

    Insert your e-mail address.

    Please read the Terms of Service at
    https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
    agree in order to register with the ACME server at
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    (A)gree/(C)ancel: A

    Type A to agree.

    Would you be willing to share your email address with the Electronic Frontier
    Foundation, a founding partner of the Let's Encrypt project and the non-profit
    organization that develops Certbot? We'd like to send you email about our work
    encrypting the web, EFF news, campaigns, and ways to support digital freedom.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Choose Yes or No and input accordingly.

    The Wizard will then generate your certificate. Once done, it will provide you the path of the certificate and the private key, as well as inform you the expiration date of the certification.

    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for openproject-scw.ga
    Using the webroot path /opt/openproject/public for all unmatched domains.
    Waiting for verification...
    Cleaning up challenges

    - Congratulations! Your certificate and chain have been saved at:
    Your key file has been saved at:
    Your cert will expire on 2020-10-20. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot
    again. To non-interactively renew *all* of your certificates, run
    "certbot renew"
    - Your account credentials have been saved in your Certbot
    configuration directory at /etc/letsencrypt. You should make a
    secure backup of this folder now. This configuration directory will
    also contain certificates and private keys obtained by Certbot so
    making regular backups of this folder is ideal.

    Take note of the paths provided as they will be required in a later step.

Enabling TLS/SSL

  1. Re-launch the OpenProject installer by running the command:

    openproject reconfigure

    The installation Wizard launches the same prompts as before. Select the same preferences and enter your answers, if necessary, until you reach the server/ssl screen.

  2. Select Yes and enter. When prompted, insert the path to your certificate:

    To your private key:

    And a path to your CA bundle (if you have one).

    Follow through the remaining prompts by entering < OK > every time. The wizard will close and your new configuration will be applied.

Accessing your OpenProject dashboard

To begin editing and configuring your OpenProject workspace you must login.

  1. Open a web browser and enter https://<yourdomain.name>/<yourpathprefix>/login


    If you can’t reach the application from your browser, try running the following command to start the service:

  2. Enter the following credentials to log in as the admin user:

    Username: admin
    Password: admin

    Upon the first login, you will be required to change your password.

Once you have done so, you can begin managing your projects. OpenProject provides a documentation website and a user guide is available to help you get started with their different features.