Install Discourse on Plesk(Ubuntu 18.04 LTS)

Hello Guys,

i have followed the Install Tutorial for Plesk Onyx (Ubuntu 14.04), but i had many problems.

Now i have everything working on my Plesk and i decided to make a new Tutorial(Mail with the Plesk Mail Server)

1. Set options in Plesk

2. Install Docker

  • Go to Extensions.

  • Search for Docker and install the extension. Now you have Docker as menu point in the side menu.

3. Install Discourse

Now you need an ssh access to your server who is Plesk hosted.
My example data:
Domain: forum.domain.tld
E-Mail: mail@domain.tld
E-Mail: password123

  • Download the git.

    sudo -s
    git clone /var/discourse
    cd /var/discourse

  • Now we must edit the setup script.

    nano discourse-setup

  • Scroll down to this:

  • And change it to this:

  • Exit with STRG+X and type Y then press enter to save the file.

  • Launch the setup.


  • Now answer some questions.

    Hostname for your Discourse? []: forum.domain.tld
    Email address for admin account(s)? [,]: mail@domain.tld
    SMTP server address? []: Plesk (Yeah write Plesk in the line)
    SMTP port? [587]: 25 (The Port from the Mailserver in Plesk is 25)
    SMTP user name? []: mail@domain.tld
    SMTP password? [pa$$word]: password123
    Let's Encrypt account email? (ENTER to skip) []: (to skip this press enter)

  • It takes a while, wait until you get back to the command line. The Docker container fails to start. It doesn’t matter. Now we change the app.yml to work with Plesk.

    nano containers/app.yml

  • Change the Ports and comment two lines. Before:

  • After:

  • Exit with STRG+X and type Y then press enter to save the file.

  • It’s time to rebuild the container.

    ./launcher rebuild app

  1. Change the hosts File in the docker emulation.
  • Now we change the hosts file, so discourse can use the Plesk Mail Server. Enter the Docker container.

    ./launcher enter app

  • Wait until the command line comes back. Now we install nano.

    apt-get install nano

  • Let us change the hosts file.

    nano /etc/hosts

  • add the last line:
  • Exit with STRG+X and type Y then press enter to save the file
  • Exit the container


  1. Change the Plesk Proxy settings

I hope i can help somebody.

Greetings from germany

PS: Thanks to Google Translator :smiley:


@Vault1337 Ich bekomme es nicht zum laufen wäre super wenn du mir helfen konntest danke.


Still getting:
“WARNING:: This server does not appear to be accessible at

Even if I changed checked ports in discourse-setup, and opened 8060 and 9443 in the firewall.

The subdomain is accessible from the internet.

Is there something like an IP to whitelist?

I have Discourse on Plesk since 2017. I didn’t have to edit /etc/hosts but a friend made me add this in Apache & nginx Settings → Additional nginx directives :

location =/ {
	proxy_set_header Host             $host;
	proxy_set_header X-Real-IP        $remote_addr;
	proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto https;

Any idea why?

Also, my installation works perfectly, the only downside is that I have to temporarily disable the port redirection in Plesk when I need to renew the certificate.

1 Like

You’ll need to edit app.yml yourself and

./launcher rebuild app

Discourse-setup works only for a standard installation.

Those lines tell discourse to ignore your proxy servers address and report the address of the actual computer making the request.

The let’s encrypt issue, is because you need not to pass that request to discourse but to the let’s encrypt client that the reverse proxy is running. You could probably add some stuff to tell it to handle that /well-known request itself. Perhaps you’re friends W can help figure that out

1 Like


Solved this issue restarting the docker service on host, to force a rebuilding of the nerwork bridge.

1 Like


Unfortunately I’m not receiving the email to activate.
When I use all email settings on Outlook it’s functional but when I use the same settings I don’t receive anything.

I did exactly what you wrote but there aren’t even mail data in logs.

Anyone else has this issue?