---
title: Deploying OpenProject with a Database for PostgreSQL
description: Learn how to install and configure OpenProject on Ubuntu Focal Fossa 20.04 while integrating a Database for PostgreSQL instance with your stack.
tags: OpenProject database PostgreSQL ubuntu
products:
  - postgresql-and-mysql
  - instances
hero: assets/scaleway_openproject.webp
dates:
  validation: 2025-02-18
  posted: 2020-07-23
  validation_frequency: 12
difficulty: beginner
usecase:
  - application-hosting
ecosystem:
  - third-party
---
import image from './assets/scaleway-external-database.webp'
import image2 from './assets/scaleway-postgresql-ip-or-hostname.webp'
import image3 from './assets/scaleway-dbaas-port.webp'
import image4 from './assets/scaleway-username.webp'
import image5 from './assets/scaleway-password.webp'
import image6 from './assets/scaleway-database-name.webp'
import image7 from './assets/scaleway-install-apache2.webp'
import image8 from './assets/scaleway-domain-name.webp'
import image9 from './assets/scaleway-path-prefix.webp'
import image10 from './assets/scaleway-enable-ssl.webp'
import image11 from './assets/scaleway-install-git.webp'
import image12 from './assets/scaleway-git-directory.webp'
import image13 from './assets/scaleway-send-mail.webp'
import image14 from './assets/scaleway-memcache.webp'
import image15 from './assets/scaleway-path-to-ssl-certificate.webp'
import image16 from './assets/scaleway-path-to-private-key.webp'

import Requirements from '@macros/iam/requirements.mdx'


OpenProject is an 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,](https://www.openproject.org/docs/getting-started/openproject-introduction/#project-concept-and-initiation) [definition and planning](https://www.openproject.org/docs/getting-started/openproject-introduction/#project-definition-and-planning), to their [launch or execution](https://www.openproject.org/docs/getting-started/openproject-introduction/#project-launch-or-execution) and provides tools for project [performance, control](https://www.openproject.org/docs/getting-started/openproject-introduction/#project-performance-and-control), and [closure](https://www.openproject.org/docs/getting-started/openproject-introduction/#project-close).

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 [Database](https://www.scaleway.com/en/managed-postgresql-mysql/) into your stack.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An [SSH key](/organizations-and-projects/how-to/create-ssh-key/)
- An [Instance](/instances/how-to/create-an-instance/) running on Ubuntu 22.04 (Jammy)
- `sudo` privileges or access to the root user
- Configured an [A-record pointing to your Instance's IP address](/domains-and-dns/how-to/manage-dns-records/)

## Installing OpenProject

1. [Connect to your Instance via SSH](/instances/how-to/connect-to-instance/).
2. Update and upgrade the system to the latest version available in Ubuntus repositories. 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 ca-certificates wget
    ```
3. Use the following command to import the PGP key used to sign Open Project packages:
    ```
    sudo wget -O /etc/apt/trusted.gpg.d/openproject.asc https://dl.packager.io/srv/opf/openproject/key
    ```
    <Message type="note">
      If you are using `sudo` to launch commands with administrator permissions, your password will be requested.
    </Message>
4. Add the OpenProject repository:
    ```
    sudo wget -O /etc/apt/sources.list.d/openproject.list \
        https://dl.packager.io/srv/opf/openproject/stable/15/installer/ubuntu/22.04.repo
    ```
5. Update the `apt` package list and install the OpenProject Community Edition.
    ```
    apt-get update
    apt-get -y install openproject
    ```

## Creating a database for PostgreSQL

Since OpenProject requires a PostgreSQL database to run, we will be creating a Database for the PostgreSQL instance directly in the [Scaleway console](https://console.scaleway.com/rdb/instances/create).

Follow the instructions to [create a Database Instance](/managed-databases-for-postgresql-and-mysql/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 PostgreSQL database** option to use your Database for PostgreSQL.
    <Lightbox image={image} alt="" />
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 **:**.
    <Lightbox image={image2} alt="" />
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 **:**.
    <Lightbox image={image3} alt="" />
5. Insert the username created for your Database.
    <Lightbox image={image4} alt="" />
    And the corresponding password:
    <Lightbox image={image5} alt="" />
6. Enter the name of your Database Instance (displayed at the top of its *Overview** page, or in the list of your Databases):
    <Lightbox image={image6} alt="" />

    The installer offers the option of installing and configuring a web server using Apache.
7. Select **Install apache2 server** and press enter.
    <Lightbox image={image7} alt="" />
8. Insert the domain name pointed toward your Instance.
    <Lightbox image={image8} alt="" />
9. Set a path prefix. If you leave the field empty, the installation will be performed on the root of your domain.
    <Lightbox image={image9} alt="" />
    The wizard will then ask if you wish to enable SSL/TLS.
10. Proceed by selecting **No** and pressing enter.
    <Lightbox image={image10} alt="" />

    <Message type="note">
      We will enable TLS to secure and encrypt connections between your users and the instance in a later step.
    </Message>
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.
    <Lightbox image={image11} alt="" />
12. Enter the path to the directory that hosts the Git repositories and then the path to the git http backend CGI directory.
    <Lightbox image={image12} alt="" />
13. Select an e-mail application you wish to use to send e-mails from OpenProject and fill in the requested information or **Skip**.
    <Lightbox image={image13} alt="" />
14. Finally, install the Memcache server.
    <Lightbox image={image14} alt="" />

    The installation completes.

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

## Installing an SSL/TLS certificate

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](https://certbot.eff.org/instructions).

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
    cancel):
    ```

    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
      https://acme-v02.api.letsencrypt.org/directory
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      (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 an email about our work
      encrypting the web, EFF news, campaigns, and ways to support digital freedom.
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      (Y)es/(N)o:
      ```

    Choose `Y`es or `N`o and input accordingly.

    The Wizard will then generate your certificate. Once done, it will provide you with the path of the certificate and the private key, as well as inform you of 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

      IMPORTANT NOTES:
      - Congratulations! Your certificate and chain have been saved at:
        /etc/letsencrypt/live/yourdomain.name/fullchain.pem
        Your key file has been saved at:
        /etc/letsencrypt/live/yourdomain.name/privkey.pem
        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:
    <Lightbox image={image15} alt="" />

    To your private key:
    <Lightbox image={image16} alt="" />

    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 log in.

1. Open a web browser and enter `https://<yourdomain.name>/<yourpathprefix>/login`.
    <Message type="tip">
      If you can't reach the application from your browser, try running the following command to start the service:
      ```
      service openproject start
      ```
    </Message>
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](https://docs.openproject.org/) and a [user guide](https://docs.openproject.org/user-guide/) is available to help you get started with their different features.