A lightweight, open-source, privacy-focused comment engine alternative to Disqus.
Commento is a discussion platform. You can embed it on your blog, news articles, and any place where you want your readers to add comments. It's free software, meaning you are allowed to modify and redistribute the source code. It's lightweight, allowing for fast page loads. It's privacy-focused because that's the way comment engines should be. Embedding comments on your blog on why Vim is the greatest editor shouldn't inject ads, third-party tracking scripts, and affiliate links into your reader's browser.
Commento features a modern interface, advanced spam filtering, and uses just 4.2 KB of JavaScript and CSS (GZipped and minified). Moderation tools, emoji support, and other features will be built in the future as well.
- Commento will be free software forever. You are free to fork your own copy, run it as a service and charge your users, run it behind a closed platform or anything else. I only ask that you include the copyright notice in all copies.
- No ads, injecting third party tracking scripts, affiliate marketing. Ever.
- Commento is not a centralized multi-site commenting system. If you self-host an instance of Commento for your blog, users of your blog will only exist for your blog.
If you want to self-host Commento, you have three options:
Go makes deployment easy by produce a single binary. This is the recommended way, as it has the least amount of abstraction. Download the latest release for your operating system and architecture, extract, and run. For example, if I'm on linux-amd64, I would do:
$ tar xvf commento_0.2.1_linux_amd64.tar.gz
$ ./commento
This would expose the server on port 8080
. Point your Commento frontend configuration to this.
You can also use Docker to host Commento. A minimal Docker image is provided: adtac/commento
. You can get a container running by pulling the image and starting it to expose the server on port 8080
:
$ docker pull adtac/commento
$ docker run -it -d -p 8080:8080 adtac/commento
Commento is written in Go. Build the binary from source and run the produced executable:
$ go build -i -v -o commento
$ ./commento
If you're building the project for the first time, go build
might take a few seconds since Commento's dependencies need to be pulled and compiled as well. However, subsequent builds will be faster.
To embed Commento in your website, paste the following HTML snippet wherever you want Commento to load:
<div id="commento"></div>
<script defer
src="http://server.com/assets/js/commento.min.js"
data-div="#commento">
</script>
Commento will simply fill the container it is placed in. Remember to change server.com
to your server.
Parameter | Default Value | Meaning |
---|---|---|
COMMENTO_PORT |
8080 | Default port on which the server will listen. |
COMMENTO_DATABASE_FILE |
commento.sqlite3 |
Database file that Commento will use to store comments. |
AKISMET_KEY |
Your Akismet key. Read our docs for more details on how to obtain one. |
Commento uses environment variables to configure parameters. You can either use a .env
file or give parameters through the command line. For example, a particular configuration can be achieved in three different ways:
$ cat .env
COMMENTO_PORT=9000
COMMENTO_DATABASE_FILE=/app/commento.db
AKISMET_KEY=abcdef012345
$ ./commento
$ COMMENTO_PORT=9000 COMMENTO_DATABASE_FILE=/app/commento.db AKISMET_KEY=abcdef012345 ./commento
$ export COMMENTO_PORT=9000
$ export COMMENTO_DATABASE_FILE=/app/commento.db
$ export AKISMET_KEY=abcdef012345
$ ./commento
Note that environment variables have precedence over .env
values. If you're using Docker, you can pass environment variables too:
$ docker run adtac/commento -it -d -p 9000:9000 \
-e COMMENTO_PORT=9000 \
-e COMMENTO_DATABASE_FILE=/app/commento.db \
-e AKISMET_KEY=abcdef012345
If you run a blog, and you want your readers to converse, you'll probably install Disqus. After all, they're the biggest system, with 500 million unique visitors every month[1]. They have a free plan, too! They also have non-optional advertisement, third-party tracking, affiliate marketing, and link hijacking [2] [3] [4] [5]. Your readers will be mercilessly tracked, and you'll have no privacy whatsoever — even if you don't leave any comments. Thanks to the 90+ downloads Disqus will make, your website will be considerably slower.
Commento aims to solve this. Commento is free software that you can self-host for the cost of a cup of coffee. No third-party tracking scripts will be injected, there will be no affiliate marketing, no advertisements. Just comments.
While some open source solutions existed, I didn't find any attractive enough at the time Commento was created -- most were either they were discontinued or development was virtually non-existant. Free software is about, well, freedom, so I figured I'd write my own software.
Commento is possible only because of its community. The project is still in beta and I'd be thankful for any contribution. Please go through the development guidelines before you start. If you're a newcomer, you want to go through our newcomer docs first. Pick up any issue and hack away!
If you have any questions, please ask in our Gitter channel.
Commento development is sponsored by Mozilla and DigitalOcean independently.
Copyright 2018 Adhityaa Chandrasekar
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.