Commento

Commento is an open source, fast, privacy-focused commenting platform written in golang.


Note

For this guide you should be familiar with the basic concepts of

Prerequisites

Install and configure a Postgresql server.

Installation

Since Commento provides pre-compiled binaries, we can use those:

Warning

Check the releases page before you continue.

[isabell@stardust ~]$ mkdir commento
[isabell@stardust ~]$ cd commento
[isabell@stardust commento]$ wget https://commento-release.s3.amazonaws.com/commento-linux-amd64-v1.7.0.tar.gz
[isabell@stardust commento]$

Extract the tar archive:

[isabell@stardust commento]$ tar -xf commento-linux-amd64-v1.7.0.tar.gz
[isabell@stardust commento]$

We do not need the tarball any longer, so delete it:

[isabell@stardust commento]$ rm commento-linux-amd64-v1.7.0.tar.gz
[isabell@stardust commento]$

You will be left with a single executable binary, called commento as well as supporting files.

Create Commento Start Script

Make sure to have your PostgreSQL credentials ready. You will need an existing database, port, username and password.

Create ~/bin/commento_daemon and add the following content:

Warning

Replace replace all placeholders <*> with your values!

#!/bin/sh
set -ue

export COMMENTO_ORIGIN=https://isabell.uber.space
export COMMENTO_PORT=31380
export COMMENTO_BIND_ADDRESS="0.0.0.0"
export COMMENTO_POSTGRES=postgres://<username>:<password>@<host>:<port>/<database>?sslmode=disable
exec ~/commento/commento

Make your script executable:

[isabell@stardust ~]$ chmod +x ~/bin/commento_daemon
[isabell@stardust ~]$

Setup Supervisor

Create ~/etc/services.d/commento.ini with the following content:

[program:commento]
command=%(ENV_HOME)s/bin/commento_daemon

After creating the configuration, tell supervisord to refresh its configuration and start the service:

[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE                            RUNNING   pid 26020, uptime 0:03:14
[isabell@stardust ~]$

To stop and start the daemon to perform maintenance tasks, you can use supervisorctl stop and supervisorctl start, respectively:

[isabell@stardust ~]$ supervisorctl stop commento
commento: stopped
[isabell@stardust ~]$
[isabell@stardust ~]$ supervisorctl start commento
commento: started
[isabell@stardust ~]$

Check out the supervisord manual for further details.

Configure Web Backend

Note

Commento is running on port 31380.

To make the application accessible from the outside, configure a web backend:

[isabell@stardust ~]$ uberspace web backend set / --http --port <port>
Set backend for / to port <port>; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$

Now you should be able to access Commento at your defined domain in your browser.

Additional Notes

If you are the only user of the Commento instance, it would be advisable to disable the new owner sign up, after you registered your site. Add this to your commento_daemon above the /home/isabell/commento/commento call:

Note

This doe not impact the commenting users of your site!

export COMMENTO_FORBID_NEW_OWNERS=true

Then restart Commento:

[isabell@stardust ~]$ supervisorctl retart commento
commento: stopped
commento: started
[isabell@stardust ~]$

The form to sign up will still be visible, but cannot be submitted.

Tested with Commento 1.7.0 / Uberspace 7.3.6.1

Written by: hendrikmaus <https://github.com/hendrikmaus>