Content
Configuring HTTPS on OpenProject with Cloudflared tunnel
Added by Jason Owens 9 months ago
Hello Everyone,
I recently set up OpenProject on a server on my LAN and configured a Cloudflare tunnel to allow access to it from the internet. The tunnel itself appears to be working fine because I can access OpenProject, log in, and edit things, etc. However, because I used the default HTTP setting, it always shows the warnings at the bottom when using it. I would like to set it up properly for external SSL termination according to the documentation, since my cloudflared tunnel uses HTTPS already on the internet-facing side. However, I'm not sure how to get into the docker container and make the needed adjustments.
When I run `docker ps` on the server, it doesn't list any of the containers, though I know they are running since I can access the front end. I originally followed the instructions in the Quick Start guide to install it:
git clone https://github.com/opf/openproject-deploy --depth=1 --branch=stable/13 openproject
cd openproject/compose
docker-compose pull
OPENPROJECT_HTTPS=false docker-compose up -d
Any help/guidance on this would be greatly appreciated. I have it installed on a server running Ubuntu 22.04 LTS.
Jason O
Replies (2)
Hi Json,
To use OpenProject behind Cloudflare you would start the container with OPENPROJECT_HTTPS variable set to true and you need also to set the OPENPROJECT_HOST__NAME variable to you external host name.
OPENPROJECT_HTTPS=true OPENPROJECT_HOST__NAME="your.external.domain" docker compose up -d
Also you need to set send the "X-Forwarded-Proto 'https'" header from your Cloudflare reverse proxy to OpenProject.
You can read more about that here:
https://www.openproject.org/docs/installation-and-operations/configuration/ssl/#external-ssl-termination
Best regards
Tizian
It looks like your container isn't showing up in docker ps because you’re running it with the docker-compose command, which might be using a different context. Try running docker-compose ps inside the project directory instead, and that should show you the containers.
For the SSL termination, since your tunnel is already using HTTPS, you’ll need to configure OpenProject to trust Cloudflare’s proxy by setting OPENPROJECT_HTTPS=true in your .env file before restarting the container. I’ve had similar issues before, and adjusting the container environment variables like that really helped.