Compiling From Source
To install Commento from source, first set up your environment first. Once you've done that, you can go ahead and build the project. The rest of this tutorial assumes you have all the necessary tools installed.
Compiling Commento is as simple as cloning the repository and running
$ git clone https://gitlab.com/commento/commento.git $ cd commento $ make prod
This will automatically fetch dependencies (Go and Yarn) and compile the project. The first
make might be slow; future builds will be much faster as you wouldn't have to pull all the dependencies. After the command completes, your binary would be available at
./build/prod/commento along with other files.
If you're not running Commento in a production environment, you may want to use
make devel instead of
make prod for more descriptive frontend errors. Substitute
You need to set up some non-optional configuration before starting Commento. In this example, let's assume our Commento instance will be running on the server and will be available at
Before you launch Commento, you will also need a usable PostgreSQL server. Let's say the server is available at
postgres.example.com on port
5432 with the credentials
username:password. Create a database named
Set up the environment variables to start the Commento server on
commento.example.com on port
$ export COMMENTO_ORIGIN=commento.example.com $ export COMMENTO_PORT=80 $ export COMMENTO_POSTGRES=postgres://username:firstname.lastname@example.org:5432/commento?sslmode=disable
You can read the documentation on configuring Commento to learn more about the different options availble. For now, this minimal configuration is sufficient. To launch the executable:
Now you can open
http://commento.example.com on your browser and you should be greeted with the login page. Carry on to the next step to create an account and register your website.