How to Install Isso Commenting Server on Ubuntu 16.04
Disqus, the most popular commenting platform on the internet, is free to use. In reality though there’s a hidden cost of using it.
Think about it… Without making a profit, how would Disqus be able to function as a company? Disqus has to monetize their platform somehow.
One of the monetization methods they use is to redirect links posted in your comments to sites such as Amazon and eBay via VigLink so they can make potential sales commissions.
Another method is to place targeted advertisements throughout the comments section. David Fleck, general manager of advertising at Disqus was quoted as saying “We have the largest and deepest audience profiles on the web.”
So, if you’re like me and you are tired of having your browsing habits tracked on the internet and sold to advertisers, it’s time to ditch Disqus and host your own commenting server.
After researching all of the open-source, self-hosted options available, I’ve discovered Isso.
Isso is hosted on your own server. It’s lightweight with its JavaScript frontend client weighing only 40KB. It respects the privacy of its users by intentionally not supporting popular features such as Gravatar icons. It uses SQLite for its database, which is faster than MySQL in small use cases like storing comments on blogs such as my own.
“209 threads and 778 comments in total only need 620K (kilobyte) memory.”
In this guide, I’ll teach you how to ditch Disqus and host your own Isso commenting server.
Features
- Anonymous comments (optional)
- Avatar icon generation (optional)
- Import comments from Disqus and WordPress
- Markdown support (optional)
- Nested comments
- Upvoting and downvoting
Requirements
- Python 2.6, 2.7 or 3.3+ (+ devel headers)
- Python3-pip
- SQLite 3.3.8 or later
- C compiler
If you don’t already have these on your system, go ahead and install them now
sudo apt-get install python3 python3-pip sqlite3 build-essential
Create Isso User Account
For security reasons, it’s recommended that you create a new user account for Isso to run under.
sudo adduser --disabled-login --gecos 'Isso Commenting Server' isso
sudo su - isso
Install Isso
Install Isso with Pip.
pip3 install isso
Server Configuration
You can view the all of the Isso server configuration options here.
For this example, we’ll create a basic config file to get you started.
nano ~/isso.conf
Paste the following into it and replace the values with your server’s information:
[general]
dbpath = /home/isso/comments.db
host = https://example.tld/comments/
[server]
listen = http://localhost:3939/
[guard]
enabled = true
ratelimit = 2
direct-reply = 3
reply-to-self = false
require-author = false
require-email = false
This will run Isso on port 3939 with basic spam protection features enabled.
Client Configuration
You can view the all of the Isso client configuration options here.
Paste the following code onto your website where you want the comments displayed:
<script data-isso="/comments/"
data-isso-css="true"
data-isso-lang="en"
data-isso-reply-to-self="false"
data-isso-require-author="false"
data-isso-require-email="false"
data-isso-max-comments-top="10"
data-isso-max-comments-nested="5"
data-isso-reveal-on-click="5"
data-isso-avatar="true"
data-isso-avatar-bg="#f0f0f0"
data-isso-avatar-fg="#9abf88 #5698c4 #e279a3 #9163b6 ..."
data-isso-vote="true"
data-vote-levels=""
src="//example.tld/comments/js/embed.min.js"></script>
<section id="isso-thread"></section>
Reverse Proxy
In order to make the comments accessible at the host URL you specified in the server config file, you’ll need to create a reverse proxy.
Nginx
Add the following inside of your domain’s server block:
location /comments {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Script-Name /comments;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:3939;
}
If you’re using CloudFlare, you can read my guide on how to get your visitors real IP addresses with Nginx and CloudFlare.
Apache
<Location "/comments">
ProxyPass "http://localhost:3939"
ProxyPassReverse "http://localhost:3939"
</Location>
Test Installation
Let’s go ahead and run Isso and test the installation out.
isso -c /home/isso/isso.conf
If the installation was successful, you’ll see a response such as:
2017-11-21 20:29:31,674 INFO: connected to https://ericmathison.com/comments/
Hit CTRL + C to exit out of Isso.
Add Isso as System Service
Log back into your user account with root privileges.
Create systemd service file for Isso.
sudo nano /etc/systemd/system/isso.service
Paste the following:
[Unit]
Description=Isso Commenting Server
After=network.target
[Service]
Type=simple
User=isso
WorkingDirectory=/home/isso
ExecStart=/home/isso/.local/bin/isso -c /home/isso/isso.conf
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Enable and start the Isso service.
sudo systemctl enable isso
sudo systemctl start isso
Verify that the Isso server is running.
sudo service isso status
Congratulations! You’ve successfully installed Isso. Did you find this guide useful? Are you running Isso on your own website? What commenting platform were you using before Isso? Let us know in the comments section below!
Upgrade Isso
Wondering what to do when a new version of Isso is released?
First switch to your Isso user account.
sudo su - isso
Then type:
pip3 install --upgrade isso
Next log back into your account with root privileges and restart the Isso service.
sudo service isso restart