Back when I started to use the Internet in 1988, there was a simple way to get answers to your technical questions. You would go onto "Netnews", also known as Usenet, and you would post your question to one of the forums. There were forums, or "newsgroups", on nearly every possible topic, from programming languages to religions to humor. It was quite amazing, even back then, to be able to get answers to just about any question you had.

But then the Web was invented, and although it took some time, Usenet became a relic of history. Yes, I realize that Usenet still exists to some degree or another, but let's face it, if you're looking for answers to questions or for an on-line community, Usenet is unlikely to be your first choice. For better or worse, companies like LinkedIn and Facebook have become large players in this field, even though their group and discussion software leaves much to be desired.

And of course, there are other types of forum software. WordPress, which has become an incredibly powerful and flexible CMS and platform, is blogging software at its heart, meaning that it allows you to post to your blog and accept comments. If you want something a bit more interesting than that, such companies as Disqus and LifeFyre offer SaaS forums, letting you turn any page into (potentially) a social community.

And yet, I probably have implemented forum software five to ten times through the years for various clients, and I have installed forum software about the same number of times. Although forum software often is reasonable, it doesn't make me go, "wow". I run an e-mail list for people who live in my city of Modi'in, and it has become quite large, with 2,800 subscribers and 40–50 messages per day; however, we all agree that e-mail is far from a perfect way to communicate. But, e-mail lists still are far preferable to Web-based forum software, which hasn't ever been exciting or interesting to me.

So, it shouldn't come as a surprise that when Jeff Atwood, cofounder of Stack Exchange and the author of the famous "Coding Horror" blog, announced he was going to make better Web-based forum software, I personally reacted with a shrug. After all, I've used and seen forum software for years. How much different or better could it be?

Well, I can report to you that even though Discourse, Atwood's open-source forum software, is still somewhat unfinished, it already is head and shoulders above other forums I have used, as both a user and an administrator. The fact that it is open source, based on Ruby, PostgreSQL and Ember.js is icing on the cake, making what already was excellent software even better. I've already seen numerous improvements in Discourse since I started to use it, and they just seem to keep coming. For the first time ever, I believe that Web forums can be useful, user-friendly and attractive.

So this month, I look at Discourse—what it is, what it aims to be and what it means regarding not only on-line discussions, but for consumer-facing open-source projects as well.

Installing Discourse

Discourse is an open-source project, hosted at GitHub (see Resources), licensed under the GNU General Public License, version 2. It is backed by Atwood's company, which has the fantastic name of Civilized Discourse Construction Kit, Inc., and it aims to profit through installing and supporting Discourse.

If you're like me, you assume that installing a modern open-source application should be a matter of downloading, installing (perhaps with a separate compilation step first), configuring and then forgetting about it. So, it's a bit of a shock to realize that Discourse is a complex application with many different moving parts that requires some time and attention to install. It's written in Ruby on Rails and Ember.js, and it uses a combination of PostgreSQL (for the main database), Redis and Sidekiq for queuing.

So yes, you can "git clone" the application, and then install the software that way. But, you almost certainly don't want to do that. I did it to get Discourse running on my server, and despite many years of working with these technologies, it still was something of a challenge.

Fortunately, you don't have to do much work. The preferred, recommended way to install Discourse is to use a Docker container, which means that you're no longer installing an application, but rather an entire, preconfigured virtual machine, with all of the settings in place as the original developers intended. The Discourse instructions describe how to install the software on a Digital Ocean machine, but you can use many different server hosting companies.

Once you have installed Discourse, you need to configure it. And it's when you start to configure Discourse that you see it's a very different animal from most open-source projects, in that it aims to make the life of users extremely easy. The thoughtfulness of the design shines through at every instance. The application needs to be configured by setting a number of Ruby variables within the Discourse application, most of which are documented and described within the configuration file itself.

Once you have configured the application and started it up (and I won't go into details here, because the installation guide describes it well enough), you then will have a working copy of Discourse. Make sure that you have configured the SMTP server correctly, and that you are running the Sidekiq message queue, so that when you register as a new user, you will receive the e-mailed confirmation request.

Many things in Discourse are designed quite well, starting with the log in system, which allows you to log in via not only a locally defined user name and password, but also via such third-party services as Facebook and GitHub. (You will need to register for an API key for any service you want to use in this way.) Once you have logged in to your newly created account, the real fun begins, setting up the categories into which topics (postings) can be placed. You can do a great deal of customization or very little. Out of the box, Discourse already works quite well.

Configuration of Discourse is done via the administrator menu (using a link in a slightly difficult-to-find location). The configuration menu is huge, letting you use your Web browser to do everything from setting up headers and footers, to entering your Google Analytics token, to setting your API keys for third-party services.

What really blew me away was the fact that when I went to the main administration page, a panel came up telling me what likely was wrong with my installation. For example, it told me I was using a copy of Ruby whose memory usage was sub-optimal for Discourse. It told me that I had neglected to start up Sidekiq, and it told me how to do that. It even told me that I hadn't changed the logo graphics away from the original defaults.


Reuven M. Lerner, Linux Journal Senior Columnist, a longtime Web developer, consultant and trainer, is completing his PhD in learning sciences at Northwestern University.