Skip to content

Commit 188e334

Browse files
push-app-to-main[bot]CrazyWolf13tremor021
authored
Snowshare (#9578)
* 'Add new script' * Update logo URL in snowshare.json * Update snowshare-install.sh * Update snowshare-install.sh * Add source comment for snowshare-install.sh --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
1 parent b55deb6 commit 188e334

File tree

4 files changed

+166
-0
lines changed

4 files changed

+166
-0
lines changed

ct/headers/snowshare

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_____ _____ __
2+
/ ___/____ ____ _ __/ ___// /_ ____ _________
3+
\__ \/ __ \/ __ \ | /| / /\__ \/ __ \/ __ `/ ___/ _ \
4+
___/ / / / / /_/ / |/ |/ /___/ / / / / /_/ / / / __/
5+
/____/_/ /_/\____/|__/|__//____/_/ /_/\__,_/_/ \___/
6+

ct/snowshare.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 <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: TuroYT
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/TuroYT/snowshare
7+
8+
APP="SnowShare"
9+
var_tags="${var_tags:-file-sharing}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-5}"
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+
if [[ ! -d /opt/snowshare ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
if check_for_gh_release "snowshare" "TuroYT/snowshare"; then
32+
msg_info "Stopping Service"
33+
systemctl stop snowshare
34+
msg_ok "Stopped Service"
35+
36+
fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare"
37+
38+
msg_info "Updating Snowshare"
39+
cd /opt/snowshare
40+
$STD npm ci
41+
$STD npx prisma generate
42+
$STD npm run build
43+
msg_ok "Updated Snowshare"
44+
45+
msg_info "Starting Service"
46+
systemctl start snowshare
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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "SnowShare",
3+
"slug": "snowshare",
4+
"categories": [
5+
11
6+
],
7+
"date_created": "2025-09-24",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3000,
12+
"documentation": "https://github.com/TuroYT/snowshare",
13+
"config_path": "/opt/snowshare/.env",
14+
"website": "https://github.com/TuroYT/snowshare",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/png/snowshare.png",
16+
"description": "A modern, secure file and link sharing platform built with Next.js, Prisma, and NextAuth. Share URLs, code snippets, and files with customizable expiration, privacy, and QR codes.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/snowshare.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 1024,
24+
"hdd": 5,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

install/snowshare-install.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: TuroYT
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/TuroYT/snowshare
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+
NODE_VERSION="22" setup_nodejs
17+
PG_VERSION="17" setup_postgresql
18+
PG_DB_USER="snowshare" PG_DB_NAME="snowshare" setup_postgresql_db
19+
fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare"
20+
21+
msg_info "Installing SnowShare"
22+
cd /opt/snowshare
23+
$STD npm ci
24+
cat <<EOF >/opt/snowshare.env
25+
DATABASE_URL="postgresql://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME"
26+
NEXTAUTH_URL="http://localhost:3000"
27+
NEXTAUTH_SECRET="$(openssl rand -base64 32)"
28+
ALLOW_SIGNUP=true
29+
NODE_ENV=production
30+
EOF
31+
set -a
32+
source /opt/snowshare.env
33+
set +a
34+
$STD npx prisma generate
35+
$STD npx prisma migrate deploy
36+
$STD npm run build
37+
cat <<EOF >/etc/systemd/system/snowshare.service
38+
[Unit]
39+
Description=SnowShare - Modern File Sharing Platform
40+
After=network.target postgresql.service
41+
Requires=postgresql.service
42+
43+
[Service]
44+
Type=simple
45+
WorkingDirectory=/opt/snowshare
46+
EnvironmentFile=/opt/snowshare.env
47+
ExecStart=/usr/bin/npm start
48+
Restart=on-failure
49+
RestartSec=10
50+
51+
[Install]
52+
WantedBy=multi-user.target
53+
EOF
54+
systemctl enable -q --now snowshare
55+
msg_ok "Installed SnowShare"
56+
57+
msg_info "Setting up Cleanup Cron Job"
58+
cat <<EOF >/etc/cron.d/snowshare-cleanup
59+
0 2 * * * root cd /opt/snowshare && /usr/bin/npm run cleanup:expired >> /var/log/snowshare-cleanup.log 2>&1
60+
EOF
61+
msg_ok "Set up Cleanup Cron Job"
62+
63+
motd_ssh
64+
customize
65+
cleanup_lxc

0 commit comments

Comments
 (0)