Setup OpenProject
Setting up OpenProject in my Homelab
I am starting this on a fresh install of Ubuntu 22.04 Jammy in my ProxMox Server. I am going to use the DEB/RPM installation as the docker installation is not recommended for production usage. First, lets do an update and upgrade, make sure you are logged in as a user that has root privileges.
sudo apt-get update
sudo apt-get upgrade -y
Next, install package certificates, the OpenProject keys, and the OpenProject List
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/ubuntu/22.04.repo
Now to actually install OpenProject
sudo apt-get update
sudo apt-get install openproject
Now, proceed with initial installation.
sudo openproject reconfigure
Now, to proceed with the installation. I choose not to install the BIM as I won't work in construction project management. I chose to let OpenProject install a SQL server of its choosing as I like it all in one container if I ever want to delete it, or re-create it. Next, it will ask you to install a web-server, or use one that you already have, I chose to let it install the default Apache 2 server. After this, it will ask you to enter your fully qualified domain name, I have this as a subdomain under my TLD ( Top Level Domain ), that I will be setting up my reverse proxy for. After that, it will ask you if you wish to install this as a path prefix, since I didn't want to do that, I just left it empty.
Next it will ask you for SSL configurations, as I am going to be using my Nginx reverse proxy to provide the SSL certificates and pass the connection on to the actual OpenProject Server. So, I chose no. Next it will ask you for SVN/Git integration, since I won't be working with code, I also chose not to add this. Next, you administrator email, and if you would like to install a memcached server. After this, it will start to install OpenProject. If you would like to change your answers, simply do the following.
sudo openproject configure
At this point, you should be able to login to the local instance of your OpenProject server. http://server-local-ip
Now, to setup the internet side of things. First, I created a new CNAME to be a subdomain of my TLD using Cloudflare. I then pointed that CNAME to my home IP address, and turned off Cloudflare Proxy. My router already has ports 80 and 443 set to be open to my SWAG container, I just have to add a new Proxy-Conf to the container. This is done by going to where you mapped the config volume of the container to, and going to /nginx/proxy-confs folder. There should be quite a few confs already in there, either add one more, or rename one of the example ones.
Below I have added what my openproject.subdomain.conf is, you will have to make a few changes for your local machine.
CNAME - change this to whatever you put as your CNAME in Cloudflare
SERVERIP - change this to whatever the local IP is for your OpenProject server
# Open Project Server
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name CNAME.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app SERVERIP;
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header X-Forwarded-Proto https;
}
}
The first lines tell it to listen on port 443 ( SSL encrypted port ), line 7 tells it what subdomain to listen for. Next, lines 9 & 11 include the SSL configurations, and allow any body size. Lines 14 & 15 tell it where the proxy configuration is, and where the resolvers are. Lines 16, 17 and 18 tell the SWAG proxy about the server that it is proxying, with line 19 actually telling it to do the proxying. I had to add Line 20 to allow SWAG to pass along the SSL header to the OpenProject server, otherwise the server will think that it is not getting a proper HTTPS response, when the proxy server is doing all the work. That should be it, you should now be able to access your new OpenProject server from https://CNAME.TopLevelDomain.com