Create New Cloud Server
Sign up to DigitalOcean, update billing info, then create your new cloud server. Note: I tried to enter debit billing info but an error keep on prompting that they won’t accept this kind of payment. Instead I use Paypal to purchase this server.
- Enter your domain discourse.example.com as the name.
- The default of 1 GB RAM works fine for small Discourse communities. We recommend 2 GB RAM for larger communities.
- The default of Ubuntu 14.04 LTS x64 works fine. At minimum, a 64-bit Linux OS with a kernel version of 3.10+ is required.
- The default of New York is a good choice for most US and European audiences. Or select a region that is geographically closer to your audience.
Create your new Droplet. You will receive an email with the root password.
Access Your Cloud Server
Connect to your server via its IP address using SSH, or Putty on Windows: ssh root@192.168.1.1 Enter the root password from the email DigitalOcean sent you when the server was set up. You may be prompted to change the root password, too.
How To Install Discourse on Ubuntu 16.04
For latest installation of Discourse on Ubuntu 16.04
https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-ubuntu-16-04
Obsolete
Install Docker / Git
wget -qO- https://get.docker.com/ | sh This command installs the latest versions of Docker and Git on your server.
Obsolete:
https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-ubuntu-14-04
Prerequisite
Before we get started, there are a few things we need to set up first:
- One Ubuntu 16.04 server with at least 2GB of RAM, set up by following this Initial Server Setup on Ubuntu 16.04 tutorial, including a sudo non-root user and a firewall.
- Docker installed on your server, which you can do by following Step 1 of the Docker installation tutorial for Ubuntu 16.04.
- A domain name that resolves to your server, which you can set up by following this hostname tutorial.
- An SMTP mail server. If you don't want to run your own mail server, you can use another service, like a free account on SparkPost. If you use SparkPost, you'll need to create an API key.
Note: Discourse requires a swap file if you are using 1 GB of RAM. Although swap is generally recommended for systems utilizing traditional spinning hard drives, using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage. Doing so can impact the reliability of the underlying hardware for you and your neighbors. Hence, we recommend a minimum of 2 GB of RAM to run Discourse on a DigitalOcean Droplet. Refer to How To Add Swap Space on Ubuntu 16.04 for details on using swap.
Guide setup tool
Launch the setup tool at ./discourse-setup
Guide setup tool
- Answer the following questions when prompted:
- Hostname for your Discourse? [discourse.example.com]:
- Email address for admin account? [me@example.com]:
- SMTP server address? [smtp.example.com]:
- SMTP user name? [postmaster@discourse.example.com]:
- SMTP port [587]:
SMTP password? will generate an app.yml configuration file on your behalf, and then kicks off bootstrap. Bootstrapping takes between 2-8 minutes to set up your Discourse.
Requirements: requiring 1 GB RAM minimum, 2GB with a 1GB swapfile recommended. Unfortunately, we need to resize the lowest droplet from $5/mo plan to $10 or $20/mo plan.
Email is Important
Email is CRITICAL for account creation and notifications in Discourse. If you do not properly configure email before bootstrapping YOU WILL HAVE A BROKEN SITE!
- Already have a mail server? Great. Use your existing mail server credentials.
- No existing mail server? Check out our Recommended Email Providers for Discourse.
For proper email deliverability, add valid SPF and DKIM records in your DNS. See your email provider instructions for specifics.
If you need to change or fix your email settings after bootstrapping, edit your app.yml file and ./launcher rebuild app, otherwise your changes will not take effect.
Start Discourse
Once bootstrapping is complete, your Discourse should be accessible in your web browser via the domain namediscourse.example.com you entered earlier, provided you configured DNS. If not, you can visit the server IP directly
Register New Account and Become Admin
- Register a new admin account using one of the email addresses you entered before bootstrapping.
If you are unable to register your admin account, check the logs at/var/discourse/shared/standalone/log/rails/production.log and see our Email Troubleshooting checklist.
You should see Staff topics and READ ME FIRST: Admin Quick Start Guide. This guide contains the next steps for further configuring and customizing your Discourse install as an administrator. Read it closely! (If you are still unable to register a new admin account via email, see Create Admin Account from Console, but note that you will have a broken site unless you get email working.)