Skip to content

Commit 4d996c9

Browse files
authored
New Script: FreshRSS (#2226)
1 parent 90473b7 commit 4d996c9

File tree

3 files changed

+169
-0
lines changed

3 files changed

+169
-0
lines changed

ct/freshrss.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: bvdberg01
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/FreshRSS/FreshRSS
7+
8+
# App Default Values
9+
APP="FreshRSS"
10+
var_tags="RSS"
11+
var_cpu="2"
12+
var_ram="1024"
13+
var_disk="4"
14+
var_os="debian"
15+
var_version="12"
16+
var_unprivileged="1"
17+
18+
# App Output & Base Settings
19+
header_info "$APP"
20+
base_settings
21+
22+
# Core
23+
variables
24+
color
25+
catch_errors
26+
27+
function update_script() {
28+
header_info
29+
check_container_storage
30+
check_container_resources
31+
if [[ ! -d /opt/freshrss ]]; then
32+
msg_error "No ${APP} Installation Found!"
33+
exit
34+
fi
35+
msg_error "FreshRSS should be updated via the user interface."
36+
exit
37+
}
38+
39+
start
40+
build_container
41+
description
42+
43+
msg_ok "Completed Successfully!\n"
44+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
45+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
46+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

install/freshrss-install.sh

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: bvdberg01
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
color
9+
verb_ip6
10+
catch_errors
11+
setting_up_container
12+
network_check
13+
update_os
14+
15+
msg_info "Installing Dependencies"
16+
$STD apt-get install -y \
17+
curl \
18+
sudo \
19+
mc \
20+
postgresql \
21+
apache2 \
22+
php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \
23+
libapache2-mod-php
24+
msg_ok "Installed Dependencies"
25+
26+
27+
msg_info "Setting up PostgreSQL"
28+
DB_NAME=freshrss
29+
DB_USER=freshrss
30+
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
31+
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
32+
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
33+
{
34+
echo "FreshRSS Credentials"
35+
echo "FreshRSS Database User: $DB_USER"
36+
echo "FreshRSS Database Password: $DB_PASS"
37+
echo "FreshRSS Database Name: $DB_NAME"
38+
} >> ~/freshrss.creds
39+
msg_ok "Set up PostgreSQL"
40+
41+
msg_info "Installing FreshRSS"
42+
RELEASE=$(curl -s https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
43+
cd /opt
44+
wget -q "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip"
45+
unzip -q "${RELEASE}.zip"
46+
mv "/opt/FreshRSS-${RELEASE}" /opt/freshrss
47+
cd /opt/freshrss
48+
chown -R www-data:www-data /opt/freshrss
49+
chmod -R g+rX /opt/freshrss
50+
chmod -R g+w /opt/freshrss/data/
51+
msg_ok "Installed FreshRSS"
52+
53+
msg_info "Creating Service"
54+
cat <<EOF >/etc/apache2/sites-available/freshrss.conf
55+
<VirtualHost *:80>
56+
ServerName freshrss
57+
DocumentRoot /opt/freshrss/p
58+
59+
<Directory /opt/freshrss/p>
60+
Options FollowSymLinks
61+
AllowOverride All
62+
Require all granted
63+
</Directory>
64+
65+
ErrorLog /var/log/apache2/freshrss_error.log
66+
CustomLog /var/log/apache2/freshrss_access.log combined
67+
68+
AllowEncodedSlashes On
69+
</VirtualHost>
70+
EOF
71+
$STD a2ensite freshrss
72+
$STD a2enmod rewrite
73+
$STD a2dissite 000-default.conf
74+
$STD systemctl reload apache2
75+
msg_ok "Created Service"
76+
77+
motd_ssh
78+
customize
79+
80+
msg_info "Cleaning up"
81+
rm -rf "/opt/${RELEASE}.zip"
82+
$STD apt-get -y autoremove
83+
$STD apt-get -y autoclean
84+
msg_ok "Cleaned"

json/freshrss.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "FreshRSS",
3+
"slug": "freshrss",
4+
"categories": [
5+
12
6+
],
7+
"date_created": "2025-02-10",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 80,
12+
"documentation": "https://freshrss.github.io/FreshRSS/en/",
13+
"website": "https://freshrss.org/",
14+
"logo": "https://freshrss.org/images/icon.svg",
15+
"description": "FreshRSS is a self-hosted RSS and Atom feed aggregator that lets users collect, organize, and read from multiple sources in one place. It is lightweight, easy to work with, powerful, and customizable.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/freshrss.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 1024,
23+
"hdd": 4,
24+
"os": "Debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "Database credentials: `cat ~/freshrss.creds`",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)