hnrss provides custom, realtime RSS feeds for Hacker News.
The project page explains all available RSS feeds and options, and is served directly by the running instance.
To build for the local platform without stripping:
go build -o hnrss ../hnrss [-bind HOST:PORT]The default bind address is 127.0.0.1:9000. Override it with -bind:
./hnrss -bind 0.0.0.0:8080The server handles SIGINT (Ctrl-C) with a 5-second graceful shutdown.
Copy the binary:
install -m 755 hnrss /usr/local/bincreate SystemD unit /etc/systemd/system/hnrss.service:
[Unit]
Description=Hacker News RSS
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/hnrss -bind 127.0.0.1:9001
User=daemon
Group=daemon
StandardOutput=journal
StandardError=journal
SyslogIdentifier=hnrss
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload
sudo systemctl enable --now hnrssAnd put a reverse proxy (nginx, Caddy, etc.) in front if it, for example:
server {
server_name hnrss.kakwalab.ovh;
location / {
proxy_pass http://127.0.0.1:9001;
}
# TODO: check if it works without certificate
listen 443 ssl;
#ssl_certificate /etc/letsencrypt/live/hnrss.kakwalab.ovh/fullchain.pem; # managed by Certbot
#ssl_certificate_key /etc/letsencrypt/live/hnrss.kakwalab.ovh/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 {
server_name hnrss.kakwalab.ovh;
listen 80;
location / {
proxy_pass http://127.0.0.1:9001;
}
}finally, run certbot to get a proper certificate.
Runtime dependencies are fetched from the Algolia Hacker News Search API and the Hacker News website directly — no local database or cache is required. The service is stateless.