Assistance Needed for Configuring Discourse on a Multi-Site NGINX Server

I have a server on DigitalOcean hosting two existing sites, utilizing the nginx-php-mariadb stack. This server, equipped with 2 cores and 4GB RAM, is largely under-utilized. Hence, I am planning to host a Discourse site on this server as well.

I understand that since I already have two sites running on the nginx stack, I should follow the two links below to set up the Discourse site:

  1. For Standard Dockerized Installation: link
  2. For Configuration: link

Having gone through the above links, I believe I have a grasp of the necessary steps. However, there are a few aspects I am unsure about, and I am seeking guidance before proceeding with the installation. Please bear with me for any basic queries as I am new to Discourse. I have researched various topics over the last couple of days, gaining some understanding, though certain areas still confound me.

Here are my queries. I would greatly appreciate your assistance or any pointers to help me get started:

  1. Are the above two links sufficient for setting up a default Discourse site, or is there additional information I should be aware of?

  2. My server has only 25GB of space, with just 15GB available. I did some calculations and it seems that 15GB may not suffice for storing user-uploaded images in the long run. I prefer not to exceed 50% disk utilisation to avoid risking downtime for the other sites due to space-related issues. Thus, I am considering relocating all space-intensive assets, like images, to a dedicated storage solution. I am aware that DigitalOcean offers Spaces for this purpose, but I am uncertain about configuring this in Discourse to ensure all assets are stored there. I would appreciate any recommendations for up-to-date resources to guide me through this configuration.

  3. My existing sites are secured behind CloudFlare (free tier) and utilize Let’s Encrypt certificates for SSL. CloudFlare handles standard operations like DNS resolution, caching, and security. I intend to maintain this configuration for the Discourse site as well. Is there any explicit configuration required for Discourse in this setup? Currently, my server has the ufw firewall enabled, and only CloudFlare IPs are whitelisted. I assume this setup should suffice.

  4. If I follow the configuration link provided above, will these configuration changes, or any future changes I make, persist if I rebuild/upgrade the Discourse instance?

  5. My other two sites are hosted on WordPress and employ a cache plugin called WPRocket for server-side caching. Is there a similar cache recommendation for Discourse, or are the standard CloudFlare cache settings adequate?

  6. I have enabled backups for my DigitalOcean droplet. I also read that it’s advisable to back up the Discourse instance separately. If so, how can I enable this, and is it possible to store these backups on external storage like DigitalOcean Spaces?

I don’t think you’ll be able to do it with that little disk space. See Set up Discourse on a server with existing Apache sites. There is a similar topic about nginx but I can’t find it in the link search box.

I recommend that you first install on another vm to see how things work before attempting an advanced installation.

It’s possible to use some of cloudflare caching, but it’s speed up features can break discourse. There are lots of topics about problems people have caused with cloudflare.