2
1
Fork
You've already forked reactions-rs
0
Minimal self-hosted comment system
  • Rust 97%
  • CSS 2.3%
  • Shell 0.7%
Find a file
Jonah Brüchert 0a5fe6d419
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/release/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
Update dependencies
2025年09月08日 01:34:12 +02:00
css Port to bootstrap 2022年09月14日 02:17:51 +02:00
img Commit missing img directory 2021年05月27日 20:34:41 +02:00
LICENSES Add license 2020年05月27日 16:28:06 +02:00
migrations Switch to uuids 2023年10月19日 21:03:22 +02:00
screenshots Add screenshots 2020年05月27日 16:37:34 +02:00
src Update dependencies 2025年07月19日 01:13:31 +02:00
templates Improve layout 2023年04月23日 00:15:35 +02:00
.woodpecker.yml ci: Update for new woodpecker version 2023年09月18日 13:51:23 +02:00
Cargo.lock Update dependencies 2025年09月08日 01:34:12 +02:00
Cargo.toml Update dependencies 2025年09月08日 01:34:12 +02:00
diesel.toml Initial commit of working comment system 2020年05月22日 00:41:49 +02:00
genpasswdhash.sh Add script for generating the password hashes 2021年05月27日 01:50:45 +02:00
README.md Add build status to README 2022年04月01日 01:40:19 +02:00
Rocket.toml Initial commit of working comment system 2020年05月22日 00:41:49 +02:00

reactions-rs

Build Status

Really simple comment system for blogs, minimal enough to be hosted on a Raspberry Pi.

Use cases

For now, this is suited for small blogs which need an extremely cheap (in terms of resource usage) comment system, for example when the rest of the blog is generated by a static site generator and the comments need to be on a very limited self-hosted server. A basic captcha-like system is in place, but it won't withstand targeted attacks.

Setup instructions

cargo install diesel_cli
export DATABASE_URL=comments.sqlite
diesel migration run

You must add a base_url value to /etc/reactions/config.toml, so the comment system can create urls to reference itself.

base_url = "https://comment.ghsq.ga"

You should add your own, community-related security questions to /etc/reactions/config.toml.

[security_questions]
"Question?" = "Answer"

Afterwards, start the server.

cargo run --release

If you want, you can add reserved names to /etc/reactions/config.toml.

[reserved_names]
"User Name" = "encoded argon2 hash"

You can create the password hashes using the argon2 command line tool.

Architecture

Each comment has a secret and a public id. The public id is used for features such as replies, where the id of a comment needs to be known to the client to specify which comment their comment replies to. The secret id is used for deleting posts. After a comment was created, the user can see the secret id, but it is impossible to get the secret id later without access to the database.

Usage

You can use an iframe to embed the comments.

<iframe width="970" height="500" frameborder=0 style="max-width: 100%;" src="https://hostname.tld/comments?article_id={{ post.title }}"></iframe>

To check for new comments, you can visit https://hostname.tld/recent.

Screenshots

submitting a comment

comments