mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	New Script: FreshRSS (#2226)
This commit is contained in:
		
							
								
								
									
										46
									
								
								ct/freshrss.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								ct/freshrss.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: bvdberg01
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://github.com/FreshRSS/FreshRSS
 | 
			
		||||
 | 
			
		||||
# App Default Values
 | 
			
		||||
APP="FreshRSS"
 | 
			
		||||
var_tags="RSS"
 | 
			
		||||
var_cpu="2"
 | 
			
		||||
var_ram="1024"
 | 
			
		||||
var_disk="4"
 | 
			
		||||
var_os="debian"
 | 
			
		||||
var_version="12"
 | 
			
		||||
var_unprivileged="1"
 | 
			
		||||
 | 
			
		||||
# App Output & Base Settings
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
base_settings
 | 
			
		||||
 | 
			
		||||
# Core
 | 
			
		||||
variables
 | 
			
		||||
color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
    header_info
 | 
			
		||||
    check_container_storage
 | 
			
		||||
    check_container_resources
 | 
			
		||||
    if [[ ! -d /opt/freshrss ]]; then
 | 
			
		||||
        msg_error "No ${APP} Installation Found!"
 | 
			
		||||
        exit
 | 
			
		||||
    fi
 | 
			
		||||
    msg_error "FreshRSS should be updated via the user interface."
 | 
			
		||||
    exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
 | 
			
		||||
							
								
								
									
										84
									
								
								install/freshrss-install.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								install/freshrss-install.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,84 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: bvdberg01
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  curl \
 | 
			
		||||
  sudo \
 | 
			
		||||
  mc \
 | 
			
		||||
  postgresql \
 | 
			
		||||
  apache2 \
 | 
			
		||||
  php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \
 | 
			
		||||
  libapache2-mod-php
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up PostgreSQL"
 | 
			
		||||
DB_NAME=freshrss
 | 
			
		||||
DB_USER=freshrss
 | 
			
		||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
 | 
			
		||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
 | 
			
		||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
 | 
			
		||||
{
 | 
			
		||||
echo "FreshRSS Credentials"
 | 
			
		||||
echo "FreshRSS Database User: $DB_USER"
 | 
			
		||||
echo "FreshRSS Database Password: $DB_PASS"
 | 
			
		||||
echo "FreshRSS Database Name: $DB_NAME"
 | 
			
		||||
} >> ~/freshrss.creds
 | 
			
		||||
msg_ok "Set up PostgreSQL"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing FreshRSS"
 | 
			
		||||
RELEASE=$(curl -s https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
			
		||||
cd /opt
 | 
			
		||||
wget -q "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip"
 | 
			
		||||
unzip -q "${RELEASE}.zip"
 | 
			
		||||
mv "/opt/FreshRSS-${RELEASE}" /opt/freshrss
 | 
			
		||||
cd /opt/freshrss
 | 
			
		||||
chown -R www-data:www-data /opt/freshrss
 | 
			
		||||
chmod -R g+rX /opt/freshrss
 | 
			
		||||
chmod -R g+w /opt/freshrss/data/
 | 
			
		||||
msg_ok "Installed FreshRSS"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/apache2/sites-available/freshrss.conf
 | 
			
		||||
<VirtualHost *:80>
 | 
			
		||||
    ServerName freshrss
 | 
			
		||||
    DocumentRoot /opt/freshrss/p
 | 
			
		||||
 | 
			
		||||
    <Directory /opt/freshrss/p>
 | 
			
		||||
        Options FollowSymLinks
 | 
			
		||||
        AllowOverride All
 | 
			
		||||
        Require all granted
 | 
			
		||||
    </Directory>
 | 
			
		||||
 | 
			
		||||
    ErrorLog /var/log/apache2/freshrss_error.log
 | 
			
		||||
    CustomLog /var/log/apache2/freshrss_access.log combined
 | 
			
		||||
 | 
			
		||||
    AllowEncodedSlashes On
 | 
			
		||||
</VirtualHost>
 | 
			
		||||
EOF
 | 
			
		||||
$STD a2ensite freshrss
 | 
			
		||||
$STD a2enmod rewrite
 | 
			
		||||
$STD a2dissite 000-default.conf
 | 
			
		||||
$STD systemctl reload apache2
 | 
			
		||||
msg_ok "Created Service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -rf "/opt/${RELEASE}.zip"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
							
								
								
									
										39
									
								
								json/freshrss.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								json/freshrss.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "FreshRSS",
 | 
			
		||||
  "slug": "freshrss",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    12
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2025-02-10",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 80,
 | 
			
		||||
  "documentation": "https://freshrss.github.io/FreshRSS/en/",
 | 
			
		||||
  "website": "https://freshrss.org/",
 | 
			
		||||
  "logo": "https://freshrss.org/images/icon.svg",
 | 
			
		||||
  "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.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/freshrss.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 2,
 | 
			
		||||
        "ram": 1024,
 | 
			
		||||
        "hdd": 4,
 | 
			
		||||
        "os": "Debian",
 | 
			
		||||
        "version": "12"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "text": "Database credentials: `cat ~/freshrss.creds`",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user