Discourse is a 100% open source discussion platform built for the next decade of the Internet. Use it as a mailing list, discussion forum, long-form chat room, and more! This guide will detail how to deploy a development discourse server using a SkySilk VPS. 

*Note: Production Discourse Servers require Docker support for installation. Docker is not currently supported by SkySilk. This method is intended to instruct for development Discourse only. This guide assumes that you are using Ubuntu, but the set-up instructions will work for any Debian based distribution.


How to Install Discourse on Ubuntu 16.04 (without Docker) using SkySilk VPS 


   1. Deploy a SkySilk VPS running Ubuntu 16.04.

   2. Login to your VPS. SSH into your VPS using [email protected] and the password you set in the SkySilk dashboard.

       If you are connecting from a Unix-like machine (Mac OS or Linux), or by using PuTTY with Windows then the command to connect is simply:


ssh [user]@[ip address]


 

where [user] is your username, typically root, and [ip address] is the IP address of the virtual machine, for example:

 

ssh [email protected]

    

  (Read: How To Access Linux VPS via SSH Key)



    3. Install the Pre-Requisites

           

# Basics
whoami > /tmp/username
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get -yqq update
sudo apt-get -yqq install python-software-properties vim curl expect debconf-utils git-core build-essential zlib1g-dev libssl-dev openssl libcurl4-openssl-dev libreadline6-dev libpcre3 libpcre3-dev imagemagick postgresql postgresql-contrib-9.5 libpq-dev postgresql-server-dev-9.5 redis-server advancecomp gifsicle jhead jpegoptim libjpeg-turbo-progs optipng pngcrush pngquant gnupg2

# Ruby
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
curl -sSL https://get.rvm.io | bash -s stable
echo 'gem: --no-document' >> ~/.gemrc

# exit the terminal and open it again to activate RVM

rvm install 2.3.4
rvm --default use 2.3.4 # If this error out check https://rvm.io/integration/gnome-terminal
gem install bundler mailcatcher

# Postgresql
sudo -u postgres -i
createuser --superuser -Upostgres $(cat /tmp/username)
psql -c "ALTER USER $(cat /tmp/username) WITH PASSWORD 'password';"
exit

# Node
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash

# exit the terminal and open it again to activate NVM

nvm install node
nvm alias default node
npm install -g svgo


    4. Clone Discourse and Configure


git clone https://github.com/discourse/discourse.git ~/discourse
cd ~/discourse
bundle install

# run this if there was a pre-existing database
bundle exec rake db:drop
RAILS_ENV=test bundle exec rake db:drop

# time to create the database and run migrations
bundle exec rake db:create db:migrate
RAILS_ENV=test bundle exec rake db:create db:migrate

# run the specs (optional)
bundle exec rake autospec # CTRL + C to stop

# launch discourse
bundle exec rails s -b 0.0.0.0 # open browser on http://localhost:3000 and you should see Discourse


    5. Create an admin account


bundle exec rake admin:create


    6. Run Sidekiq


mailcatcher # open http://localhost:1080 to see the emails, stop with pkill -f mailcatcher
bundle exec sidekiq # open http://localhost:3000/sidekiq to see queues
bundle exec rails server


       You should now be able to connect to discourse app on http://your.ipaddress:3000! ('your.ipaddress' should be the IP Address of your SkySilk VPS)


For additional resources on specifics of using Discourse, please consult Discourse Support and Community reference material:

Discourse.org

Support and Community


CLICK TO DEPLOY A HOSTED DISCOURSE SERVER