-
-
Notifications
You must be signed in to change notification settings - Fork 131
Add snowshare #1063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
michelroegl-brunner
merged 23 commits into
community-scripts:main
from
TuroYT:add-snowshare
Nov 3, 2025
Merged
Add snowshare #1063
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b17aebe
add snowshare
TuroYT abef124
some fix
TuroYT 2fe4119
link
TuroYT 21d595d
ok
TuroYT 17c7791
ready to pr
TuroYT 50eaac6
Add jq and fetch latest SnowShare release tag
TuroYT c8b36f3
fix update to latest
TuroYT 28b6a60
Update ct/snowshare.sh
TuroYT 77a82c7
Update ct/snowshare.sh
TuroYT 24ddf4f
testing
TuroYT a5ba34b
Merge branch 'add-snowshare' of https://github.com/TuroYT/ProxmoxVED …
TuroYT 89a062b
Refactor installation script for SnowShare
TuroYT 89d5c09
Remove log messages from installation script
TuroYT 477ae6c
tests
TuroYT a44c936
fixed
TuroYT f8c397c
ok
TuroYT 896299a
fixed install
TuroYT a39be23
ok
TuroYT 8535e8b
Change environment variable to use .env file
TuroYT 21b7d27
Update logo URL in snowshare.json
TuroYT 24832bc
fixed
TuroYT a5a59fc
fix: env file location
CrazyWolf13 300c235
blank link
CrazyWolf13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!/usr/bin/env bash | ||
| source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) | ||
| # Copyright (c) 2021-2025 community-scripts ORG | ||
| # Author: TuroYT | ||
| # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE | ||
| # Source: https://github.com/TuroYT/snowshare | ||
|
|
||
| APP="SnowShare" | ||
| var_tags="${var_tags:-file-sharing}" | ||
| var_cpu="${var_cpu:-1}" | ||
| var_ram="${var_ram:-1024}" | ||
| var_disk="${var_disk:-5}" | ||
| var_os="${var_os:-debian}" | ||
| var_version="${var_version:-13}" | ||
| var_unprivileged="${var_unprivileged:-1}" | ||
|
|
||
| header_info "$APP" | ||
|
|
||
| variables | ||
| color | ||
| catch_errors | ||
|
|
||
| function update_script() { | ||
| header_info | ||
| check_container_storage | ||
| check_container_resources | ||
| if [[ ! -d /opt/snowshare ]]; then | ||
| msg_error "No ${APP} Installation Found!" | ||
| exit | ||
| fi | ||
|
|
||
| if check_for_gh_release "snowshare" "TuroYT/snowshare"; then | ||
| msg_info "Stopping Service" | ||
| systemctl stop snowshare | ||
TuroYT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| msg_ok "Stopped Service" | ||
|
|
||
| fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" | ||
|
|
||
| msg_info "Updating Snowshare" | ||
| cd /opt/snowshare | ||
| $STD npm ci | ||
| $STD npx prisma generate | ||
| $STD npm run build | ||
| msg_ok "Updated Snowshare" | ||
|
|
||
| msg_info "Starting Service" | ||
| systemctl start snowshare | ||
| msg_ok "Started Service" | ||
| msg_ok "Updated successfully!" | ||
| fi | ||
| 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}:3000${CL}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "name": "SnowShare", | ||
| "slug": "snowshare", | ||
| "categories": [ | ||
| 11 | ||
| ], | ||
| "date_created": "2025-09-24", | ||
| "type": "ct", | ||
| "updateable": true, | ||
| "privileged": false, | ||
| "interface_port": 3000, | ||
| "documentation": "https://github.com/TuroYT/snowshare", | ||
| "config_path": "/opt/snowshare/.env", | ||
| "website": "https://github.com/TuroYT/snowshare", | ||
| "logo": "https://github.com/TuroYT/snowshare/raw/main/public/logo.svg", | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "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.", | ||
| "install_methods": [ | ||
| { | ||
| "type": "default", | ||
| "script": "ct/snowshare.sh", | ||
| "resources": { | ||
| "cpu": 1, | ||
| "ram": 1024, | ||
| "hdd": 5, | ||
| "os": "Debian", | ||
| "version": "13" | ||
| } | ||
| } | ||
| ], | ||
| "default_credentials": { | ||
| "username": null, | ||
| "password": null | ||
| }, | ||
| "notes": [] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright (c) 2021-2025 community-scripts ORG | ||
| # Author: TuroYT | ||
| # 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 | ||
|
|
||
| NODE_VERSION="22" setup_nodejs | ||
|
|
||
| cd /opt | ||
CrazyWolf13 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| msg_info "Downloading" | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" | ||
| msg_ok "Snowshare Downloaded" | ||
|
|
||
| msg_info "Setting up PostgreSQL Database" | ||
| setup_postgresql | ||
TuroYT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| DB_NAME=snowshare | ||
| DB_USER=snowshare | ||
| DB_PASS="$(openssl rand -base64 18 | 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 ENCODING 'UTF8' TEMPLATE template0;" | ||
| $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" | ||
| $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" | ||
| $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';" | ||
| echo "" >>~/snowshare.creds | ||
| echo -e "Database Username: $DB_USER" >>~/snowshare.creds | ||
| echo -e "Database Password: $DB_PASS" >>~/snowshare.creds | ||
| echo -e "Database Name: $DB_NAME" >>~/snowshare.creds | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| msg_ok "Set up PostgreSQL Database" | ||
|
|
||
| msg_info "Installing SnowShare (Patience)" | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| APP="snowshare" | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| cd /opt/snowshare | ||
| $STD npm ci | ||
| cat <<EOF >/opt/snowshare/.env | ||
|
||
| DATABASE_URL="postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME" | ||
| NEXTAUTH_URL="http://localhost:3000" | ||
| NEXTAUTH_SECRET="$(openssl rand -base64 32)" | ||
| ALLOW_SIGNUP=true | ||
| NODE_ENV=production | ||
| EOF | ||
|
|
||
| $STD npx prisma generate | ||
| $STD npx prisma migrate deploy | ||
| $STD npm run build | ||
|
|
||
| cat <<EOF >/etc/systemd/system/snowshare.service | ||
| [Unit] | ||
| Description=SnowShare - Modern File Sharing Platform | ||
| After=network.target postgresql.service | ||
| Requires=postgresql.service | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=root | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| WorkingDirectory=/opt/snowshare | ||
| Environment=NODE_ENV=production | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ExecStart=/usr/bin/npm start | ||
| Restart=on-failure | ||
| RestartSec=10 | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| EOF | ||
| systemctl enable -q --now snowshare.service | ||
TuroYT marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| msg_ok "Installed SnowShare" | ||
|
|
||
| msg_info "Setting up Cleanup Cron Job" | ||
| cat <<EOF >/etc/cron.d/snowshare-cleanup | ||
| 0 2 * * * root cd /opt/snowshare && /usr/bin/npm run cleanup:expired >> /var/log/snowshare-cleanup.log 2>&1 | ||
| EOF | ||
| msg_ok "Set up Cleanup Cron Job" | ||
| motd_ssh | ||
TuroYT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| customize | ||
| msg_info "Cleaning up" | ||
TuroYT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $STD apt -y autoremove | ||
| $STD apt -y autoclean | ||
| $STD apt -y clean | ||
| msg_ok "Cleaned" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.