{"id":2167,"date":"2017-12-18T17:35:21","date_gmt":"2017-12-18T14:35:21","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-install-and-configure-discourse-forum-with-nginx-on-centos-7\/"},"modified":"2017-12-18T17:35:21","modified_gmt":"2017-12-18T14:35:21","slug":"how-to-install-discourse-forum-with-nginx-on-centos-7","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-discourse-forum-with-nginx-on-centos-7\/","title":{"rendered":"How to Install Discourse Forum with Nginx on CentOS 7"},"content":{"rendered":"<p>Discourse is a free and open source software for creating Internet forum community and mailing list. It was created in 2013, and written using Ruby and Javascript programming languages. Discourse forum software has been used by many organizations, including Codeacademy, Udacity, Twitter Developers, Docker Community Forum etc.<\/p>\n<p>In this tutorial, we will show you step-by-step, how to install and configure Discourse Forum with Nginx Web server under the CentOS 7 server. Specifically, we will show you how to install the Discourse Forum Software, configure Nginx as the reverse proxy for the Discourse app, and secure the discourse forum software using free SSL from Letsencrypt.<\/p>\n<p><strong>What we will do<\/strong><\/p>\n<ol>\n<li>Install Docker on CentOS 7<\/li>\n<li>Install and Configure Discourse Forum Software<\/li>\n<li>Generate SSL Letsencrypt on CentOS 7<\/li>\n<li>Install and Configure Nginx as a Reverse Proxy for Discourse<\/li>\n<li>Discourse Web Installer<\/li>\n<li>Discourse Additional Configuration<\/li>\n<\/ol>\n<p><strong>Prerequisites<\/strong><\/p>\n<ul>\n<li>CentOS 7<\/li>\n<li>Root Privileges<\/li>\n<li>SMTP Account &#8211; Mailgun, SendGrid, or Mailjet<\/li>\n<\/ul>\n<h2 id=\"step-install-docker-on-centos-\">Step 1 &#8211; Install Docker on CentOS 7<\/h2>\n<p>The discourse forum will be installed under Docker container. So the first step we must do is to install Docker on our CentOS 7 server.<\/p>\n<p>Install Docker on CentOS 7 using the following command.<\/p>\n<p class=\"command\">wget -qO- https:\/\/get.docker.com\/ | sh<\/p>\n<p>If you do not have the wget command, install it from the repository.<\/p>\n<p class=\"command\">yum -y install wget<\/p>\n<p>If the installation is complete, start Docker service and enable it to launch at boot time using the following systemctl commands.<\/p>\n<p class=\"command\">systemctl start docker<br \/>systemctl enable docker<\/p>\n<p>The Docker engine has been installed and it&#8217;s running on the CentOS 7 server. Check the service status using the following command.<\/p>\n<p class=\"command\">systemctl status docker<\/p>\n<p>The Docker service is active and running.<\/p>\n<p><a class=\"fancybox\" id=\"img-1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7.png\" alt=\"Docker service is running\" width=\"500\" height=\"210\" title=\"\"><\/a><\/p>\n<h2 id=\"step-install-and-configure-discourse-forum-software\">Step 2 &#8211; Install and configure Discourse Forum Software<\/h2>\n<p>In this step, we will install and configure the Discourse software. We will download the discourse docker-compose script, configure it as we need, and then create a new Docker container for discourse forum software.<\/p>\n<p>Before downloading discourse, we need to install the git command to the server.<\/p>\n<p class=\"command\">yum -y install git<\/p>\n<p>Now create a new directory &#8216;\/var\/discourse&#8217; and download\/clone discourse docker script using the git command.<\/p>\n<p class=\"command\">mkdir -p \/var\/discourse<br \/>git clone https:\/\/github.com\/discourse\/discourse_docker.git \/var\/discourse<\/p>\n<p>Go to the discourse directory and copy a sample of docker-compose script &#8216;standalone.yml&#8217; to the &#8216;\/var\/discourse\/containers\/&#8217; directory with the name &#8216;app.yml&#8217;.<\/p>\n<p class=\"command\">cd \/var\/discourse<br \/>cp samples\/standalone.yml containers\/app.yml<\/p>\n<p><a class=\"fancybox\" id=\"img-2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-1.png\" alt=\"Clone discourse docker\" width=\"500\" height=\"166\" title=\"\"><\/a><\/p>\n<p>Now edit the &#8216;app.yml&#8217; file using <a href=\"https:\/\/www.howtoforge.com\/vim-basics\" target=\"_blank\" rel=\"noopener noreferrer\">vim<\/a>.<\/p>\n<p class=\"command\">vim containers\/app.yml<\/p>\n<p><strong>&#8211; Docker Port Mapping<\/strong><\/p>\n<p>By default, all HTTP and HTTPS requests will be handled by the Docker proxy. And for this guide, we will use Nginx for this purpose &#8211; all HTTP and HTTPS will be handled by Nginx web server.<\/p>\n<p>So we need to change the docker port mapping configuration. The Discourse container will only have the HTTP connection, and the host will be open new port &#8216;2045&#8217; and map to the container port 80.<\/p>\n<p>Uncomment the HTTPS line and change the HTTP line with new port &#8216;2045&#8217;, as shown below.<\/p>\n<pre class=\"system\">expose:<br\/>\u00a0 - \"2045:80\"\u00a0\u00a0 # http<br\/>#\u00a0 - \"443:443\" # https<\/pre>\n<p><strong>&#8211; Discourse Domain Name Configuration<\/strong><\/p>\n<p>Type your own domain name for discourse installed on the &#8216;DISCOURSE_HOSTNAME&#8217; line as below.<\/p>\n<pre class=\"system\">DISCOURSE_HOSTNAME: 'discourse.hakase-labs.co'<\/pre>\n<p>And type your email address in the &#8216;DISCOURSE_DEVELOPER_EMAIL&#8217; line.<\/p>\n<pre class=\"system\">DISCOURSE_DEVELOPER_EMAILS: '<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"93fbf2f8f2e0f6d3fbf2f8f2e0f6befff2f1e0bdf0fc\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>'<\/pre>\n<p><strong>&#8211; SMTP Configuration<\/strong><\/p>\n<p>SMTP Configuration is the most important configuration for Discourse Software. Make sure you have the SMTP account for Discourse installation &#8211; you can buy or try free-tier SMTP account from Mailgun, Mailjet or SendGrid.<\/p>\n<p>For this tutorial, we will be using the free-tier SMTP account from Mailgun. Register with Mailgun and configure your domain name, and make sure you get details of your SMTP account.<\/p>\n<p>Then uncomment SMTP configuration and type your account details as below.<\/p>\n<pre class=\"system\">\u00a0 DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org<br\/>\u00a0 DISCOURSE_SMTP_PORT: 587<br\/>\u00a0 DISCOURSE_SMTP_USER_NAME: <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"deaeb1adaab3bfadaabbac9eb6bfb5bfadbbf3b2bfbcadf0bdb1\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a><br\/>\u00a0 DISCOURSE_SMTP_PASSWORD: mypassword<\/pre>\n<p>That&#8217;s it. Save the changes and exit the editor.<\/p>\n<p>Next, build new Discourse Docker image based on app.yml template configuration.<\/p>\n<p class=\"command\">sudo .\/launcher bootstrap app<\/p>\n<p><a class=\"fancybox\" id=\"img-3\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-2.png\" alt=\"Launch Discourse\" width=\"500\" height=\"220\" title=\"\"><\/a><\/p>\n<p>If all is complete, start\/initialize new Discourse container using the following command.<\/p>\n<p class=\"command\">sudo .\/launcher start app<\/p>\n<p><a class=\"fancybox\" id=\"img-4\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-3.png\" alt=\"initialize new Discourse container\" width=\"500\" height=\"102\" title=\"\"><\/a><\/p>\n<p>And the Discourse Docker container is up and running &#8211; check it using the &#8216;docker ps&#8217; command.<\/p>\n<p class=\"command\">docker ps -a<\/p>\n<p>Check the host open port using netstat, and make sure the new service docker-proxy with port 2045 is on the list.<\/p>\n<p class=\"command\">netstat -plntu<\/p>\n<p><a class=\"fancybox\" id=\"img-5\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-4.png\" alt=\"Check if discourse is running\" width=\"500\" height=\"196\" title=\"\"><\/a><\/p>\n<p>The Discourse Forum software has been installed under docker container on the host CentOS 7.<\/p>\n<h2 id=\"step-generate-ssl-letsencrypt-on-centos-\">Step 3 &#8211; Generate SSL Letsencrypt on CentOS 7<\/h2>\n<p>For this tutorial, we will be running Discourse forum under Nginx web server and only accept the HTTPS connection. For this purpose, we need new SSL Certificates for the domain name, and so, we will be using free SSL certificate from Letsencrypt.<\/p>\n<p>Install Letsencrypt command line tool using the yum command in the following way.<\/p>\n<p class=\"command\">yum -y install letsencrypt<\/p>\n<p>After the installation, add new HTTP and HTTPS service to the Firewalld configuration.<\/p>\n<p class=\"command\">firewall-cmd &#8211;add-service=http &#8211;permanent<br \/>firewall-cmd &#8211;add-service=https &#8211;permanent<br \/>firewall-cmd &#8211;reload<\/p>\n<p><a class=\"fancybox\" id=\"img-6\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-5.png\" alt=\"Generate Lets encrypt SSL certificate\" width=\"500\" height=\"419\" title=\"\"><\/a><\/p>\n<p>Now generate new SSL certificates for Discourse forum using letsencrypt command below.<\/p>\n<p class=\"command\">letsencrypt certonly<\/p>\n<p>You will see two verifications from Letsencrypt. Type number &#8216;1&#8217; to spin up a temporary web server for authentication.<\/p>\n<p>As part of this, type your email address for renewing notification, type &#8216;A&#8217; to agree on the letsencrypt TOS (Terms Of Service).<\/p>\n<p>Now type the discourse domain name &#8216;discourse.hakase-labs.co&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-7\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-6.png\" alt=\"letsencrypt certonly command\" width=\"500\" height=\"529\" title=\"\"><\/a><\/p>\n<p>And when the process is complete, you will get the result as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-8\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-7.png\" alt=\"SSL certificate has been created\" width=\"500\" height=\"307\" title=\"\"><\/a><\/p>\n<p>New SSL certificate from letsencrypt has been generated in the &#8216;\/etc\/letsencrypt\/live&#8217; directory.<\/p>\n<h2 id=\"step-install-and-configure-nginx-as-a-reverse-proxy-for-discourse\">Step 4 &#8211; Install and Configure Nginx as a Reverse Proxy for Discourse<\/h2>\n<p>In this tutorial, we will be using the Nginx web server as a reverse proxy for Discourse that&#8217;s running under the Docker container. The Nginx web server will run under HTTP and HTTPS port, and all client requests will be handled by Nginx.<\/p>\n<p>Before installing the Nginx web server, we need to install the EPEL repository on the system.<\/p>\n<p class=\"command\">yum -y install epel-release<\/p>\n<p>Now install nginx from the EPEL repository using the following yum command.<\/p>\n<p class=\"command\">yum -y install nginx<\/p>\n<p>After all the installation is complete, go to the nginx configuration directory &#8216;\/etc\/nginx&#8217;.<\/p>\n<p class=\"command\">cd \/etc\/nginx\/<\/p>\n<p>And create a new additional SSL configuration &#8216;ssl.conf&#8217; using <a href=\"https:\/\/www.howtoforge.com\/vim-basics\" target=\"_blank\" rel=\"noopener noreferrer\">vim<\/a>.<\/p>\n<p class=\"command\">vim ssl.conf<\/p>\n<p>Paste the following SSL configuration there.<\/p>\n<pre class=\"system\" readability=\"11\">ssl_session_timeout 1d;<br\/>ssl_session_cache shared:SSL:50m;<br\/>ssl_session_tickets off;<p>ssl_protocols TLSv1.2;<br\/>ssl_ciphers EECDH+AESGCM:EECDH+AES;<br\/>ssl_ecdh_curve secp384r1;<br\/>ssl_prefer_server_ciphers on;<\/p><p>ssl_stapling on;<br\/>ssl_stapling_verify on;<\/p><p>add_header Strict-Transport-Security \"max-age=15768000; includeSubdomains; preload\";<br\/>add_header X-Frame-Options DENY;<br\/>add_header X-Content-Type-Options nosniff;<\/p><\/pre>\n<p>Save the changes and exit the editor.<\/p>\n<p>Next, create a new nginx virtual host file\u00a0&#8216;discourse.conf&#8217; for Discourse.<\/p>\n<p class=\"command\">vim conf.d\/discourse.conf<\/p>\n<p>Paste the following configuration there.<\/p>\n<pre class=\"system\" readability=\"8\">server {<br\/>\u00a0\u00a0\u00a0 listen 80; listen [::]:80;<br\/>\u00a0\u00a0\u00a0 server_name discourse.hakase-labs.co;<br\/>\u00a0<br\/>\u00a0\u00a0\u00a0 # Automatic Redirect HTTP to HTTPS Nginx<br\/>\u00a0\u00a0\u00a0 return 301 https:\/\/$host$request_uri;<br\/>}<br\/>\u00a0<br\/>server {<br\/>\u00a0\u00a0\u00a0 listen 443 ssl http2;\u00a0 <br\/>\u00a0\u00a0\u00a0 server_name discourse.hakase-labs.co;<p>\u00a0\u00a0\u00a0 # SSL Configuration<br\/>\u00a0\u00a0\u00a0 ssl_certificate \/etc\/letsencrypt\/live\/discourse.hakase-labs.co\/fullchain.pem;<br\/>\u00a0\u00a0\u00a0 ssl_certificate_key \/etc\/letsencrypt\/live\/discourse.hakase-labs.co\/privkey.pem;<br\/>\u00a0\u00a0\u00a0 include \/etc\/nginx\/ssl.conf;<br\/>\u00a0<br\/>\u00a0\u00a0\u00a0 # Reverse Proxy Configuration<br\/>\u00a0\u00a0\u00a0 location \/ {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_pass http:\/\/discourse.hakase-labs.co:2045\/;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Host $http_host;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_http_version 1.1;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Forwarded-Proto $scheme;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_redirect http:\/\/discourse.hakase-labs.co:2045\/ https:\/\/discourse.hakase-labs.co;<br\/>\u00a0\u00a0\u00a0 }<br\/>}<\/p><\/pre>\n<p>Save and exit.<\/p>\n<p>Now test the nginx configuration and make sure there is no error. Then restart the Nginx service.<\/p>\n<p class=\"command\">nginx -t<br \/>systemctl restart nginx<\/p>\n<p><a class=\"fancybox\" id=\"img-9\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/9.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-8.png\" alt=\"Test nginx config and restart nginx\" width=\"500\" height=\"173\" title=\"\"><\/a><\/p>\n<p>Nginx installation and configuration as a reverse proxy for Discourse container has been completed.<\/p>\n<h2 id=\"step-discourse-web-installer\">Step 5 &#8211; Discourse Web Installer<\/h2>\n<p>Open your web browser and visit\u00a0your discourse URL, mine is:<\/p>\n<p><strong><em>http:\/\/discourse.hakase-labs.co<\/em><\/strong><\/p>\n<p>And you will be redirected to the HTTPS connection.<\/p>\n<p><a class=\"fancybox\" id=\"img-11\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/11.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-9.png\" alt=\"Discourse web installer\" width=\"500\" height=\"279\" title=\"\"><\/a><\/p>\n<p>Click the &#8216;<strong>Register<\/strong>&#8216; button.<\/p>\n<p>Now we need to create a new &#8216;Administrator&#8217; account.<\/p>\n<p><a class=\"fancybox\" id=\"img-12\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/12.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-10.png\" alt=\"Register admin account\" width=\"500\" height=\"287\" title=\"\"><\/a><\/p>\n<p>Type your admin username and password, then click &#8216;<strong>Register<\/strong>&#8216;.<\/p>\n<p>And you will get the page for email confirmation. Check your email inbox and make sure you get the email configuration from the Discourse forum as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-13\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/13.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-11.png\" alt=\"Email from discourse which contains the password\" width=\"500\" height=\"128\" title=\"\"><\/a><\/p>\n<p>Click on the &#8216;<strong>Link<\/strong>&#8216;.<\/p>\n<p>And you will get the &#8216;Discourse Welcome&#8217; page.<\/p>\n<p><a class=\"fancybox\" id=\"img-14\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/14.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-12.png\" alt=\"Welcome to discourse\" width=\"500\" height=\"148\" title=\"\"><\/a><\/p>\n<p>Click on the button &#8216;<strong>click here to activate your account<\/strong>&#8216;. And now you should get to the following page.<\/p>\n<p><a class=\"fancybox\" id=\"img-15\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/15.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-13.png\" alt=\"activate account\" width=\"500\" height=\"288\" title=\"\"><\/a><\/p>\n<p>Click the &#8216;<strong>Maybe Later<\/strong>&#8216; button.<\/p>\n<p>The Discourse Forum has been installed, and we get the default homepage as shown below.<\/p>\n<p><a class=\"fancybox\" id=\"img-16\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/16.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-14.png\" alt=\"Discourse successfully installed\" width=\"500\" height=\"286\" title=\"\"><\/a><\/p>\n<p>You can go the &#8216;Admin Dashboard&#8217;, and you will get the Discourse Admin Dashboard.<\/p>\n<p><a class=\"fancybox\" id=\"img-17\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_discourse_forum_with_nginx_on_centos_7\/big\/17.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2017\/12\/how-to-install-discourse-forum-with-nginx-on-centos-7-15.png\" alt=\"Discourse dashboard\" width=\"500\" height=\"288\" title=\"\"><\/a><\/p>\n<p>The Discourse Forum Software has been installed with Nginx as a reverse proxy on CentOS 7 server.<\/p>\n<h2 id=\"step-discourse-additional-configuration\">Step 6 &#8211; Discourse Additional Configuration<\/h2>\n<p>During the Discourse installation, some people say they don&#8217;t get the email confirmation for admin user activation.<\/p>\n<p>For this issue, make sure you have the right SMTP account on the configuration app.yml. Or you can activate the admin account manually from your server.<\/p>\n<p>To activate your admin account manually, go to the &#8216;\/var\/discourse&#8217; directory.<\/p>\n<p class=\"command\">cd \/var\/discourse<\/p>\n<p>Now access the discourse container with the following command.<\/p>\n<p class=\"command\">.\/launcher enter app<\/p>\n<p>And activate the first admin user using the rails command as shown below.<\/p>\n<p class=\"command\">rails c<br \/>u = User.last<br \/>u.admin = true<br \/>u.activate<br \/>u.save<\/p>\n<p>Now you can log into the Discourse forum with your username and password.<\/p>\n<h2 id=\"reference\">Reference<\/h2>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Discourse is a free and open source software for creating Internet forum community and mailing list. It was created in 2013, and written using Ruby and Javascript programming languages. Discourse forum software has been used by many organizations, including Codeacademy, Udacity, Twitter Developers, Docker Community Forum etc. In this tutorial, we will show you step-by-step, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-2167","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=2167"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2167\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=2167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=2167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=2167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}