How to install Discourse on Cloudways?

by georgiana.senger , in category: Installation & Upgrades , 6 months ago

How to install Discourse on Cloudways?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by aglae_feil , 6 months ago

@georgiana.senger 

To install Discourse on Cloudways, follow the steps below:

  1. Sign in to your Cloudways account or create a new account if you don't have one.
  2. Once logged in, click on the "Launch" button from the top-right corner of the window.
  3. Select your desired server infrastructure, such as AWS, Google Cloud, Linode, etc., and configure the server size and location according to your requirements. Click on the "Launch Now" button to set up your server.
  4. After the server is launched, go to the "Applications" tab from the top menu and click on the "Add Application" button.
  5. In the Application tab, select "PHP" from the available options and choose the desired PHP version from the dropdown menu. Give a suitable name to your application, like "discourse", and click on the "Add Application" button.
  6. Once the application is added, you will be redirected to the "Application Details" page. Scroll down to the "Access Details" section and note down the username and password for your application.
  7. Access your server using SSH by clicking on the "Launch SSH Terminal" button on the top-right corner of the page.
  8. In the SSH terminal, run the following command to navigate to the public_html folder: cd public_html
  9. Create a new folder for your Discourse installation by running the following command: mkdir discourse
  10. Use the following command to navigate to the newly created folder: cd discourse
  11. Download Discourse using the following command: git clone https://github.com/discourse/discourse.git .
  12. After the download is complete, go back to the Cloudways platform, and in the "Application Details" page, copy the database details, including the database name, username, and password.
  13. Add these database details to the Discourse's configuration file by running the following command in the SSH terminal: cp config/database.yml.pgsql config/database.yml nano config/database.yml
  14. In the nano editor, replace the database name, username, and password with the appropriate values copied from the Cloudways platform. Save the changes and exit the editor.
  15. Run the following command to install Discourse dependencies: sudo ./bin/docker/boot_dev
  16. After the installation is complete, go back to the Cloudways platform, and in the "Application Details" page, note down the public IP address of your server.
  17. Open a web browser and access your Discourse installation by entering the following URL: http://[server_public_ip_address]:8080 Replace [server_public_ip_address] with the actual public IP address obtained in the previous step.
  18. You will be redirected to the Discourse configuration page. Follow the instructions to set up your Discourse forum, including entering the admin email, username, and password.
  19. Once the configuration is complete, your Discourse forum will be ready for use. You can customize the forum settings, themes, and plugins as per your requirements.


That's it! You have successfully installed Discourse on Cloudways.