-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Yopass #16778
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
Open
push-app-to-main
wants to merge
2
commits into
main
Choose a base branch
from
add-script-yopass-1787727618
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+140
β0
Open
Yopass #16778
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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,6 @@ | ||
| __ __ | ||
| \ \/ /___ ____ ____ ___________ | ||
| \ / __ \/ __ \/ __ `/ ___/ ___/ | ||
| / / /_/ / /_/ / /_/ (__ |__ ) | ||
| /_/\____/ .___/\__,_/____/____/ | ||
| /_/ |
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,67 @@ | ||
| #!/usr/bin/env bash | ||
| _CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main" | ||
| _cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" | ||
| source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") | ||
| # Copyright (c) 2021-2026 community-scripts ORG | ||
| # Author: MickLesk (CanbiZ) | ||
| # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE | ||
| # Source: https://github.com/jhaals/yopass | ||
|
|
||
| APP="Yopass" | ||
| var_tags="${var_tags:-security;secrets}" | ||
| var_cpu="${var_cpu:-2}" | ||
| var_ram="${var_ram:-2048}" | ||
| var_disk="${var_disk:-8}" | ||
| var_os="${var_os:-debian}" | ||
| var_version="${var_version:-13}" | ||
| #var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified | ||
| 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/yopass ]]; then | ||
| msg_error "No ${APP} Installation Found!" | ||
| exit | ||
| fi | ||
|
|
||
| if check_for_gh_release "yopass" "jhaals/yopass"; then | ||
| msg_info "Stopping Service" | ||
| systemctl stop yopass | ||
| msg_ok "Stopped Service" | ||
|
|
||
| CLEAN_INSTALL=1 fetch_and_deploy_gh_release "yopass" "jhaals/yopass" "tarball" | ||
|
|
||
| msg_info "Building Yopass" | ||
| cd /opt/yopass | ||
| $STD go build -ldflags "-X main.version=$(cat ~/.yopass)" ./cmd/yopass-server | ||
| cd /opt/yopass/website | ||
| $STD yarn install --network-timeout 600000 | ||
| $STD yarn build | ||
| msg_ok "Built Yopass" | ||
|
|
||
| msg_info "Starting Service" | ||
| systemctl start yopass | ||
| 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 "${GATEWAY}${BGN}https://${IP}:1337${CL}" | ||
| echo -e "${INFO}${YW}Uses a self-signed certificate - accept the browser warning once.${CL}" | ||
| echo -e "${INFO}${YW}Yopass encrypts in the browser and needs HTTPS, plain HTTP will not work.${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,69 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright (c) 2021-2026 community-scripts ORG | ||
| # Author: MickLesk (CanbiZ) | ||
| # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE | ||
| # Source: https://github.com/jhaals/yopass | ||
|
|
||
| source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" | ||
| color | ||
| verb_ip6 | ||
| catch_errors | ||
| setting_up_container | ||
| network_check | ||
| update_os | ||
|
|
||
| msg_info "Installing Dependencies" | ||
| $STD apt install -y redis-server | ||
| systemctl enable -q --now redis-server | ||
| msg_ok "Installed Dependencies" | ||
|
|
||
| setup_go | ||
| NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs | ||
|
|
||
| fetch_and_deploy_gh_release "yopass" "jhaals/yopass" "tarball" | ||
|
|
||
| msg_info "Building Yopass" | ||
| cd /opt/yopass | ||
| $STD go build -ldflags "-X main.version=$(cat ~/.yopass)" ./cmd/yopass-server | ||
| cd /opt/yopass/website | ||
| $STD yarn install --network-timeout 600000 | ||
| $STD yarn build | ||
| msg_ok "Built Yopass" | ||
|
|
||
| msg_info "Generating SSL Certificate" | ||
| mkdir -p /opt/yopass/certificates | ||
| openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \ | ||
| -keyout /opt/yopass/certificates/key.pem \ | ||
| -out /opt/yopass/certificates/cert.pem \ | ||
| -subj "/C=US/ST=State/L=City/O=Yopass/CN=${LOCAL_IP}" \ | ||
| -addext "subjectAltName=IP:${LOCAL_IP},DNS:localhost,IP:127.0.0.1" \ | ||
| 2>/dev/null | ||
| chmod 600 /opt/yopass/certificates/key.pem | ||
| chmod 644 /opt/yopass/certificates/cert.pem | ||
| msg_ok "Generated SSL Certificate" | ||
|
|
||
| msg_info "Creating Service" | ||
| cat <<EOF >/etc/systemd/system/yopass.service | ||
| [Unit] | ||
| Description=Yopass | ||
| Wants=network-online.target | ||
| After=network-online.target redis-server.service | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=root | ||
| WorkingDirectory=/opt/yopass | ||
| ExecStart=/opt/yopass/yopass-server --address 0.0.0.0 --port 1337 --tls-cert /opt/yopass/certificates/cert.pem --tls-key /opt/yopass/certificates/key.pem --database redis --redis redis://127.0.0.1:6379/0 --asset-path /opt/yopass/website/dist | ||
| Restart=on-failure | ||
| RestartSec=5 | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| EOF | ||
| systemctl enable -q --now yopass | ||
| msg_ok "Created Service" | ||
|
|
||
| motd_ssh | ||
| customize | ||
| cleanup_lxc |
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.