Forem Creators and Builders 🌱

Cover image for Installing Forem on Ubuntu 18.04 (Part 1 - Ruby on Rails)

Installing Forem on Ubuntu 18.04 (Part 1 - Ruby on Rails)

Dawood Khan Masood on August 19, 2020

I am new to Forem so expect me to make mistakes. I am only writing this article so it could help newbies like me in the future. If there is anythin...
Collapse
 
rehmatworks profile image
Rehmat Alam

Thank you for writing this guide. Were you able to deploy this software on a domain of yours individually? If yes, please share the URL. I have been trying to deploy the software but I always hit a snag despite following all the steps.

Collapse
 
avalerionv profile image
Dawood Khan Masood • Edited

What seems to be the problem? I was able to host the software on a seperate server with no issue. I will be migrating from Ghost to Forem on my original website (hackhex.com) within few days. When it is ready, I will let you know.

In the meantime follow the exact steps in this guide and let me know if there's any problem. :)

Collapse
 
rehmatworks profile image
Rehmat Alam

I spent a couple of hours and I feel I'm close. I am trying Passenger + NGINX and here is the latest error. I've fixed other errors related to the database and so on and now I feel I just need to provide all the needed credentials in env file:

The client either needs a valid 'client_id'/'client_secret' pair or an 'access_token'! (ArgumentError)
Enter fullscreen mode Exit fullscreen mode

I'll get all the needed API keys tomorrow and I'll give it a try. I feel I'll be able to deploy it in production mode tomorrow :) I'll keep you posted.

Thread Thread
 
avalerionv profile image
Dawood Khan Masood

That's wonderful news! Keep me updated with your progress. :)

Collapse
 
rehmatworks profile image
Rehmat Alam

I feel I'm near. I'm trying Passenger + NGINX for the production deployment. I've spent a couple of hours and here are my latest errors in NGINX logs:

The client either needs a valid 'client_id'/'client_secret' pair or an 'access_token'! (ArgumentError)
Enter fullscreen mode Exit fullscreen mode

And I feel this error is caused by missing env values. I'll get all the needed API keys tomorrow and I'll try once more. I feel I'll be able to deploy it.

Collapse
 
rehmatworks profile image
Rehmat Alam

Thank you :) Previously, I followed the docker instructions. I gave the official documentation a try again today and it worked like a charm. I didn't face any issues installing the development environment on an Ubuntu VM from AWS. Now looking to deploy it using NGINX. I feel I'll hit snags and I'll visit your tutorials to see how you deal with the live deployment of the web app.

Collapse
 
rehmatworks profile image
Rehmat Alam

Hey Dawood, so I successfully deployed Forem in production mode. Thank you so much. @jdoss also helped me a lot. I'll share the URL of the community here once I complete the remaining stuff.

Collapse
 
avalerionv profile image
Dawood Khan Masood • Edited

Awesome! Sorry for not being able to reply to your previous comments about the "client_id" and "client_secret" warning. For some reason Forem was having issue with the cache so no notifications or updates were being shown. I am sure you figured it out by now. Forem requires OAuth for production environment, hence the warning was shown.

Collapse
 
akhil profile image
Akhil Naidu

Hey, I really like to know how you used Passenger + Nginx to have a production in your VPS. I would like to check it in my own VPS. If possible guide me through it.

Collapse
 
rehmatworks profile image
Rehmat Alam

Hello @akhil , sorry for replying late. Although I've deployed it in production mode at rehmat.works but I still don't feel confident. I'd rather wait for a final (and production-ready) release of Forem before starting using the CMS to manage content. To get this working with NGINX and Passenger, you need to build NGINX using Passenger. The guide is available at Passenger official website. The important thing to keep in mind is that you need to set all environmental variables for Passenger in NGINX configuration otherwise Forem will crash. If you need any specific help, I can post the NGINX configuration file here.

Thread Thread
 
akhil profile image
Akhil Naidu

Hey can you post the nginx configuration file, I realised that ready to dev might take some time and unable to configure nginx on my own.

Collapse
 
ben profile image
Ben Halpern

Thanks for the writeup!

Collapse
 
avalerionv profile image
Dawood Khan Masood

Glad to help! :)