Skip to content

Commit 2f093c4

Browse files
committed
Add RSSHub container script
Introduce RSSHub as a new CT target with install, update, Redis-backed runtime, and JSON metadata for the catalog. Also document the GH_INCLUDE_PRERELEASE helper flag in AGENTS.md so scripts can handle projects that only publish pre-releases.
1 parent 24bdc12 commit 2f093c4

4 files changed

Lines changed: 196 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@ fetch_and_deploy_gh_release "appname" "owner/repo" "singlefile" "latest" "/opt/a
196196
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "appname" "owner/repo" "tarball"
197197
```
198198

199+
**Pre-release projects:** `/releases/latest` on GitHub hides pre-releases. For projects
200+
that only ship betas (e.g. RustFS), set `GH_INCLUDE_PRERELEASE=1` — it applies to both
201+
`fetch_and_deploy_gh_release` and `check_for_gh_release`:
202+
203+
```bash
204+
GH_INCLUDE_PRERELEASE=1 fetch_and_deploy_gh_release "app" "owner/repo" "prebuild" "latest" "/opt/app" "app-linux-amd64.zip"
205+
if GH_INCLUDE_PRERELEASE=1 check_for_gh_release "app" "owner/repo"; then
206+
```
207+
199208
**Version file:** After `fetch_and_deploy_gh_release`, the deployed version is stored in `~/.appname`. You can read it with `cat ~/.appname` — useful when you need the version later (e.g. for build-time environment variables).
200209
201210
### Runtime/Language Setup

ct/rsshub.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
source "$(dirname "${BASH_SOURCE[0]}")/../misc/build.func" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}/misc/build.func")
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/DIYgod/RSSHub
7+
8+
APP="RSSHub"
9+
var_tags="${var_tags:-rss;feeds}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-4096}"
12+
var_disk="${var_disk:-12}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d /opt/rsshub ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
32+
if check_for_gh_release "rsshub" "DIYgod/RSSHub"; then
33+
msg_info "Stopping Service"
34+
systemctl stop rsshub
35+
msg_ok "Stopped Service"
36+
37+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rsshub" "DIYgod/RSSHub" "tarball"
38+
39+
msg_info "Building RSSHub (Patience)"
40+
cd /opt/rsshub
41+
$STD pnpm install --frozen-lockfile
42+
$STD pnpm build
43+
msg_ok "Built RSSHub"
44+
45+
msg_info "Starting Service"
46+
systemctl start rsshub
47+
msg_ok "Started Service"
48+
msg_ok "Updated successfully!"
49+
fi
50+
exit
51+
}
52+
53+
start
54+
build_container
55+
description
56+
57+
msg_ok "Completed Successfully!\n"
58+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
59+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
60+
echo -e "${GATEWAY}${BGN}http://${IP}:1200${CL}"

install/rsshub-install.sh

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/DIYgod/RSSHub
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt install -y \
18+
build-essential \
19+
python3 \
20+
redis-server
21+
systemctl enable -q --now redis-server
22+
msg_ok "Installed Dependencies"
23+
24+
NODE_VERSION="22" NODE_MODULE="pnpm@^10" setup_nodejs
25+
26+
fetch_and_deploy_gh_release "rsshub" "DIYgod/RSSHub" "tarball"
27+
28+
msg_info "Building RSSHub (Patience)"
29+
cd /opt/rsshub
30+
$STD pnpm install --frozen-lockfile
31+
$STD pnpm build
32+
msg_ok "Built RSSHub"
33+
34+
msg_info "Configuring RSSHub"
35+
cat <<EOF >/opt/rsshub.env
36+
NODE_ENV=production
37+
PORT=1200
38+
CACHE_TYPE=redis
39+
REDIS_URL=redis://127.0.0.1:6379/
40+
CACHE_EXPIRE=300
41+
NODE_OPTIONS=--max-http-header-size=32768
42+
43+
# Restrict who may use this instance (recommended if reachable from outside):
44+
#ACCESS_KEY=$(openssl rand -hex 16)
45+
EOF
46+
chmod 600 /opt/rsshub.env
47+
msg_ok "Configured RSSHub"
48+
49+
msg_info "Creating Service"
50+
cat <<EOF >/etc/systemd/system/rsshub.service
51+
[Unit]
52+
Description=RSSHub
53+
Wants=network-online.target
54+
After=network-online.target redis-server.service
55+
56+
[Service]
57+
Type=simple
58+
User=root
59+
WorkingDirectory=/opt/rsshub
60+
EnvironmentFile=/opt/rsshub.env
61+
ExecStart=/usr/bin/node dist/index.mjs
62+
Restart=on-failure
63+
RestartSec=5
64+
65+
[Install]
66+
WantedBy=multi-user.target
67+
EOF
68+
systemctl enable -q --now rsshub
69+
msg_ok "Created Service"
70+
71+
motd_ssh
72+
customize
73+
cleanup_lxc

json/rsshub.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "RSSHub",
3+
"slug": "rsshub",
4+
"categories": [
5+
12
6+
],
7+
"date_created": "2026-08-03",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"has_arm": true,
12+
"interface_port": 1200,
13+
"documentation": "https://docs.rsshub.app/",
14+
"website": "https://rsshub.app/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/rsshub.webp",
16+
"config_path": "/opt/rsshub.env",
17+
"description": "RSSHub generates RSS feeds for sites that do not offer them - social networks, video platforms, shops, forums, news outlets and hundreds more, through community-maintained route definitions. Feed the resulting URLs into any reader such as FreshRSS, Miniflux or CommaFeed.",
18+
"install_methods": [
19+
{
20+
"type": "default",
21+
"script": "ct/rsshub.sh",
22+
"config_path": "/opt/rsshub.env",
23+
"resources": {
24+
"cpu": 2,
25+
"ram": 4096,
26+
"hdd": 12,
27+
"os": "Debian",
28+
"version": "13"
29+
}
30+
}
31+
],
32+
"default_credentials": {
33+
"username": null,
34+
"password": null
35+
},
36+
"notes": [
37+
{
38+
"text": "The instance is open to anyone who can reach it. If it is exposed beyond your LAN, uncomment ACCESS_KEY in /opt/rsshub.env and append ?key=... to your feed URLs, otherwise strangers can use your server to scrape third-party sites.",
39+
"type": "warning"
40+
},
41+
{
42+
"text": "Caching goes to the local Redis with a 300 second expiry. Many routes scrape HTML, so a short cache means more requests to the target site and a higher chance of being rate-limited or blocked - raise CACHE_EXPIRE if a route starts failing.",
43+
"type": "info"
44+
},
45+
{
46+
"text": "Routes that need credentials (some social networks) are configured through additional environment variables in /opt/rsshub.env - see the route documentation upstream.",
47+
"type": "info"
48+
},
49+
{
50+
"text": "The build is a large TypeScript project and takes several minutes; 4 GB RAM is the practical minimum for it to complete.",
51+
"type": "info"
52+
}
53+
]
54+
}

0 commit comments

Comments
 (0)