Discourse with Cloudflare and Digital Ocean

AI-generated summary

A community discussion is underway about using Discourse with Cloudflare and Digital Ocean. lilacbull shared their experience trying to set up a reverse proxy using Nginx to enable Full (Strict) SSL/TLS on Cloudflare, but encountered difficulties. ljpp suggested that Nginx is not necessary, as the default Discourse Docker installation contains everything needed. lilacbull explained they were trying to follow Cloudflare’s best practices for using Discourse, but ultimately found the solution by following the Discourse installation instructions under the “Paid HTTPS / SSL support?” section, which allowed them to easily enable Full (Strict) SSL/TLS.

Hello! I’m a newcomer here trying to perhaps start a community with Discourse.

I started my journey with the following How-To on installing Discourse with Digital Ocean:

I already had accounts with Cloudflare so it was natural for me to set up a domain there. After installing Discourse and making progress on setting things up, I hoped to adjust Cloudflare’s SSL/TLS to Full (Strict). I followed this How-To, which left me at a very basic position with Nginx:

At this point I can turn on Full (Strict), and turned on Authenticated Origin Pulls. I just didn’t know how to have Nginx serve as a reverse proxy for Discourse from here.

Sadly, I can tinker on command line to get myself this far, but I am not familiar with Nginx. I did make a few good faith efforts to amend the app file on Discourse to some other port such as 12345:80.

From there I tried following other How-Tos which may not have been precisely for me:

I got stuck. I couldn’t make the changes on my own to get the Reverse Proxy going so I uninstalled Nginx for the time being and dialled down Full (Strict) and Authenticated Pulls.

Does anyone have any additional How-Tos or pointers?

Why are you tinkering with Nginx, as the Discourse Docker installation, the default method, contains everything you need as a self-hoster?

Cloudflare works fine with Discourse.

I’m not sure if that’s a rhetorical question.

I was trying to follow the recommendations laid out here under Best Practices.

https://community.cloudflare.com/t/using-discourse-with-cloudflare-best-practices/602890

I’m new to Discourse and this installation. If there is a How-To for ensuring I can properly turn on Full (Strict), that’s what I am looking for. If there is no need for such a step, then I am open to reviewing anything else that I should do to follow “Best Practices”

EDIT: After considering ljpp’s brief and insightful remark, I reviewed the Discourse installation instructions. I want to point out under the heading 11. (Optional) Add More Discourse Features, the How-To that I was looking for was under “Paid HTTPS / SSL support?”

Once I followed those steps, I EASILY managed to turn on Full (Strict) and I am pleased with the results.

I did not draw a connection that this was what I was looking for. I was accustomed to self-hosting projects as a hobbyist, and I am now enjoying the learning process for Discourse.