Coral is an open source commenting platform developed by The Coral Project. Here's how to install Coral on OpenBSD.
Before proceeding, make sure you have the following:
$ sudo mkdir -p /var/www/coral
$ sudo git clone https://github.com/coralproject/talk.git /var/www/coral
$ cd /var/www/coral
$ sudo chmod +x bin/build-attributions
$ sudo bin/build-attributions
$ sudo npm install
$ sudo bin/build-custom
$ sudo cp config.example.json config.json
config.json
file with your domain name and PostgreSQL database settings:{
"mongodb": {
"connectionString": "mongodb://localhost/talk",
"debug": false
},
"redis": {
"host": "localhost",
"port": 6379,
"database": 0
},
"postgres": {
"database": "talk",
"recommended": false,
"dialect": "postgres",
"operatorAliases": false,
"logging": false,
"host": "localhost",
"port": 5432,
"username": "talk",
"password": "password",
"dialectOptions": {
"ssl": false
}
},
"mail": {
"fromAddress": "no-reply@your-domain.com",
"transport": {
"service": "your-email-service",
"auth": {
"user": "your-email-service-username",
"pass": "your-email-service-password"
}
}
},
"server": {
"port": 3000,
"host": "talk.your-domain.com",
"protocol": "https",
"forceServerHttps": true,
"urlPrefix": "/api/v1"
}
}
Make the necessary changes to the settings and save the file.
$ sudo su - postgres
$ psql
=# CREATE DATABASE talk;
=# CREATE USER talk WITH PASSWORD 'password';
=# GRANT ALL PRIVILEGES ON DATABASE talk TO talk;
Replace "password" with a strong password of your choice.
$ sudo nano /etc/systemd/system/coral.service
Add the following to the file:
[Unit]
Description=Coral Commenting System
After=network.target
[Service]
Type=simple
User=www
WorkingDirectory=/var/www/coral
ExecStart=/usr/local/bin/node app.js
Restart=on-failure
Environment=NODE_ENV=production
Environment=PGPASSWORD=password
[Install]
WantedBy=multi-user.target
Replace "password" with the same password you used for the PostgreSQL user.
$ sudo systemctl start coral
$ sudo systemctl enable coral
For Nginx, add the following configuration to your Nginx server block:
location /coral {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
For Apache, add the following configuration to your Apache VirtualHost:
ProxyPass /coral http://127.0.0.1:3000/
ProxyPassReverse /coral http://127.0.0.1:3000/
Replace "coral" with the URL path you want to use for Coral.
Congratulations! You've successfully installed Coral on your OpenBSD server. You can now navigate to your Coral URL and start using your new commenting system.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!