Author Topic: Install OpenProject with Linux and Docker  (Read 7 times)

Offline javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 35227
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com
Install OpenProject with Linux and Docker
« on: April 21, 2024, 07:12:06 PM »
OpenProject can do classical as well as agile project management for the entire project life cycle. Here's how to set it up securely on your Linux server.



Do you juggle so many projects that you find yourself at a loss for a way to keep them organized and running efficiently? That can lead to delayed (or failed) projects. You don’t want that.

To avoid such a situation, you should be using a project management platform. Although there are several services that are willing to not only take your money but also host your projects on their servers, that might not be the best situation.

If you’re looking for a way to manage those projects but keep related information in-house, you might opt to give OpenProject a try. Thanks to Linux and Docker, it’s really quite easy to deploy — in fact, you can do this in less than 5 minutes.

OpenProject includes the following features:

   • Project planning

   • Task management

   • Agile, kanban, and Scrum

   • Time tracking

   • Team collaboration

   • Product roadmaps

   • Workflows

OpenProject also includes project lists, hierarchies, overviews, templates, dashboards, changes, multiproject views and more. Portfolios and reports are also available as enterprise add-ons.

You can deploy the community edition and test it out. If you need more features, you can always upgrade to an enterprise license.

But first, you’ll need to get OpenProject installed. Let me show you how.

What You’ll Need

I’m going to demonstrate this on my Linux server of choice, Ubuntu. I’ll use version 22.04 LTS for this, so make sure you have a running instance of the operating system. You’ll also need a user with sudo privileges.

Installing Docker

The first thing we’ll do is install Docker Community Edition. First, add the official Docker GPG key with this command:

Code: [Select]
1 curl -fsSL http://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
With that taken care of, you can then add the official Docker repository:

Code: [Select]
1 echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] http://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Before Docker is installed, let’s install a few dependencies with the command:

Code: [Select]
1 sudo apt-get install apt-transport-http ca-certificates curl gnupg lsb-release -y
Update apt with:

Code: [Select]
1 sudo apt-get update
Finally, we can install the latest version of the Docker CE runtime engine:

Code: [Select]
1 sudo apt-get install docker-ce docker-ce-cli containerd.io -y
To use the Docker command without sudo privileges (which could lead to security issues), add your user to the Docker group with:

Code: [Select]
1 sudo usermod -aG docker $USER
You’ll need to log out and then log back in for the changes to take effect.

You’re now ready to deploy OpenProject.

Deploying OpenProject

The Docker command to deploy OpenProject is:

Code: [Select]
1 docker run -dit -p 80:80 -e OPENPROJECT_SECRET_KEY_BASE=secret -e OPENPROJECT_HOST__NAME=127.0.0.1:80 -e OPENPROJECT_http=false openproject/community:12
Make sure to change the IP address for OPENPROJECT_HOST_NAME. Otherwise, you’ll wind up with a hostname mismatch (which can cause problems).

You may notice that I’ve deployed OpenProject with port 80 as the internal and external port. If port 80 is already in use on your server, you’ll want to change the external port to something like this:


Code: [Select]
1 docker run -dit -p 8080:80 -e OPENPROJECT_SECRET_KEY_BASE=secret -e OPENPROJECT_HOST__NAME=127.0.0.1:80 -e OPENPROJECT_http=false openproject/community:12
Accessing OpenProject

Before you attempt to access OpenProject, give the container a few minutes to complete its deployment (1 or 2 minutes should suffice).

Note: If you go with external port 8080, you may need to have users add the port to the address, such as:

Code: [Select]
1 http://SERVER:8080
In the above address, SERVER should either be the IP address or the domain for the hosting server.

On the main OpenProject page, click the “Sign in” drop-down and use admin/admin as the credentials for the admin user. You will then be automatically prompted to change the admin user’s password. Type the current password and then input and verify the new password; then, click Save.

You should now see the OpenProject admin page (Figure 1), where you can start creating projects, invite users and more.


Figure 1: The OpenProject main page.

Using SSL

If you access OpenProject from outside of your LAN, you’ll probably want to enable SSL. Before you do that, you’ll have to configure Apache to be used as a reverse proxy. Install Apache with this command:

Code: [Select]
1 sudo apt-get install apache2 -y
Next, enable the necessary modules:

Code: [Select]
1 sudo a2enmod proxy_http headers rewrite
Create a virtual host for OpenProject with:

Code: [Select]
1 sudo nano /etc/apache2/sites-available/openproject.conf
In that file, paste the following (making sure to change the ServerName entry to match your domain):

Code: [Select]
<VirtualHost *:80>
ServerName openproject.example.com

RewriteEngine on
RewriteRule "^$" "/" [R,L]
ProxyRequests off

<Location "/">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:8080/
ProxyPassReverse http://127.0.0.1:8080/
</Location>

</VirtualHost>

Activate the OpenProject site with this command:

Code: [Select]

1 sudo a2ensite openproject.conf

Next, reload Apache:

Code: [Select]
1 sudo systemctl reload apache2
We’ll now install the necessary software for Let’s Encrypt with the command:

Code: [Select]
1 sudo apt install python3-certbot-apache -y
Create your certificate with the command (swapping out example.com for your domain):

Code: [Select]
1 sudo certbot --apache -d openproject.example.com
Answer all of the questions according to your needs.

With that taken care of, you should be able to access OpenProject with http://SERVER (where SERVER is the IP address or domain of your server).

Congratulations! You now have a powerful project management platform to help make your next project a success and avoid becoming overwhelmed, falling behind or failing outright.

source