How to run Discourse in production?


Hello everyone. It has been 3 days trail and error to setup discourse and i’m fairly good with servers, however I got it working since yesterday but there’s one small issue. I can’t get it to run on production mode.

I used this tutorial to get everything setup but I was unable to run it for some reason with the latest command:

RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=/home/discourse/discourse RAILS_ENV=production NUM_WEBS=2 bluepill --no-privileged -c ~/.bluepill load /home/discourse/discourse/config/discourse.pill

so I had to deg deeper and I found this tutorial on the main site

Then I tried to run it with this command: bundle exec rails s -b fortunately it worked and I was delighted but it turned to be in development mode. After another search I got my assets precompile and tried this command: bundle exec rails s -e production for the first sight it seems to work but when I access the server ip and port on :3000 it gives an error connection reset.

I’m here to ask for guidance on how to run discourse in production mode. I’m running it on CentOs without docker.

Thanks in advance.

(Martial) #2

Not sure if this tutorial is updated, from 2013… don’t think so.
Discourse official installation only support Docker. Not sure you have other choice

discourse/ at master · discourse/discourse · GitHub


@Chopper Thank you for your reply. As I stated above it’s working great I just to know how to run it on production instead of development.

(Stefano Costa) #4

I’m running it on CentOs without docker.


If you want to run Discourse in production (as in, for running an actual forum), use Docker.


Yeah I have decided to leave it as is for now for test only, and when the time comes I will rent a KVM VPS to install docker because at the moment i’m unable to start docker on my OpenVZ that’s why I installed it without docker. :slight_smile:

(Kane York) #6

Bluepill is a serious world of pain. Just make sure that when you turn it off and switch to Docker-based, that you reboot so it doesn’t leave processes lying around.