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.
    docker_1

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

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 https://github.com/discourse/discourse_docker.git /var/discourse
    cd /var/discourse

  • Now we must edit the setup script.

    nano discourse-setup

  • Scroll down to this:
    setup_before

  • And change it to this:

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

  • Launch the setup.

    ./discourse-setup

  • Now answer some questions.

    Hostname for your Discourse? [discourse.example.com]: forum.domain.tld
    Email address for admin account(s)? [me@example.com,you@example.com]: mail@domain.tld
    SMTP server address? [smtp.example.com]: Plesk (Yeah write Plesk in the line)
    SMTP port? [587]: 25 (The Port from the Mailserver in Plesk is 25)
    SMTP user name? [user@example.com]: mail@domain.tld
    SMTP password? [pa$$word]: password123
    Let's Encrypt account email? (ENTER to skip) [me@example.com]: (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:
    hosts
  • Exit with STRG+X and type Y then press enter to save the file
  • Exit the container

    exit

  1. Change the Plesk Proxy settings

I hope i can help somebody.

Greetings from germany

PS: Thanks to Google Translator :smiley:

12 إعجابًا

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

Hi!

Still getting:
“WARNING:: This server does not appear to be accessible at discourse.domain.com:443

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

The subdomain discourse.agoraludica.eu is accessible from the internet.

Is there something like an IP to whitelist?

I now use Plesk Obsidian on Ubuntu 20 and the only setting I need to tweak to allow Discourse to work along other web applications is to add a proxy rule that redirects the port 80 to another (8060 in my case) - and of course, the redirections as well of the port 8060 → 80 and 9443 → 443 in app.yml.
Also, the SSL certificate is automatically renewed without any additional action.
It’s way simpler than before.

إعجابَين (2)

You’ll need to edit app.yml yourself and

./launcher rebuild app

Discourse-setup works only for a standard installation.

إعجاب واحد (1)

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)

Hi,

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

إعجاب واحد (1)

Hi,

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?

هل هناك تحديث لأوبونتو 20.X و بلسك 18.X .. لا يمكنني تنفيذ الطريقة القديمة هناك للأسف

ربما يمكن أن يساعدك ردي المحدث:

4 إعجابات

هل يمكنك مساعدتي في تثبيته - لا يمكنني جعله يعمل

من المحتمل جدًا أن يكون لدى مزود خدمة الخادم الافتراضي الخاص (VPS) تكوين Plesk أو نظام تشغيل يتطلب تكوينات مختلفة عن تكويناتي لجعل Discourse يعمل.
سأكون قادرًا على مساعدتك عبر المنتدى، ولكن ليس بطريقة أخرى، ولست متاحًا للعمل أيضًا. ولكن يرجى العلم أنني لست خبيرًا في Discourse، ولا خبيرًا في Linux، ولا خبيرًا في Plesk.

إذا كنت تريد المزيد من المساعدة عبر المنتدى، فأنت بحاجة إلى تقديم المزيد من المعلومات:

  1. هل تم تثبيت Discourse؟

  2. هل قمت بتطبيق أي نوع مما هو موصوف في الموضوع الأول؟ لأنه من المحتمل جدًا أن تكون هذه المعلومات قديمة. كما قلت، لم أضطر إلى فعل أي شيء تقريبًا لجعل Discourse يعمل.

  3. ما هي رسالة الخطأ التي يعرضها المنتدى عند فتح عنوان URL؟ هل يمكنك مشاركة عنوان URL إذا كان عامًا؟

  4. هل يمكنك إخباري بمعلومات وكيل Nginx/Docker لنطاقك في Plesk؟

  5. هل حاوية Discourse الخاصة بك قيد التشغيل؟

يرجى تقديم أي معلومات إضافية قد تجدها مفيدة.

إعجاب واحد (1)

أعني المساعدة عبر ديسكورد أو شيء من هذا القبيل

عذرًا، ليس لدي أدنى فكرة عما تتحدث عنه.

إعجاب واحد (1)

أتفهم أنك تواجه صعوبة، كما واجهت صعوبة بنفسي عندما كان علي تثبيت Discourse لأول مرة (وكان ذلك على Plesk أيضًا - وهو تثبيت غير مدعوم).\n\nمرة أخرى، أنا على استعداد لمساعدتك هنا لأن المعلومات الناتجة يمكن أن تساعد أشخاصًا آخرين أيضًا، ولكن من فضلك، من أجل الآخرين (ولأجلك)، تحتاج إلى تقديم المزيد من المعلومات حول ما فعلته بالفعل، وما الذي لا يعمل، وما إذا كان لديك أي رسالة خطأ وما إلى ذلك… تحقق من رسالتي السابقة.\n\nإذا لم تتمكن من اتباع هذه الإرشادات البسيطة، فلن يتمكن أي شخص هنا من مساعدتك أو حتى يرغب في ذلك.\n\nخذ وقتك في كتابة ردك وكن دقيقًا قدر الإمكان.

3 إعجابات

تم تقسيم 4 مشاركات إلى موضوع جديد: HTTPS لا يعمل عند تثبيت Discourse في مجلد فرعي