Icon
Karthikeyan KC

Discuss - A self-hosted comment system

A lightweight, fast, and open-source alternative to Disqus

tech ·

To my closest circle, to those who know what’s going on with my life right now, I am thankful for your kindness and support. I’ve been trying to distract myself with everything I’ve got. One such venue is this process of building something. A small effort towards the path of healing, hoping it’d help myself and others.


I recently migrated this website from WordPress to Astro. I like the speed, the simplicity, the zero-JS by default, and all the flexibility it offers (finally, I can insert custom components into my posts!). Looking back, the time I spent is totally worth it.

During the migration, I hit a snag though that kept me with WordPress for a while. It’s the comments! I still needed a comment system that’d adhere to the standards I set for my lucid (the name of this digital garden) - simple, accessible, and fast.

My initial idea is to have it built right into the lucid system with a serverless function somewhere to read and write the comments, but then I got some flashbacks from the time I used Disqus at Geekswipe long before. Out of curiosity, I explored some opensource alternatives and ended up evaluating a few. Most of the solutions like Giscus or Utterances leveraged Github discussions, focusing only on the developer community, and systems like Isso or Remark42 simply just didn’t fit the bill.

They’re great comment-systems, but too many features for my taste!

So I built Discuss.

Discuss Self Hosted Open Source Comment System

A simple node-based comment server with SQLite.

Keeping it simple and straightforward

Before I started out, I had some idea of what a modern barebones comment-system should look like. It’s basically a stripped down version of the comment systems that already exists out there, except, I wanted it simple and easy for anyone to host it.

So I started with just the basics. A simple markdown comment form, nested response layers for discussions that go deeper, a notification system, and a good anti-spam system. And on top of that, the non-negotiable accessible and usable experiences.

Coming from a Python background, I initially considered Python frameworks like Flask and FastAPI to build this, but I ultimately finalised (caved in) on a JavaScript-based stack. One, this keeps the codebase and dependencies homogenous as most static sites are JS based. Two, I didn’t want site owners who are setting up Discuss to wrestle with the Python Web Server Gateway Interface (WSGI).

Said that, I chose Express.js. And my favourite SQLite, a self-contained, serverless database engine for its simplicity. And finally eliminating overheads like containerization or running a separate database instance, it all resulted in a lightweight, fast, and easily self-hostable comment solution.

The Features

  • Threaded Replies: Nests up to 4 levels deep for deeper discussions.
  • Smart Avatars: Gravatars with neat initials fallback.
  • Theming: Out of the box dark mode and UI brand colour support.
  • Admin Dashboard: Dedicated admin pages to setup and manage sites and moderate their comments.
  • Spam Prevention: Right now, it handles spam via honeypot fields and a customizable banned-word list. While it works, upcoming versions will allow users to integrate with services like Akismet.
  • Notifications: Email, via SMTP.

What’s next for Discuss?

Most of the efforts would be focused on beefing up the server against spam. The roadmap is small for now, looking at comment imports, exports, user mentions, webhooks, and more.

If you’d like to get your feet wet in open source, this would be a great place to start. The codebase is small, readable, and manageable. I’m completely open to volunteers stepping in and submitting PRs. I’m a product manager by day and this is my first proper open source project as well.

Discuss is a good reminder for myself that we don’t always need massive infrastructure or a feature set to ship a useful product. Scratch your own itch, start simple, and remember that when it comes to functionalities, you aren’t gonna need it all. Building only what matters now is the way!

You can check the source code or take it out for a spin at the live demo site.

Feel free to clone it, test it, and break it. Let me know what you think!