mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-05-06 05:23:08 +00:00
Alpine-Vaultwarden: Fix sed and better cert generation (#4232)
* Fix sed and better cert generation * Update
This commit is contained in:
parent
9f1bf85b42
commit
4510e7b4d8
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# Author: tteck (tteckster) | Co-Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/dani-garcia/vaultwarden
|
||||
|
||||
@ -14,29 +14,24 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apk add newt
|
||||
$STD apk add curl
|
||||
$STD apk add openssl
|
||||
$STD apk add openssh
|
||||
$STD apk add nano
|
||||
$STD apk add mc
|
||||
$STD apk add argon2
|
||||
$STD apk add --no-cache \
|
||||
openssl \
|
||||
argon2
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Alpine-Vaultwarden"
|
||||
$STD apk add vaultwarden
|
||||
sed -i -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden
|
||||
$STD apk add --no-cache vaultwarden
|
||||
sed -i 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden
|
||||
echo -e "export ADMIN_TOKEN=''" >>/etc/conf.d/vaultwarden
|
||||
echo -e "export ROCKET_ADDRESS=0.0.0.0" >>/etc/conf.d/vaultwarden
|
||||
echo -e "export ROCKET_TLS='{certs=\"/etc/ssl/certs/vaultwarden-selfsigned.crt\",key=\"/etc/ssl/private/vaultwarden-selfsigned.key\"}'"
|
||||
$STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/vaultwarden-selfsigned.key -out /etc/ssl/certs/vaultwarden-selfsigned.crt -subj "/C=US/O=Vaultwarden/O
|
||||
U=Domain Control Validated/CN=localhost"
|
||||
echo -e "export ROCKET_TLS='{certs=\"/etc/ssl/certs/vaultwarden-selfsigned.crt\",key=\"/etc/ssl/private/vaultwarden-selfsigned.key\"}'" >>/etc/conf.d/vaultwarden
|
||||
$STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/vaultwarden-selfsigned.key -out /etc/ssl/certs/vaultwarden-selfsigned.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"
|
||||
chown vaultwarden:vaultwarden /etc/ssl/certs/vaultwarden-selfsigned.crt
|
||||
chown vaultwarden:vaultwarden /etc/ssl/private/vaultwarden-selfsigned.key
|
||||
msg_ok "Installed Alpine-Vaultwarden"
|
||||
|
||||
msg_info "Installing Web-Vault"
|
||||
$STD apk add vaultwarden-web-vault
|
||||
$STD apk add --no-cache vaultwarden-web-vault
|
||||
msg_ok "Installed Web-Vault"
|
||||
|
||||
msg_info "Starting Alpine-Vaultwarden"
|
||||
|
Loading…
x
Reference in New Issue
Block a user