Open Project - Configure instance on Nginx
This is based on this guide using the Debian 10 section: https://www.openproject.org/docs/installation-and-operations/installation/packaged/
Prerequisites
- Nginx server
- Certbot
Install Open Project packages
Configure the package source (note this may be out of date, check the instructions):
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates wget
wget -qO- https://dl.packager.io/srv/opf/openproject/key | sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/openproject.list \
https://dl.packager.io/srv/opf/openproject/stable/12/installer/debian/10.repo
sudo apt-get update
sudo apt-get install openproject
Configure Open Project Interactively
Run sudo openproject reconfigure
then select the following:
- Edition: Default
- Postgres: Install
- Apache server: skip - we are using Nginx
- Hostname: openproject.connorjarvis.xyz - Just added a openproject subdomain
- Server path prefix: None
- Enable SSL: Yes
- SVN: I didn’t get this option but I’d skip
- Admin email: Self explanatory
- Memcached server: Install
Then the install should complete with no issues. However, the web server no needs to be configured to forward traffic to the Open Project instance.
Configure Nginx
Dump this config file in /etc/nginx/conf.d/
with a name such as the domain
that was used in the wizard, e.g. openproject.connorjarvis.xyz.
Below is the config that I used initially:
server {
listen 80;
listen [::]:80;
# domain entered in the install wizard
server_name openproject.connorjarvis.xyz;
# default install path of Open Project
root /opt/openproject/public;
index index.html index.htm index.nginx-debian.html;
# configure incoming traffic to be proxied to localhost:6000,
# this is where Open Project will be listening
location ~ / {
proxy_pass_request_headers on;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; # Needed for HTTPS
proxy_pass http://127.0.0.1:6000;
}
}
Then grab certificates and reload nginx:
certbot --nginx run -d "openproject.connorjarvis.xyz"
sudo systemctl reload nginx
Success
Then go to your domain and log in with user “admin” and pass “admin”. Congratulations, you have successfully installed Open Project!
You will need to correct the hostname in settings. For some reason mine was set to localhost:3000 which was causing issues.
Optimise settings
https://www.openproject.org/docs/installation-and-operations/operation/control/
I have a very small VPS and thus I would like less workers to run as I am only managing myself and not a team of 200 people, like the docs say that it can handle.
Enter the following to set the number of background and web workers to a smaller number:
sudo openproject scale worker=1
sudo openproject config:set OPENPROJECT_WEB_WORKERS=2
sudo openproject restart web