Tuan-Anh Tran

How to install Discourse without Docker

Posted on March 3, 2016  •  2 minutes  • 247 words

I purchased a dead cheap VPS for 5$ a month which come with 2GB of memory, 80GB disk space and quite decent CPU. The downside is they uses a very old kernel (2.6.32-042stab108.8 to be specific) while the official Discourse installation guide use Docker which require a more recent one (3.x).

Docker sure makes it easy to install Discourse but it’s the only reason that newer kernel is required. After a quick research, I found this Ansible playbook . It looks well-maintained (last commit was Dec 2015).

It doesn’t work right out of the box for me but after some debugging, I was able to install Discourse just fine. There are few things to note though.

Installing plugins

discourse is the default username if you use the above playbook. Replace it if needed.

cd /var/www/discouse/plugins
# git clone the plugin you want to install
sudo /home/discourse/.rbenv/shims/bundle exec rake db:migrate /var/www/discourse RAILS_ENV=production
sudo /home/discourse/.rbenv/shims/bundle exec rake assets:precompile /var/www/discourse RAILS_ENV=production
sudo systemctl reload discourse-unicorn.service

Bonus: btw, Let’s Encrypt offers free SSL. Setting it up is really easy too.

Follow me

Here's where I hang out in social media