Compare commits

...

4 Commits

Author SHA1 Message Date
MickLesk 80183b1e9e fix: generate first logins and secrets instead of fixed ones in 13 more installs
authelia, qbittorrent, rabbitmq, nagios, neko, paymenter, nodebb, homelable, snapotter and octoprint's Linux user were created with fixed passwords; each now uses random_password and saves the login in ~/<app>.creds. Stirling-PDF no longer sets admin/stirling explicitly, so its own default asks for a new password on first login again. Firefly kept the example APP_KEY and STATIC_CRON_TOKEN, and SigNoz used the JWT secret "secret"; both are generated now. Only new installs change.
2026-11-09 15:39:04 +01:00
MickLesk fdace325ad fix: generate the webmin, code-server and copyparty logins; leave existing installs alone
webmin set root/root, coder-code-server ran without authentication as root on 0.0.0.0:8680, and copyparty took community-scripts.org when the password prompt was left empty. New installs now get a random password in ~/<app>.creds. The filebrowser and quantum updates no longer touch existing installs, and the FileBrowser database is no longer world-readable.
2026-11-09 15:36:10 +01:00
MickLesk db2721208a fix: generate the admin password in monica, archivebox, kimai, npmplus, keycloak, photoprism
These installs created their first admin with a public password (community-scripts.org, admin123 or changeme). Each now uses random_password and saves the login in ~/<app>.creds. The Keycloak unit, which carries the bootstrap admin, is no longer world-readable.
2026-11-09 15:16:43 +01:00
MickLesk 77853ffe37 fix(filebrowser): generate the admin password instead of a public one
The addon, filebrowser-quantum and the FileBrowser option of homeassistant and podman-homeassistant created admin with the password community-scripts.org, on a service that runs as root over the whole filesystem. A new install now gets a random password in ~/filebrowser.creds or ~/filebrowser-quantum.creds, and an update replaces the public password on existing installs. Quantum only keeps adminPassword in its config until the admin exists, since it resets the password on every start. The Home Assistant options run the addon instead of their own copy pinned to FileBrowser 2.23.0, the service no longer forces the listen address back to 0.0.0.0, and the no-authentication prompt says what it exposes.
2026-11-09 15:15:09 +01:00
26 changed files with 167 additions and 93 deletions
+1 -26
View File
@@ -70,32 +70,7 @@ function update_script() {
exit exit
fi fi
if [ "$UPD" == "4" ]; then if [ "$UPD" == "4" ]; then
msg_info "Installing FileBrowser" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/filebrowser.sh)"
RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g')
$STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-$(arch_resolve)-filebrowser.tar.gz | tar -xzv -C /usr/local/bin
$STD filebrowser config init -a '0.0.0.0'
$STD filebrowser config set -a '0.0.0.0'
$STD filebrowser users add admin community-scripts.org --perm.admin
msg_ok "Installed FileBrowser"
msg_info "Creating Service"
service_path="/etc/systemd/system/filebrowser.service"
echo "[Unit]
Description=Filebrowser
After=network-online.target
[Service]
User=root
WorkingDirectory=/root/
ExecStart=/usr/local/bin/filebrowser -r /
[Install]
WantedBy=default.target" >$service_path
$STD systemctl enable --now filebrowser
msg_ok "Created Service"
msg_ok "Completed successfully!\n"
echo -e "FileBrowser should be reachable by going to the following URL.
${BL}http://$LOCAL_IP:8080${CL} admin|community-scripts.org\n"
exit exit
fi fi
} }
+1 -27
View File
@@ -66,33 +66,7 @@ function update_script() {
exit exit
fi fi
if [ "$UPD" == "3" ]; then if [ "$UPD" == "3" ]; then
msg_info "Installing FileBrowser" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/filebrowser.sh)"
$STD curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
$STD filebrowser config init -a '0.0.0.0'
$STD filebrowser config set -a '0.0.0.0'
$STD filebrowser users add admin community-scripts.org --perm.admin
msg_ok "Installed FileBrowser"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/filebrowser.service
[Unit]
Description=Filebrowser
After=network-online.target
[Service]
User=root
WorkingDirectory=/root/
ExecStart=/usr/local/bin/filebrowser -r /
[Install]
WantedBy=default.target
EOF
systemctl enable -q --now filebrowser
msg_ok "Created Service"
msg_ok "Completed successfully!\n"
echo -e "FileBrowser should be reachable by going to the following URL.
${BL}http://$LOCAL_IP:8080${CL} admin|community-scripts.org\n"
exit exit
fi fi
if [ "$UPD" == "4" ]; then if [ "$UPD" == "4" ]; then
+8 -2
View File
@@ -48,6 +48,7 @@ chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local}
chmod -R 755 /opt/archivebox/data chmod -R 755 /opt/archivebox/data
$STD uv pip install archivebox --system --break-system-packages $STD uv pip install archivebox --system --break-system-packages
cd /opt/archivebox/data cd /opt/archivebox/data
ADMIN_PASS=$(random_password 20)
expect <<EOF expect <<EOF
set timeout -1 set timeout -1
log_user 0 log_user 0
@@ -62,13 +63,18 @@ expect "Email address"
send "\r" send "\r"
expect "Password" expect "Password"
send "community-scripts.org\r" send "${ADMIN_PASS}\r"
expect "Password (again)" expect "Password (again)"
send "community-scripts.org\r" send "${ADMIN_PASS}\r"
expect eof expect eof
EOF EOF
{
echo "ArchiveBox Credentials"
echo "Username: archivebox"
echo "Password: ${ADMIN_PASS}"
} >~/archivebox.creds
msg_ok "Installed ArchiveBox" msg_ok "Installed ArchiveBox"
msg_info "Creating Service" msg_info "Creating Service"
+8 -1
View File
@@ -63,12 +63,19 @@ else
fi fi
echo "$AUTHELIA_URL" >/etc/authelia/.authelia_url echo "$AUTHELIA_URL" >/etc/authelia/.authelia_url
AUTHELIA_PASS=$(random_password 20)
AUTHELIA_HASH=$(authelia crypto hash generate argon2 --password "$AUTHELIA_PASS" | awk '/Digest:/{print $2}')
{
echo "Authelia Credentials"
echo "Username: authelia"
echo "Password: ${AUTHELIA_PASS}"
} >~/authelia.creds
cat <<EOF >/etc/authelia/users.yml cat <<EOF >/etc/authelia/users.yml
users: users:
authelia: authelia:
disabled: false disabled: false
displayname: "Authelia Admin" displayname: "Authelia Admin"
password: "\$argon2id\$v=19\$m=65536,t=3,p=4\$ZBopMzXrzhHXPEZxRDVT2w\$SxWm96DwhOsZyn34DLocwQEIb4kCDsk632PuiMdZnig" password: "${AUTHELIA_HASH}"
groups: [] groups: []
EOF EOF
cat <<EOF >/etc/authelia/configuration.yml cat <<EOF >/etc/authelia/configuration.yml
+1
View File
@@ -26,6 +26,7 @@ chown -R www-data:www-data /opt/firefly
chmod -R 775 /opt/firefly/storage chmod -R 775 /opt/firefly/storage
cd /opt/firefly cd /opt/firefly
cp .env.example .env cp .env.example .env
sed -i -e "s|^APP_KEY=.*|APP_KEY=$(random_password 32)|" -e "s|^STATIC_CRON_TOKEN=.*|STATIC_CRON_TOKEN=$(random_password 32)|" /opt/firefly/.env
sed -i "s/DB_HOST=.*/DB_HOST=localhost/" /opt/firefly/.env sed -i "s/DB_HOST=.*/DB_HOST=localhost/" /opt/firefly/.env
sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$MARIADB_DB_PASS/" /opt/firefly/.env sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$MARIADB_DB_PASS/" /opt/firefly/.env
$STD composer install --no-dev --no-plugins --no-interaction $STD composer install --no-dev --no-plugins --no-interaction
+7 -1
View File
@@ -33,7 +33,13 @@ msg_ok "Set up Python Backend"
msg_info "Configuring Homelable" msg_info "Configuring Homelable"
mkdir -p /opt/homelable/data mkdir -p /opt/homelable/data
SECRET_KEY=$(openssl rand -hex 32) SECRET_KEY=$(openssl rand -hex 32)
BCRYPT_HASH=$(/opt/homelable/backend/.venv/bin/python -c "import bcrypt; print(bcrypt.hashpw(b'admin', bcrypt.gensalt()).decode())") HOMELABLE_PASS=$(random_password 20)
BCRYPT_HASH=$(/opt/homelable/backend/.venv/bin/python -c "import bcrypt,sys; print(bcrypt.hashpw(sys.argv[1].encode(), bcrypt.gensalt()).decode())" "$HOMELABLE_PASS")
{
echo "Homelable Credentials"
echo "Username: admin"
echo "Password: ${HOMELABLE_PASS}"
} >~/homelable.creds
cat <<EOF >/opt/homelable/backend/.env cat <<EOF >/opt/homelable/backend/.env
SECRET_KEY=${SECRET_KEY} SECRET_KEY=${SECRET_KEY}
SQLITE_PATH=/opt/homelable/data/homelab.db SQLITE_PATH=/opt/homelable/data/homelab.db
+9 -1
View File
@@ -21,6 +21,7 @@ PG_DB_NAME="keycloak" PG_DB_USER="keycloak" setup_postgresql_db
fetch_and_deploy_gh_release "keycloak_app" "keycloak/keycloak" "prebuild" "latest" "/opt/keycloak" "keycloak-*.tar.gz" fetch_and_deploy_gh_release "keycloak_app" "keycloak/keycloak" "prebuild" "latest" "/opt/keycloak" "keycloak-*.tar.gz"
msg_info "Creating Service" msg_info "Creating Service"
ADMIN_PASS=$(random_password 20)
cat <<EOF >/etc/systemd/system/keycloak.service cat <<EOF >/etc/systemd/system/keycloak.service
[Unit] [Unit]
Description=Keycloak Service Description=Keycloak Service
@@ -40,7 +41,7 @@ Environment="KC_DB_USERNAME=keycloak"
Environment="KC_DB_PASSWORD=$PG_DB_PASS" Environment="KC_DB_PASSWORD=$PG_DB_PASS"
Environment="KC_HTTP_ENABLED=true" Environment="KC_HTTP_ENABLED=true"
Environment="KC_BOOTSTRAP_ADMIN_USERNAME=tmpadm" Environment="KC_BOOTSTRAP_ADMIN_USERNAME=tmpadm"
Environment="KC_BOOTSTRAP_ADMIN_PASSWORD=admin123" Environment="KC_BOOTSTRAP_ADMIN_PASSWORD=${ADMIN_PASS}"
# Comment following line and uncomment the next 2 if working behind a reverse proxy # Comment following line and uncomment the next 2 if working behind a reverse proxy
Environment="KC_HOSTNAME_STRICT=false" Environment="KC_HOSTNAME_STRICT=false"
#Environment="KC_HOSTNAME=keycloak.example.com" #Environment="KC_HOSTNAME=keycloak.example.com"
@@ -48,6 +49,13 @@ Environment="KC_HOSTNAME_STRICT=false"
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
chmod 600 /etc/systemd/system/keycloak.service
{
echo "Keycloak Credentials"
echo "Temporary admin, replace it with a permanent one"
echo "Username: tmpadm"
echo "Password: ${ADMIN_PASS}"
} >~/keycloak.creds
systemctl enable -q --now keycloak systemctl enable -q --now keycloak
msg_ok "Created Service" msg_ok "Created Service"
+8 -1
View File
@@ -40,6 +40,7 @@ cp .env.dist .env
sed -i "/^DATABASE_URL=.*/c\DATABASE_URL=mysql://kimai:$MARIADB_DB_PASS@127.0.0.1:3306/kimai_db?charset=utf8mb4&serverVersion=mariadb-$MYSQL_VERSION" /opt/kimai/.env sed -i "/^DATABASE_URL=.*/c\DATABASE_URL=mysql://kimai:$MARIADB_DB_PASS@127.0.0.1:3306/kimai_db?charset=utf8mb4&serverVersion=mariadb-$MYSQL_VERSION" /opt/kimai/.env
sed -i "s|^APP_SECRET=.*|APP_SECRET=$APP_SECRET|" /opt/kimai/.env sed -i "s|^APP_SECRET=.*|APP_SECRET=$APP_SECRET|" /opt/kimai/.env
$STD bin/console kimai:install -n $STD bin/console kimai:install -n
ADMIN_PASS=$(random_password 20)
$STD expect <<EOF $STD expect <<EOF
set timeout -1 set timeout -1
log_user 0 log_user 0
@@ -47,10 +48,16 @@ log_user 0
spawn bin/console kimai:user:create admin admin@community-scripts.org ROLE_SUPER_ADMIN spawn bin/console kimai:user:create admin admin@community-scripts.org ROLE_SUPER_ADMIN
expect "Please enter the password:" expect "Please enter the password:"
send "community-scripts.org\r" send "${ADMIN_PASS}\r"
expect eof expect eof
EOF EOF
{
echo "Kimai Credentials"
echo "Username: admin"
echo "Email: admin@community-scripts.org"
echo "Password: ${ADMIN_PASS}"
} >~/kimai.creds
$STD composer update --no-interaction $STD composer update --no-interaction
cat <<EOF >/opt/kimai/config/packages/local.yaml cat <<EOF >/opt/kimai/config/packages/local.yaml
kimai: kimai:
+7 -1
View File
@@ -33,7 +33,13 @@ $STD yarn config set ignore-engines true
$STD yarn install $STD yarn install
$STD yarn run production $STD yarn run production
$STD php artisan key:generate $STD php artisan key:generate
$STD php artisan setup:production --email=admin@community-scripts.org --password=community-scripts.org --force ADMIN_PASS=$(random_password 20)
$STD php artisan setup:production --email=admin@community-scripts.org --password="${ADMIN_PASS}" --force
{
echo "Monica Credentials"
echo "Email: admin@community-scripts.org"
echo "Password: ${ADMIN_PASS}"
} >~/monica.creds
chown -R www-data:www-data /opt/monica chown -R www-data:www-data /opt/monica
chmod -R 775 /opt/monica/storage chmod -R 775 /opt/monica/storage
echo "* * * * * root php /opt/monica/artisan schedule:run >> /dev/null 2>&1" >>/etc/crontab echo "* * * * * root php /opt/monica/artisan schedule:run >> /dev/null 2>&1" >>/etc/crontab
+7 -1
View File
@@ -63,7 +63,13 @@ setcap cap_net_raw+p /bin/ping
msg_ok "Built Nagios Plugins" msg_ok "Built Nagios Plugins"
msg_info "Configuring Web Authentication" msg_info "Configuring Web Authentication"
$STD htpasswd -bc /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin NAGIOS_PASS=$(random_password 20)
$STD htpasswd -bc /usr/local/nagios/etc/htpasswd.users nagiosadmin "$NAGIOS_PASS"
{
echo "Nagios Credentials"
echo "Username: nagiosadmin"
echo "Password: ${NAGIOS_PASS}"
} >~/nagios.creds
chown root:www-data /usr/local/nagios/etc/htpasswd.users chown root:www-data /usr/local/nagios/etc/htpasswd.users
chmod 640 /usr/local/nagios/etc/htpasswd.users chmod 640 /usr/local/nagios/etc/htpasswd.users
msg_ok "Configured Web Authentication" msg_ok "Configured Web Authentication"
+9 -2
View File
@@ -201,6 +201,13 @@ cat <<'EOF' >/etc/neko/openbox.xml
</openbox_config> </openbox_config>
EOF EOF
NEKO_ADMIN_PASS=$(random_password 20)
NEKO_USER_PASS=$(random_password 20)
{
echo "Neko Credentials"
echo "Admin password: ${NEKO_ADMIN_PASS}"
echo "User password: ${NEKO_USER_PASS}"
} >~/neko.creds
cat <<EOF >/etc/neko/neko.yaml cat <<EOF >/etc/neko/neko.yaml
server: server:
bind: "0.0.0.0:8080" bind: "0.0.0.0:8080"
@@ -219,8 +226,8 @@ desktop:
member: member:
provider: "multiuser" provider: "multiuser"
multiuser: multiuser:
admin_password: "admin" admin_password: "${NEKO_ADMIN_PASS}"
user_password: "neko" user_password: "${NEKO_USER_PASS}"
EOF EOF
msg_ok "Set up Runtime" msg_ok "Set up Runtime"
+5 -2
View File
@@ -31,6 +31,7 @@ NODEBB_USER="nodebb"
NODEBB_PWD="$(random_password 13)" NODEBB_PWD="$(random_password 13)"
MONGO_CONNECTION_STRING="mongodb://${NODEBB_USER}:${NODEBB_PWD}@localhost:27017/nodebb" MONGO_CONNECTION_STRING="mongodb://${NODEBB_USER}:${NODEBB_PWD}@localhost:27017/nodebb"
NODEBB_SECRET=$(uuidgen) NODEBB_SECRET=$(uuidgen)
NODEBB_ADMIN_PASS="$(random_password 20)"
cat <<EOF >~/nodebb.creds cat <<EOF >~/nodebb.creds
NodeBB-Credentials NodeBB-Credentials
Mongo Database User: $MONGO_ADMIN_USER Mongo Database User: $MONGO_ADMIN_USER
@@ -38,6 +39,8 @@ Mongo Database Password: $MONGO_ADMIN_PWD
NodeBB User: $NODEBB_USER NodeBB User: $NODEBB_USER
NodeBB Password: $NODEBB_PWD NodeBB Password: $NODEBB_PWD
NodeBB Secret: $NODEBB_SECRET NodeBB Secret: $NODEBB_SECRET
NodeBB Admin User: community-scripts
NodeBB Admin Password: $NODEBB_ADMIN_PASS
EOF EOF
$STD mongosh <<EOF $STD mongosh <<EOF
@@ -97,10 +100,10 @@ expect "Administrator email address" {
send "admin@community-scripts.org\r" send "admin@community-scripts.org\r"
} }
expect "Password" { expect "Password" {
send "community-scripts\r" send "$NODEBB_ADMIN_PASS\r"
} }
expect "Confirm Password" { expect "Confirm Password" {
send "community-scripts\r" send "$NODEBB_ADMIN_PASS\r"
} }
expect eof expect eof
EOF EOF
+7 -1
View File
@@ -57,11 +57,17 @@ done
ACME_EMAIL_INPUT="${var_npmplus_acme_email:-}" ACME_EMAIL_INPUT="${var_npmplus_acme_email:-}"
[[ -n "$ACME_EMAIL_INPUT" ]] || read -r -p "${TAB3}Enter your ACME Email (optional, press ENTER to skip): " ACME_EMAIL_INPUT || true [[ -n "$ACME_EMAIL_INPUT" ]] || read -r -p "${TAB3}Enter your ACME Email (optional, press ENTER to skip): " ACME_EMAIL_INPUT || true
ADMIN_PASS=$(random_password 20)
yq -i " yq -i "
.services.npmplus.environment |= .services.npmplus.environment |=
(map(select(. != \"TZ=*\" and . != \"ACME_EMAIL=*\" and . != \"INITIAL_ADMIN_EMAIL=*\" and . != \"INITIAL_ADMIN_PASSWORD=*\")) + (map(select(. != \"TZ=*\" and . != \"ACME_EMAIL=*\" and . != \"INITIAL_ADMIN_EMAIL=*\" and . != \"INITIAL_ADMIN_PASSWORD=*\")) +
[\"TZ=$TZ_INPUT\", \"ACME_EMAIL=$ACME_EMAIL_INPUT\", \"INITIAL_ADMIN_EMAIL=admin@local.com\", \"INITIAL_ADMIN_PASSWORD=community-scripts.org\"]) [\"TZ=$TZ_INPUT\", \"ACME_EMAIL=$ACME_EMAIL_INPUT\", \"INITIAL_ADMIN_EMAIL=admin@local.com\", \"INITIAL_ADMIN_PASSWORD=${ADMIN_PASS}\"])
" /opt/compose.yaml " /opt/compose.yaml
{
echo "NPMplus Credentials"
echo "Email: admin@local.com"
echo "Password: ${ADMIN_PASS}"
} >~/npmplus.creds
msg_info "Building and Starting NPMplus (Patience)" msg_info "Building and Starting NPMplus (Patience)"
$STD docker compose up -d $STD docker compose up -d
+7 -1
View File
@@ -30,7 +30,13 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
msg_ok "Setup Python3" msg_ok "Setup Python3"
msg_info "Creating user octoprint" msg_info "Creating user octoprint"
useradd -m -s /bin/bash -p $(openssl passwd -1 octoprint) octoprint OCTOPRINT_PASS=$(random_password 20)
useradd -m -s /bin/bash -p "$(openssl passwd -6 "$OCTOPRINT_PASS")" octoprint
{
echo "OctoPrint Linux user Credentials"
echo "Username: octoprint"
echo "Password: ${OCTOPRINT_PASS}"
} >~/octoprint.creds
usermod -aG sudo,tty,dialout octoprint usermod -aG sudo,tty,dialout octoprint
chown -R octoprint:octoprint /opt chown -R octoprint:octoprint /opt
echo "octoprint ALL=NOPASSWD: $(command -v systemctl) restart octoprint, $(command -v reboot), $(command -v poweroff)" >/etc/sudoers.d/octoprint echo "octoprint ALL=NOPASSWD: $(command -v systemctl) restart octoprint, $(command -v reboot), $(command -v poweroff)" >/etc/sudoers.d/octoprint
+7 -1
View File
@@ -43,7 +43,13 @@ $STD php artisan migrate --force --seed
msg_ok "Set up database" msg_ok "Set up database"
msg_info "Creating Admin User" msg_info "Creating Admin User"
$STD php artisan app:user:create paymenter admin admin@paymenter.org paymenter 1 -q PAYMENTER_PASS=$(random_password 20)
$STD php artisan app:user:create paymenter admin admin@paymenter.org "$PAYMENTER_PASS" 1 -q
{
echo "Paymenter Credentials"
echo "Email: admin@paymenter.org"
echo "Password: ${PAYMENTER_PASS}"
} >~/paymenter.creds
msg_ok "Created Admin User" msg_ok "Created Admin User"
msg_info "Configuring Nginx" msg_info "Configuring Nginx"
+8 -2
View File
@@ -46,10 +46,16 @@ tar -xzf /tmp/libheif.tar.gz -C /usr/local
ldconfig ldconfig
echo "${LIBHEIF_URL}" >~/.photoprism_libheif echo "${LIBHEIF_URL}" >~/.photoprism_libheif
chmod -R 755 /opt/photoprism/photos/originals chmod -R 755 /opt/photoprism/photos/originals
ADMIN_PASS=$(random_password 20)
{
echo "PhotoPrism Credentials"
echo "Username: admin"
echo "Password: ${ADMIN_PASS}"
} >~/photoprism.creds
cat <<EOF >/opt/photoprism/config/.env cat <<EOF >/opt/photoprism/config/.env
# Authentication # Authentication
PHOTOPRISM_ADMIN_USER='admin' PHOTOPRISM_ADMIN_USER='admin'
PHOTOPRISM_ADMIN_PASSWORD='changeme' PHOTOPRISM_ADMIN_PASSWORD='${ADMIN_PASS}'
PHOTOPRISM_AUTH_MODE='password' PHOTOPRISM_AUTH_MODE='password'
PHOTOPRISM_PUBLIC='false' PHOTOPRISM_PUBLIC='false'
@@ -112,7 +118,7 @@ StoragePath: "/opt/photoprism/storage"
OriginalsPath: "/opt/photoprism/photos/originals" OriginalsPath: "/opt/photoprism/photos/originals"
ImportPath: "/media" ImportPath: "/media"
AdminUser: "admin" AdminUser: "admin"
AdminPassword: "changeme" AdminPassword: "${ADMIN_PASS}"
AuthMode: "password" AuthMode: "password"
DatabaseDriver: "sqlite" DatabaseDriver: "sqlite"
HttpHost: "0.0.0.0" HttpHost: "0.0.0.0"
+9 -1
View File
@@ -18,12 +18,20 @@ fetch_and_deploy_gh_release "qbittorrent" "userdocs/qbittorrent-nox-static" "sin
msg_info "Setup qBittorrent-nox" msg_info "Setup qBittorrent-nox"
mv /opt/qbittorrent/qbittorrent /opt/qbittorrent/qbittorrent-nox mv /opt/qbittorrent/qbittorrent /opt/qbittorrent/qbittorrent-nox
mkdir -p ~/.config/qBittorrent/ mkdir -p ~/.config/qBittorrent/
QB_PASS=$(random_password 20)
QB_SALT=$(random_password 16)
QB_HASH="$(printf '%s' "$QB_SALT" | base64 -w0):$(openssl kdf -keylen 64 -kdfopt digest:SHA512 -kdfopt pass:"$QB_PASS" -kdfopt salt:"$QB_SALT" -kdfopt iter:100000 -binary PBKDF2 | base64 -w0)"
{
echo "qBittorrent Credentials"
echo "Username: admin"
echo "Password: ${QB_PASS}"
} >~/qbittorrent.creds
cat <<EOF >~/.config/qBittorrent/qBittorrent.conf cat <<EOF >~/.config/qBittorrent/qBittorrent.conf
[LegalNotice] [LegalNotice]
Accepted=true Accepted=true
[Preferences] [Preferences]
WebUI\Password_PBKDF2="@ByteArray(amjeuVrF3xRbgzqWQmes5A==:XK3/Ra9jUmqUc4RwzCtrhrkQIcYczBl90DJw2rT8DFVTss4nxpoRhvyxhCf87ahVE3SzD8K9lyPdpyUCfmVsUg==)" WebUI\Password_PBKDF2="@ByteArray(${QB_HASH})"
WebUI\Port=8090 WebUI\Port=8090
WebUI\UseUPnP=false WebUI\UseUPnP=false
WebUI\Username=admin WebUI\Username=admin
+7 -1
View File
@@ -43,9 +43,15 @@ $STD rabbitmqctl enable_feature_flag all
msg_ok "Enabled RabbitMQ Management Plugin" msg_ok "Enabled RabbitMQ Management Plugin"
msg_info "Creating User" msg_info "Creating User"
$STD rabbitmqctl add_user proxmox proxmox RABBITMQ_PASS=$(random_password 20)
$STD rabbitmqctl add_user proxmox "$RABBITMQ_PASS"
$STD rabbitmqctl set_user_tags proxmox administrator $STD rabbitmqctl set_user_tags proxmox administrator
$STD rabbitmqctl set_permissions -p / proxmox ".*" ".*" ".*" $STD rabbitmqctl set_permissions -p / proxmox ".*" ".*" ".*"
{
echo "RabbitMQ Credentials"
echo "Username: proxmox"
echo "Password: ${RABBITMQ_PASS}"
} >~/rabbitmq.creds
msg_ok "Created User" msg_ok "Created User"
motd_ssh motd_ssh
+1 -1
View File
@@ -151,7 +151,7 @@ INVITE_EMAIL_TEMPLATE=/opt/signoz/templates/invitation_email_template.html
SIGNOZ_SQLSTORE_SQLITE_PATH=/var/lib/signoz/signoz.db SIGNOZ_SQLSTORE_SQLITE_PATH=/var/lib/signoz/signoz.db
SIGNOZ_WEB_ENABLED=true SIGNOZ_WEB_ENABLED=true
SIGNOZ_WEB_DIRECTORY=/opt/signoz/web SIGNOZ_WEB_DIRECTORY=/opt/signoz/web
SIGNOZ_JWT_SECRET=secret SIGNOZ_JWT_SECRET=$(openssl rand -hex 32)
SIGNOZ_ALERTMANAGER_PROVIDER=signoz SIGNOZ_ALERTMANAGER_PROVIDER=signoz
SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse
SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://localhost:9000?password= SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://localhost:9000?password=
+7 -1
View File
@@ -78,6 +78,12 @@ msg_info "Configuring SnapOtter"
mkdir -p /opt/snapotter_data/files mkdir -p /opt/snapotter_data/files
mkdir -p /tmp/snapotter-workspace mkdir -p /tmp/snapotter-workspace
SNAPOTTER_PASS=$(random_password 20)
{
echo "SnapOtter Credentials"
echo "Username: admin"
echo "Password: ${SNAPOTTER_PASS}"
} >~/snapotter.creds
cat <<EOF >/opt/snapotter_data/.env cat <<EOF >/opt/snapotter_data/.env
PORT=1349 PORT=1349
NODE_ENV=production NODE_ENV=production
@@ -92,7 +98,7 @@ FEATURE_MANIFEST_PATH=/opt/snapotter/docker/feature-manifest.json
U2NET_HOME=/opt/snapotter_data/ai/models/rembg U2NET_HOME=/opt/snapotter_data/ai/models/rembg
AUTH_ENABLED=true AUTH_ENABLED=true
DEFAULT_USERNAME=admin DEFAULT_USERNAME=admin
DEFAULT_PASSWORD=admin DEFAULT_PASSWORD=${SNAPOTTER_PASS}
LOG_LEVEL=info LOG_LEVEL=info
TRUST_PROXY=true TRUST_PROXY=true
FILE_MAX_AGE_HOURS=72 FILE_MAX_AGE_HOURS=72
-4
View File
@@ -116,10 +116,6 @@ if [[ "$login_mode" == "true" ]]; then
# activate Login # activate Login
DISABLE_ADDITIONAL_FEATURES=false DISABLE_ADDITIONAL_FEATURES=false
SECURITY_ENABLELOGIN=true SECURITY_ENABLELOGIN=true
# login credentials
SECURITY_INITIALLOGIN_USERNAME=admin
SECURITY_INITIALLOGIN_PASSWORD=stirling
EOF EOF
fi fi
msg_ok "Created Environment Variables" msg_ok "Created Environment Variables"
+7 -3
View File
@@ -85,12 +85,16 @@ function install() {
mkdir -p "${HOME}/.config/code-server/" mkdir -p "${HOME}/.config/code-server/"
if [ "$preexisting_config" = false ]; then if [ "$preexisting_config" = false ]; then
CS_PASS=$(random_password 20)
cat <<EOF >"$config_path" cat <<EOF >"$config_path"
bind-addr: 0.0.0.0:8680 bind-addr: 0.0.0.0:8680
auth: none auth: password
password: password: ${CS_PASS}
cert: false cert: false
EOF EOF
chmod 600 "$config_path"
echo -e "Coder Code Server\nPassword: ${CS_PASS}" >~/coder-code-server.creds
chmod 600 ~/coder-code-server.creds
fi fi
systemctl enable -q --now code-server@"$USER" systemctl enable -q --now code-server@"$USER"
systemctl restart code-server@"$USER" systemctl restart code-server@"$USER"
@@ -111,7 +115,7 @@ EOF
msg_ok "Created update script (/usr/local/bin/update_coder-code-server)" msg_ok "Created update script (/usr/local/bin/update_coder-code-server)"
echo -e "${APP} should be reachable by going to the following URL. echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:8680${CL} \n" ${BL}http://${IP}:8680${CL} (password in ~/coder-code-server.creds)\n"
} }
# ============================================================================== # ==============================================================================
+5 -3
View File
@@ -151,9 +151,9 @@ function install() {
else else
read -rp "${TAB}Set admin username [admin]: " admin_user read -rp "${TAB}Set admin username [admin]: " admin_user
admin_user=${admin_user:-admin} admin_user=${admin_user:-admin}
read -rsp "${TAB}Set admin password [community-scripts.org]: " admin_pass read -rsp "${TAB}Set admin password [random]: " admin_pass
echo "" echo ""
admin_pass=${admin_pass:-community-scripts.org} admin_pass=${admin_pass:-$(random_password 20)}
msg_ok "Configured with admin user: ${admin_user}" msg_ok "Configured with admin user: ${admin_user}"
fi fi
@@ -291,8 +291,10 @@ UPDATEEOF
msg_ok "Storage: ${BL}${DATA_PATH}${CL}" msg_ok "Storage: ${BL}${DATA_PATH}${CL}"
msg_ok "Config: ${BL}${CONF_PATH}${CL}" msg_ok "Config: ${BL}${CONF_PATH}${CL}"
if [[ -n "$admin_user" ]]; then if [[ -n "$admin_user" ]]; then
echo -e "Copyparty\nUsername: ${admin_user}\nPassword: ${admin_pass}" >~/copyparty.creds
chmod 600 ~/copyparty.creds
echo "" echo ""
msg_ok "Login: ${GN}${admin_user}${CL} / ${GN}${admin_pass}${CL}" msg_ok "Login: ${GN}${admin_user}${CL} (password in ~/copyparty.creds)"
fi fi
} }
+16 -2
View File
@@ -189,6 +189,8 @@ chown root:root /usr/local/community-scripts
chmod 755 /usr/local/community-scripts chmod 755 /usr/local/community-scripts
msg_ok "Directory prepared" msg_ok "Directory prepared"
ADMIN_PASS=$(random_password 20)
msg_warn "FileBrowser runs as root and shows the whole filesystem. Without authentication, anyone who reaches port ${PORT} can read and change every file."
echo -n "${TAB}Use No Authentication? (y/N): " echo -n "${TAB}Use No Authentication? (y/N): "
read -r noauth_prompt read -r noauth_prompt
@@ -234,9 +236,12 @@ server:
- neverWatchPath: "/lost+found" - neverWatchPath: "/lost+found"
auth: auth:
adminUsername: admin adminUsername: admin
adminPassword: community-scripts.org adminPassword: ${ADMIN_PASS}
EOF EOF
msg_ok "Configured with default admin (admin / community-scripts.org)" chmod 600 "$CONFIG_PATH"
echo -e "FileBrowser Quantum\nUsername: admin\nPassword: ${ADMIN_PASS}" >~/filebrowser-quantum.creds
chmod 600 ~/filebrowser-quantum.creds
msg_ok "Configured admin (credentials saved in ~/filebrowser-quantum.creds)"
fi fi
msg_info "Creating service" msg_info "Creating service"
@@ -276,4 +281,13 @@ EOF
fi fi
msg_ok "Service created successfully" msg_ok "Service created successfully"
# auth.adminPassword resets the password on every start, so it stays only until the admin exists
if grep -q '^\s*adminPassword:' "$CONFIG_PATH"; then
for _ in {1..30}; do
[[ "$(curl -s -o /dev/null -w '%{http_code}' "http://127.0.0.1:${PORT}/health")" == "200" ]] && break
sleep 1
done
sed -i '/^\s*adminPassword:/d' "$CONFIG_PATH"
fi
msg_ok "${APP} is reachable at: ${BL}http://${IP}:${PORT}${CL}" msg_ok "${APP} is reachable at: ${BL}http://${IP}:${PORT}${CL}"
+9 -6
View File
@@ -122,9 +122,11 @@ if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
chmod 755 /usr/local/community-scripts chmod 755 /usr/local/community-scripts
touch "$DB_PATH" touch "$DB_PATH"
chown root:root "$DB_PATH" chown root:root "$DB_PATH"
chmod 644 "$DB_PATH" chmod 600 "$DB_PATH"
msg_ok "Directory created successfully" msg_ok "Directory created successfully"
ADMIN_PASS=$(random_password 20)
msg_warn "FileBrowser runs as root and shows the whole filesystem. Without authentication, anyone who reaches port ${PORT} can read and change every file."
read -r -p "Would you like to use No Authentication? (y/N): " auth_prompt read -r -p "Would you like to use No Authentication? (y/N): " auth_prompt
if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Configuring No Authentication" msg_info "Configuring No Authentication"
@@ -133,16 +135,18 @@ if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
$STD filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" $STD filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH"
$STD filebrowser config set --auth.method=noauth --database "$DB_PATH" $STD filebrowser config set --auth.method=noauth --database "$DB_PATH"
if ! filebrowser users update 1 --perm.admin --database "$DB_PATH" &>/dev/null; then if ! filebrowser users update 1 --perm.admin --database "$DB_PATH" &>/dev/null; then
$STD filebrowser users add admin community-scripts.org --perm.admin --database "$DB_PATH" $STD filebrowser users add admin "$ADMIN_PASS" --perm.admin --database "$DB_PATH"
fi fi
msg_ok "No Authentication configured" msg_ok "No Authentication configured"
else else
msg_info "Setting up default authentication" msg_info "Setting up authentication"
cd /usr/local/community-scripts cd /usr/local/community-scripts
$STD filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" $STD filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH"
$STD filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" $STD filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH"
$STD filebrowser users add admin community-scripts.org --perm.admin --database "$DB_PATH" $STD filebrowser users add admin "$ADMIN_PASS" --perm.admin --database "$DB_PATH"
msg_ok "Default authentication configured (admin:community-scripts.org)" echo -e "FileBrowser\nUsername: admin\nPassword: ${ADMIN_PASS}" >~/filebrowser.creds
chmod 600 ~/filebrowser.creds
msg_ok "Authentication configured (credentials saved in ~/filebrowser.creds)"
fi fi
msg_info "Creating service" msg_info "Creating service"
@@ -156,7 +160,6 @@ After=network-online.target
User=root User=root
WorkingDirectory=/usr/local/community-scripts WorkingDirectory=/usr/local/community-scripts
ExecStartPre=/bin/touch /usr/local/community-scripts/filebrowser.db ExecStartPre=/bin/touch /usr/local/community-scripts/filebrowser.db
ExecStartPre=/usr/local/bin/filebrowser config set -a "0.0.0.0" -p ${PORT} -d /usr/local/community-scripts/filebrowser.db
ExecStart=/usr/local/bin/filebrowser -r / -d /usr/local/community-scripts/filebrowser.db -p ${PORT} ExecStart=/usr/local/bin/filebrowser -r / -d /usr/local/community-scripts/filebrowser.db -p ${PORT}
Restart=always Restart=always
+6 -1
View File
@@ -30,6 +30,7 @@ catch_errors
# Initialize all core functions (colors, formatting, icons, STD mode) # Initialize all core functions (colors, formatting, icons, STD mode)
load_functions load_functions
confirm_not_pve_host
require_debian_like require_debian_like
header_info header_info
@@ -49,9 +50,13 @@ msg_ok "Installed Prerequisites"
msg_info "Installing ${APP}" msg_info "Installing ${APP}"
fetch_and_deploy_gh_release "webmin" "webmin/webmin" "binary" "latest" "/opt/webmin" "webmin_*_all.deb" fetch_and_deploy_gh_release "webmin" "webmin/webmin" "binary" "latest" "/opt/webmin" "webmin_*_all.deb"
/usr/share/webmin/changepass.pl /etc/webmin root root &>/dev/null WEBMIN_PASS=$(random_password 20)
/usr/share/webmin/changepass.pl /etc/webmin root "$WEBMIN_PASS" &>/dev/null
echo -e "Webmin\nUsername: root\nPassword: ${WEBMIN_PASS}" >~/webmin.creds
chmod 600 ~/webmin.creds
msg_ok "Installed ${APP}" msg_ok "Installed ${APP}"
get_lxc_ip get_lxc_ip
echo -e "Successfully Installed!! ${APP} should be reachable by going to ${BL}https://${LOCAL_IP}:10000${CL}" echo -e "Successfully Installed!! ${APP} should be reachable by going to ${BL}https://${LOCAL_IP}:10000${CL}"
echo -e "Login: root, password in ~/webmin.creds"