You can go directly to my step-by-step tutorial here…
Why might you want to install a Discourse Forum on a VPS or Dedicated Server running CloudPanel?
Here are my reasons:
I prefer to use a graphical interface for server and site administration. I’ve used most of the web hosting control panels at one time or another.
In comparison to the rest, CloudPanel is very slim and minimal and uncluttered. It has every feature I need, presented very simply and intuitively. And that’s it. It has nothing I don’t need.
I develop and host and …
On my (Hetzner) dedicated server I have installed a fresh Discourse instance (and that is the only thing on the server at this point.)
Now I want to use
CloudPanel as the reverse proxy, so I can also use the server to host Ghost blogs and Wordpress sites for some of my clients.
this tutorial, and having also studied the other posts also below, it seems possible.
But I’m struggling with my learning curve about reverse proxies.
I can easily install and manage my sites using the CloudPanel.
But, I am not clear about the correct order or procedure to make CloudPanel play nice with Discourse.
I would like to document the procedure here in this post.
Can anyone walk me through this?
@pfaffman edited this heavily 2022.02.24. Blame me if it’s broken.
If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container.
NOTE: This is for advanced admins
This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working.
You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will…
@pfaffman re-wrote this as a standalone topic from what @tophee had written earlier. It’s not yet tested by me, and I’ve moved around Chris’s words, so any mistakes are likely those of @pfaffman.
Are there any reasons not to use NGINX Proxy Manager instead of doing this manually as described in Run other websites on the same machine as Discourse?
I’m already using it. I’ve had it on my home server for a while and when I migrated my discourse instance to a new cloud server, I realized t…
First follow one of those guides to move discourse to another port and remove the ssl and let’s encrypt templates and rebuild. Then tell your reverse proxy to use that port.
What if I install CloudPanel first, and create a reverse proxy in the interface…
… and/or in the Vhost Editor…
… could I then install Discourse?
Or, is it necessary or somehow preferable to install Discourse
I’d like to provide the steps to the most simple/intuitive way (for other simpletons like me
It doesn’t matter. As long as
Discourse doesn’t use ports 80/443 because conflict will crash your reverse proxy
Discourse doesn’t use SSL but exposing port 80 to that port what reverse proxy uses to backend
it doesn’t matter means Discourse must be set up as backend before you start reverse proxy and is unreachable some time at that point.
It’s not a setup for a simpleton. You’ll have to understand both how a reverse proxy works and how to configure discourse manually. It’s not going to be simple, or intuitive.
It’s difficult enough to support the
standard install for novices. Many, many hours have been spent making those instructions work for people who don’t know anything about system administration.
Many, many hours have been spent making those instructions work for people who don’t know anything about system administration.
@pfaffman I hope I can help lower those hours for you going forward!
Is containers/app.yml a file that is created by the installer? (I’m not finding it in
I have edited the standalone.yml file and renamed it app.yml
If I place that file into containers/ and then run ./discourse-setup, should that work?
(Assuming that I have correctly configured the settings in my app.yml)
As a relative newcomer to Discourse, the right way to do this looks something like:
Temporarily disable your reverse proxy.
Install Discourse with SSL/Lets Encrypt disabled
Verify a working install on :80
Change the discourse port to 81 or another nonstandard port, or better still use a socket.
Spin up the reverse proxy again, configure against discourse installation (including https encapsulation)
If you don’t install Discourse without the RP up there are too many areas this could go wrong to practically troubleshoot.
You can’t use discourse-setup for your setup. If you edited it then run
./launcher rebuild app
Miracle of miracles – we did it! Thank you for all of your help! I’ll document the procedure in the Topic post above.
OK just stuck on a (small, I think) thing…
To create a second Discourse instance I create and edit the
app2.yml, and the server_name.conf for the second Discourse, changing the DISCOURSE_HOSTNAME and the server_name.
But then… how do I build the app2? I tried:
service nginx restart
./launcher stop app
./launcher rebuild app2
./discourse-setup (I had used ./discourse setup for installing the first instance and then went back and edited the app.yml, and it did work out on the first instance.)
This procedure did result in a Discourse at the second URL, but it seems to be getting data from the first instance.
I’m not understanding something. What is the proper way to build the second site on the second domain?
Is your reverse proxy configured to listen for the second domain and route the traffic to a different port?
You need to change the directory that it uses where it says
/var/discourse/standalone to something different (
You might want to use a two container setup so that your running only one copy of postgres (I think the
Multisite configuration with Docker has some hints), but if you have lots of ram you may not care.
Whoa. I never would have figured that out on my own. You are my hero of the day.
What I’m doing here is (for a client) building a prototype for a versatile Discourse publishing system for Creator-types, integrating Ghost with Discourse.
I’m a front end dev, and now need to fully learn the sysadmin.
So I need to build both a multisite and separate containers.
This is my server setup:
a dedicated server on Hetzner (6 CPU Cores, 64 GB Ram and 2x512GB NVMe)
a VPS on Contabo (8 CPU Cores, 30 GB Ram and 200 GB NVMe)
I don’t know anything about it, but if you and others think your tutorial is reliable, feel free to create a new
sysadmin how-to and whatever other tags you think fits in advanced-setup
(before your answer is automatically deleted in one month )
OK yes. So for that second instance it worked to (after creating a new Site in the CloudPanel):
manually create and edit the app2.yml, changing each instance in that file of
standalone to standalone2
standalone to standalone2 in the Vhost file
./launcher rebuild app2
I think I also cleared all of the Cloudflare caches restarted nginx and then also restarted the server.
Thank you again for your help.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.