惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
WordPress大学
WordPress大学
小众软件
小众软件
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
腾讯CDC
量子位
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Hacker News
The Hacker News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
Jina AI
Jina AI
Attack and Defense Labs
Attack and Defense Labs
S
SegmentFault 最新的问题
Simon Willison's Weblog
Simon Willison's Weblog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Google Online Security Blog
Google Online Security Blog
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
罗磊的独立博客
L
LINUX DO - 最新话题
博客园 - Franky
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
AI
AI
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
I
Intezer
S
Securelist

Ittavern.com

Wimage - Hosting Open-Source Image Uploader with Podman and external S3 Storage Switching from Hugo to picopaper Encryption using SSH Keys with age in Linux ETag in nginx - Simple Resource Caching Sending nginx Logs to Loki with Grafana Alloy How to: Cisco ISE backup to SFTP repository with public key authentication Dummy IP & MAC Addresses for Documentation & Sanitization Generate a Vanity v3 Hidden Service Onion Address with mkp224o ssh-audit Primer - Audit your SSH Server mtr - More Detailed Traceroute - Network Troubleshooting My Personal Backup Strategy - August 2024 iperf3 - User Authentication with Password and RSA Public Keypair Adding a trash can to Linux with trash-cli Bandwidth Measurement using netcat on Linux Getting started with rsync - Comprehensive Guide Cron Jobs on Linux - Comprehensive Guide with Examples SSH Server Hardening Guide v2 Port Knocking with knockd and Linux - Server Hardening Getting started with rclone - Data transmission Getting started with dig - DNS troubleshooting Getting started with Fail2Ban on Linux Getting started with netcat on Linux with examples URL explained - The Fundamentals Troubleshooting Asking The Right Questions Create tmux layouts using bash scripts Getting started with tcpdump - Ittavern.com Curl on Linux - Reference Guide Getting started with nmap scripts My Offsite Backup - March 2023 Getting started with iperf3 - Network Troubleshooting ICMP echo requests on Linux and Windows - Reference Guide Simulate an unreliable network connection with tc and netem on Linux Detecting Rogue DHCP Server - Ittavern.com Basics of the Linux Bash Command History with Examples Getting started with GNU screen - Beginners Guide Basics of Power over Ethernet (PoE) Difference between RSS and Atom SSH Troubleshooting Guide - Ittavern.com Backup Guide - how to secure crucial data SSH - run script or command at login Linux - unmount a busy target safely Visual guide to SSH tunneling and port forwarding Guide to Wireshark display filters Online Security Guide - Ittavern.com My IT EDC tool kit v2212 10 prompts - 1000 AI generated images - openAI Dall-E SSH - How to use public key authentication on Linux Ways to support open-source projects Getting started with nmap - Ittavern.com nginx - simple and native authentication function Linux - How to work with complex commands EICAR test file - riskless method to test your antivirus and firewall solution Linux - connect to a serial port with screen Podman / Docker - expose port only to the localhost of the host machine Tmux - reload .tmux.conf configuration file My use cases for CyberChef Nginx - simple permanent or temporary redirects Getting started with tmux - Ittavern.com Tmux - synchronize the input of all panes within a window Nginx - check your public IP CyberChef - How to remove empty lines
Deploying ISSO Commenting System for Static Content using Docker
2024-08-31 · via Ittavern.com

I was looking for a simple and lightweight commenting system with moderation for my static blog. There are dozens of solutions out there, but ISSO seemed like a perfect fit for me. I decided to host it on another server, using a subdomain and Podman or Docker. However, there are different ways to install it - like same server, same domain, without Docker and so on.

Illustration of our plan:

You can add the JS snipped in Hugo, Jekyll, documentation or wherever you want.


My assumptions before we begin:

  • Two Linux servers running Ubuntu 24.04 LTS (Distro doesn't really matter)
    • 1 Backend to host ISSO, 1 Frontend where the comment feature is used.
    • Backend server has Docker/Podman and nginx installed and ready to go (or another reverse proxy).
    • Both servers are accessible to the visitor (Internet, Intranet, etc. via HTTPS (TCP/443))**.
  • DNS entry about secondary pointing to backend server
    • In this article we will use example.com for the frontend / static blog and comments.example.com for the backend / ISSO server.
    • Certificate for secondary domain

Feel free to test the comment section at the end of this article.

Setting everything up

Let us start with the Backend server.

Backend Server Configuration #

Create two directories for the container for the configuration file and database:

mkdir -p config/ db/


ISSO Server Configuration #

Download and save the default configuration isso.cfg into the /config directory:

Using curl:

curl -L https://raw.githubusercontent.com/isso-comments/isso/master/isso/isso.cfg -o config/isso.cfg


Now we need to modify this config file according to our setup and preferences.

We'll add the frontend domain and enable moderation - I'll leave the rest as is for this article.

Open the configuration file config/isso.cfg in your favorite editor and change the following options:

[general]
[...]
# Frontend domain
host =
    https://example.com
[...]
# Enabling moderation
[admin]
enabled = true

# Admin access password
password = reallylongandsecurepasswordforhteadminaccess
[...]
[moderation]
enabled = true
[...]

The configuration file does a good job of showing and describing many features - take your time and configure it to your liking. A more detailed overview can be found in its official documentation.


Docker Container #

Next, we will start the container. As mentioned before, I use Podman, but we will use Docker for this example:

docker run -d --name isso-comments \
    -p 127.0.0.1:8080:8080 \
    -v /path/to/storage/config:/config \
    -v /path/to/storage/db:/db \
    ghcr.io/isso-comments/isso:0.13.0
Explained:
docker run -d # run detached container
--name isso-comments # set container name
-p 127.0.0.1:8080:8080 # exposes port 8080 of the container to the localhost:8080 of the host system
-v /path/to/storage/config:/config # creates bind mount for persistant storage for the container
ghcr.io/isso-comments/isso:0.13.0 # get and use the on Github hosted ISSO image with a certain tag

Important: Make sure to change the path and that 127.0.0.1:8080 is available or change the host port.

Check locally with curl if container is working: curl -L 127.0.0.1:8080/admin

<html>
<head>
  <title>Isso admin</title>
  <link type="text/css" href="http://127.0.0.1:8080/css/isso.css" rel="stylesheet">
  <link type="text/css" href="http://127.0.0.1:8080/css/admin.css" rel="stylesheet">
</head>
<body>
  <div class="wrapper"
[...]

This is looking fine!

If you get an error message, check the logs:

docker container logs isso-comments


Reverse proxy / nginx #

Currently, the ISSO backend is only available from the host itself. We need to add a reverse proxy to forward the requests and make it available to other hosts. I will be using nginx, but feel free to use Caddy, Apache, or something else. The certification configuration is handled by certbot.

We won't go into much detail, but the following config works for me (some privacy modifications):

server {
    server_name  comments.example.com;

    access_log  /var/log/nginx/comments.example.com.access.log;

    location / {
        proxy_set_header   X-Forwarded-For $remote_addr;
        proxy_pass         "http://127.0.0.1:8080";
        proxy_set_header   Host $host; 
        proxy_set_header   X-Real-IP $remote_addr; 
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for; 
        proxy_set_header   X-Forwarded-Proto $scheme;
    }

    #error_page  404              /404.html;
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/comments.example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/comments.example.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
    if ($host = comments.example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    server_name  comments.example.com;
    return 404; # managed by Certbot
}

If everything went well, the admin interface should be available:

https://comments.example.com/admin/


If it doesn't work: - check the logs of your reverse proxy - reverse proxy up and running - secondary domain pointing to Backend server (DNS) - Container up and running - port configration is correct (container > Docker > nginx) - check network and host firewalls


Regarding the Backend server, this should be everything!


Frontend Configuration #

In the next step, we just have to add some Javascript to all pages that should receive a comment section. ISSO will do the rest automaticly.

<script data-isso="//comments.example.com/"
        data-isso-max-comments-top="10"
        data-isso-max-comments-nested="5"
        data-isso-reveal-on-click="5"
        data-isso-sorting="newest"
        data-isso-avatar="false"
        data-isso-vote="false"
        src="//comments.example.com/js/embed.min.js"></script>

<section id="isso-thread">
    <noscript>Javascript needs to be activated to view comments.</noscript>
</section>

Feel free to change those options! - A full overview of all options can be found in their official documentation.

Hidding a certain Fields #

Currently, it is not possible to hide certain fields with the ISSO options.

A simple but not perfect workaround is to hide them with CSS. If you want to hide the website field, you could use the following CSS snippet:

/* ISSO COMMENTS */
label[for=isso-postbox-website] {
  display: none !important;
}

input#isso-postbox-website {
    display: none;

That hides the website field. Replace website with email to hide the email field.

Using lazy-load #

I won't cover it in this article, but if you have many comments, it makes sense to insert some kind of lazy-load, so the comments load only if they are being display to improve the user experience and decrease the page loading speed.

Moderation #

As a reminder, with this setup you have to approve new comments via admin interface:

https://comments.example.com/admin/

Conclusion

So, as you can see, it is really straightfoward. Feel free to test it in the comment section below.