Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/setup-vps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ fi
echo "==> Generating secrets and creating .env..."
FERNET_KEY=$(docker run --rm python:3.11-slim python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" 2>/dev/null || echo "GENERATE_ME")
JWT_SECRET=$(openssl rand -hex 32)
PG_PASSWORD=$(openssl rand -base64 32 | tr -d '=+/')
# Validate SUDO_USER contains only safe characters (alphanumeric, dash, underscore)
if [[ "$SUDO_USER" =~ ^[a-zA-Z0-9_-]+$ ]]; then
usermod -aG docker "$SUDO_USER"
fi

cat > /opt/minirag/.env <<EOF
# ── Domain ────────────────────────────────────────────────
Expand Down